-
15. Re: Can't get a stateless session bean to work - JNDI can't
alrubinger Nov 20, 2006 12:11 AM (in response to azavia)"Azavia" wrote:
Yeha I know, but how do you create that queue? I mean how do you specify that such a queue at that jndi name should be created? that's what I'm not understanding.
Use a *-service.xml file in your deploy directory to create an MBean for the JMS Queue or Topic. For instance, JBossMQ ships as the default Messaging implementation, and the default queues/topics are in $JBOSS_HOME/server/[instanceName]/jms/jbossmq-destinations-service.xml.
Either alter the "test" topics/queues in there, or make a new one (eg this Topic):<mbean code="org.jboss.mq.server.jmx.Topic" name="jboss.mq.destination:service=Topic,name=yourTopicName"> <depends optional-attribute-name="DestinationManager"> jboss.mq:service=DestinationManager </depends> <depends optional-attribute-name="SecurityManager"> jboss.mq:service=SecurityManager </depends> <attribute name="JNDIName"> yourPrefix/yourJndiName </attribute> </mbean>
Some great examples/docs have been contributed here:
http://www.jboss.org/wiki/Wiki.jsp?page=JBossMQ
S,
ALR -
16. Re: Can't get a stateless session bean to work - JNDI can't
sbucknor Nov 20, 2006 2:01 AM (in response to azavia)Still haven't resolved the same issue I am having. Could please give me some more details on the reference to the EJB jar from the war file you mentioned. Thanks.
-
17. Re: Can't get a stateless session bean to work - JNDI can't
azavia Nov 20, 2006 6:35 AM (in response to azavia)ALRubinger:
Thanks. I don't see the path you are talking about though. Under server/all there is no jms directory as you implied. I assumed then y0ou meant under deploy, under which there is a jms directory, but no file with the name you mentioned.
sbucknor:
What's the error you're getting now? -
18. Re: Can't get a stateless session bean to work - JNDI can't
jaikiran Nov 20, 2006 8:12 AM (in response to azavia)Azavia, if you are using the "all" server configuration then you will find the jbossmq-destinations-service.xml in %JBOSS_HOME%\server\all\deploy-hasingleton\jms folder.
-
19. Re: Can't get a stateless session bean to work - JNDI can't
alrubinger Nov 20, 2006 11:15 AM (in response to azavia)Right; sorry - left out the "deploy" dir (or deploy-hasingleton, depending on your config).
S,
ALR -
20. Re: Can't get a stateless session bean to work - JNDI can't
azavia Nov 20, 2006 3:43 PM (in response to azavia)Ah, found it.
so it is something like:<mbean code="org.jboss.mq.server.jmx.Queue" name="jboss.mq.destination:service=Queue,name=ex"> <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends> </mbean>
Is the name=ex where the JNDI name goes?
Thanks,
Brandn -
21. Re: Can't get a stateless session bean to work - JNDI can't
alrubinger Nov 20, 2006 5:30 PM (in response to azavia)Yes, it's something like that (if you're sending a message to a Queue as opposed to my example of a Topic).
"name=ex" is the place for the unique name of your Queue/Topic. JNDI address is specified as an attribute of the MBean (refer to the example on the previous page for full file) like:<attribute name="JNDIName"> yourPrefix/yourJndiName </attribute>
G'luck.
S,
ALR