Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Junilu Lacar
  • Martin Vashko
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Scott Selikoff
  • salvin francis
  • Piet Souris

What is the correct way to create a MDB?

 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

javax.naming.NameNotFoundException: jms not bound



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.
 
Frederico Benevides
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was just wondering whether you have included the queue somewhere inside the jboss-related xml configuration file?
 
Cob is sand, clay and sometimes straw. This tiny ad is made of cob:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!