Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within EJB and other Jakarta /Java EE Technologies
Search Coderanch
Advance search
Google search
Register / Login
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
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Tim Cooke
paul wheaton
Liutauras Vilda
Ron McLeod
Sheriffs:
Jeanne Boyarsky
Devaka Cooray
Paul Clapham
Saloon Keepers:
Scott Selikoff
Tim Holloway
Piet Souris
Mikalai Zaikin
Frits Walraven
Bartenders:
Stephan van Hulst
Carey Brown
Forum:
EJB and other Jakarta /Java EE Technologies
What is the correct way to create a MDB?
Frederico Benevides
Greenhorn
Posts: 25
posted 17 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
I'm trying to create my MDB
@MessageDriven(name="ReceptorQueue", activationConfig= { @ActivationConfigProperty(propertyName="destinationName",propertyValue="jms/ReceptorQueue"), @ActivationConfigProperty(propertyName="destinationType",propertyValue="javax.jms.Queue") } )
But when I use theses, I get an error
Reason: org.jboss.deployment.DeploymentException: Required config property RequiredConfigPropertyMetaData@cc258a[name=destination descriptions=[DescriptionMetaData@5d33e1[language=pt]]] for messagingType 'javax.jms.MessageListener' not found in activation config [ActivationConfigProperty(destinationType=javax.jms.Queue), ActivationConfigProperty(destinationName=jms/ReceptorQueue)] ra=jboss.jca:service=RARDeployment,name='jms-ra.rar'
So, if I change my property "destinationName" to "destination" only shows the error
javax.naming.NameNotFoundException: jms not bound
Thank you,
Frederico
Jaikiran Pai
Sheriff
Posts: 10445
227
I like...
posted 17 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
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:
@ActivationConfigProperty(propertyName="destination",propertyValue="queue/ReceptorQueue")
Here's the
EJB3 TrailBlazer
which might help.
[
My Blog
] [
JavaRanch Journal
]
Frederico Benevides
Greenhorn
Posts: 25
posted 17 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Thank you, that worked!
But one doubt.
I changed my ReceptorMDB to this
@MessageDriven( activationConfig= { @ActivationConfigProperty(propertyName="destination",propertyValue="queue/ReceptorQueue"), @ActivationConfigProperty(propertyName="destinationType",propertyValue="javax.jms.Queue") }, name="ReceptorQueue" )
And for my client
ejb
to work I had to use this
@Resource(mappedName="ConnectionFactory") private ConnectionFactory connectionFactory; @Resource(name="queue/ReceptorMensagemQueue", mappedName="queue/ReceptorQueue") private Destination receptor;
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
Posts: 60
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
I was just wondering whether you have included the queue somewhere inside the jboss-related xml configuration file?
What's that smell? I think this tiny ad may have stepped in something.
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
MDB : destinationName property for JMS queue at runtime
ejb3 mdb dependency injection
Deploy MDB on Glassfish
Who creates destination Queueor Topic
javax.transaction.RollbackException in jboss 6
More...