1 2 Previous Next 21 Replies Latest reply on Nov 20, 2006 5:30 PM by alrubinger Go to original post
      • 15. Re: Can't get a stateless session bean to work - JNDI can't
        alrubinger

         

        "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

          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

            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

              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

                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

                  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

                    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

                    1 2 Previous Next