File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JBoss/WildFly and the fly likes MDB in EJB 3.0 and JBOSS AS 6.1 final Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "MDB in EJB 3.0 and JBOSS AS 6.1 final" Watch "MDB in EJB 3.0 and JBOSS AS 6.1 final" New topic

MDB in EJB 3.0 and JBOSS AS 6.1 final

Abhishek Guru

Joined: Mar 16, 2010
Posts: 6

Any one now how to create an MDB using JBOSS AS 6.1 final and EJB 3.0.

I am using Eclipse IDE 3.5.
Using ant build to create EAR file.

If possible please explain deployment descriptors
ejb-jar.xml, jboss.xml, jboss-web.xml.

Are they still needed in Jboss AS 6.1 final release or we use only Annotations for createing MDB.

I googled a lot but did not find any tutorials that worked for me.

Regards and Thanks
Guru Bojja

Joined: Nov 21, 2011
Posts: 14


sample code :
@MessageDriven(name = "EDMProcessRequestQueueListener", activationConfig = {
@ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
// @ActivationConfigProperty(propertyName = "destination", propertyValue = EDMConstants.QueueDestination_MappedName_EDMProcessRequestQueue),
@ActivationConfigProperty(propertyName = "destination", propertyValue = EDMConstants.QueueDestination_MappedName_EDMProcessRequestQueue),
@ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge") })

public class EDMProcessRequestQueueListener implements MessageListener {

public void onMessage(Message message) {

Abhishek Guru

Joined: Mar 16, 2010
Posts: 6

I have tried an example using tutorial :

But I am stuck on error after deployment. This is not an error, a warning says :

[org.jboss.webservices.integration.deployers.WSEJBAdapterDeployer] Ingoring EJB deployment with null classname: null

Here is the jboss.xml :

test-hornetq-jms.xml :

Jaikiran Pai

Joined: Jul 20, 2005
Posts: 10441

Try specifying the <ejb-class> element in your jboss.xml to point to the EJB implementation class. Although, I think that webservice error could perhaps be ignored. Not sure why webservice is coming into picture.

[My Blog] [JavaRanch Journal]
Abhishek Guru

Joined: Mar 16, 2010
Posts: 6
Thanks for immediate reply.
I have tried to ad <ejb-class> element in jboss-xml. This is not working as jboss.xml is not parsing this element. error is :

ejb-class not found as a child of message-driven in unordered_sequence: mdb-client-id? configuration-name? security-proxy? resource-adapter-name? local-jndi-name? annotation* timer-persistence? jndi-ref* ior-security-config? mdb-user? ejb-timeout-identity? aop-domain-name? mdb-passwd? depends* destination-jndi-name? mdb-subscription-id? create-destination? method-attributes? activation-config? security-identity? ejb-name? ignore-dependency? jndi-binding-policy? pool-config? security-domain? exception-on-rollback? invoker-bindings? {all descriptionGroup}? {unordered_sequence jndiEnvironmentRefsGroup}?

You are right that webservice error can be ignored.

But after successful deployment, I did not able to send message to my MDB. It just run the code smoothly up to the point where I actually send the message to my MDB. But it never reaches to MDB.

Example tried is here :

If you guys having any of the runnning mdb example in jboss6 and ejb 3.0, please mail me at my gmail id


jQuery in Action, 3rd edition
subject: MDB in EJB 3.0 and JBOSS AS 6.1 final
It's not a secret anymore!