aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes What is the correct way to create a MDB? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "What is the correct way to create a MDB?" Watch "What is the correct way to create a MDB?" New topic
Author

What is the correct way to create a MDB?

Frederico Benevides
Greenhorn

Joined: Jan 15, 2006
Posts: 25
I'm trying to create my MDB



But when I use theses, I get an error



So, if I change my property "destinationName" to "destination" only shows the error



Thank you,

Frederico
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 9317
    
109



JBoss by default binds queues to the "queue" context in the Global JNDI tree. So if your queue is named "xyz", its going to be bound to "queue/xyz" jndi name.

So try changing your destination value in the annotation as follows:


Here's the EJB3 TrailBlazer which might help.


[My Blog] [JavaRanch Journal]
Frederico Benevides
Greenhorn

Joined: Jan 15, 2006
Posts: 25
Thank you, that worked!

But one doubt.

I changed my ReceptorMDB to this




And for my client ejb to work I had to use this



I would like to know why I cannot use mappedName as mappedName="ReceptorQueue" since I put my Receptor with name "ReceptorQueue"

Thank you
Cloey Tan
Ranch Hand

Joined: Feb 03, 2009
Posts: 60
I was just wondering whether you have included the queue somewhere inside the jboss-related xml configuration file?
 
 
subject: What is the correct way to create a MDB?
 
Similar Threads
ejb3 mdb dependency injection
Who creates destination Queueor Topic
Deploy MDB on Glassfish
MDB : destinationName property for JMS queue at runtime
javax.transaction.RollbackException in jboss 6