1 2 Previous Next 18 Replies Latest reply on Sep 26, 2006 8:16 PM by Ovidiu Feodorov

    Configuring Destinations

    Tim Fox Master

      Apologies - the example queue cofiguration in the docs is wrong.

      It should read:

      <?xml version="1.0" encoding="UTF-8"?>
       <mbean code="org.jboss.jms.server.destination.Queue"
       <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>

      Take a look in jboss-messaging.sar/META-INF/jboss-service.xml for more examples

        • 1. Re: Configuring Destinations
          Ovidiu Feodorov Master

          ... and this is how to deploy a topic:

          Create a mytopic-service.xml file with the following content

           <mbean code="org.jboss.jms.server.destination.Topic"
           <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>

          and copy it in $JBOSS_HOME/server/messaging/deploy

          This is what you should see in the log after a successful deployment:

          10:22:11,771 INFO [Topic] Topic[/topic/myTopic] started, fullSize=75000, pageSize=2000, downCacheSize=1000

          • 2. Re: Configuring Destinations
            Mike (JBoss) McLean Newbie

            I'm getting the same problem, even with the updated XML you've included. The problem here (I believe) is that my [myname]-service.xml file resides in the deployed .ear file and not in the [deploy] directory. I need that file to reside with the app deployment.

            Is this supported as it is with JBossMQ?


            • 3. Re: Configuring Destinations
              Ovidiu Feodorov Master

              What is the exact error you're getting?

              Please post it here, and I also need the "topology" of your deployment: the ear deployment descriptors, the service deployment descriptors and your ear structure.

              • 4. Re: Configuring Destinations
                Mike (JBoss) McLean Newbie


                It starts up the example queues and topics fine:

                07:50:50,404 INFO [Queue] Queue[/queue/C] started, fullSize=75000, pageSize=2000, downCacheSize=2000

                I then copy the definition for one of those topics to my deployment file:

                <mbean code="org.jboss.jms.server.destination.Topic"
                 <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
                 <attribute name="SecurityConfig">
                 <role name="guest" read="true" write="true"/>
                 <role name="publisher" read="true" write="true" create="false"/>
                 <role name="durpublisher" read="true" write="true" create="true"/>

                This will show the following error:
                org.jboss.deployment.DeploymentInfo@b5701711 { url=file:/F:/jboss-4.0.4.GA/server/messaging/deploy/my.ear/ }
                 deployer: org.jboss.deployment.EARDeployer@738a71
                 status: Deployment FAILED reason: No ClassLoaders found for: org.jboss.jms.server.destination.Topic; - nested throwable: (java.lang.ClassNotFoundException: No ClassLoaders found for: org.jboss.jms.server.destination.Topic)
                 state: FAILED
                 watch: file:/F:/jboss-4.0.4.GA/server/messaging/deploy/my.ear/META-INF/application.xml
                 altDD: null
                 lastDeployed: 1157630180754
                 lastModified: 1157487949404

                My definition file is in an exploded ear file.

                The destinations are defined in a file called myfile-destinations-service.xml which is at the root of the myEjb.jar file/directory.

                Thanks for the help.

                • 5. Re: Configuring Destinations
                  Ovidiu Feodorov Master

                  Your whole ear needs to be scoped.

                  Add a jboss-app.xml in your ear's META-INF. It should contain:


                  • 6. Re: Configuring Destinations
                    Mike (JBoss) McLean Newbie

                    Thanks for the help.

                    Unfortunately, doing this caused a nightmare of conflicting jar files (commons logging), so time not permitting me to fix it, I'm going to simply fall back to putting the file in the deploy directory.

                    • 7. Re: Configuring Destinations
                      Ovidiu Feodorov Master

                      You can send me your ear (stripped off any proprietary/confidential code, if any), I can take a look at it.

                      • 8. Re: Configuring Destinations
                        Mike (JBoss) McLean Newbie

                        Thanks for the offer.

                        When I get back into this, I might take you up on that offer. For now, we're satisfied enough with having the destinations file outside the ear as it's never really touched.

                        • 9. Re: Configuring Destinations
                          Peter Johnson Master

                          Ovidiu, I got the same error as Ensonik, though under different circumstances. I had a JAR file with a EJB3 MDB and a few other classes. One of the classes contained JMS client code. Once I removed the class with the client code, the class not found problem went away. If you are interested, I could send you the jar file.

                          Wierd thing is, though, none of my classes dealt with javax.jms.Queue (all used Topic), but Queue was the one that could not be found.

                          • 10. Re: Configuring Destinations
                            Ovidiu Feodorov Master

                            Yes, please.
                            What EJB3 version are you using?

                            • 11. Re: Configuring Destinations
                              Peter Johnson Master

                              Ovidiu, I will email the zip file to you. I think I was using JBoss AS 4.0.5CR1 and JBoss Messaging 1.0.1CR4 (I encountered the problem at home but am now at work). I will verify the versions and let you know the exact version in my email.

                              • 12. Re: Configuring Destinations
                                Peter Johnson Master

                                I just now found the root cause of the problem.

                                First, I am using JBossAS 4.0.5CR1 (whichever EJB3 implementation that comes with it). I am also using JBoss Messaging 1.0.1CR4 (haven't upgradded to CR5 yet).

                                The jar file I built contained client code and the MDB. And one other thing - a jndi.properties file. Once I removed the jndi.properties file, the EJB3 MDB deployed successfully. The jndi.properties contained the tpyical information for locahost:


                                So it does not appear to be a problem with the EJB3 or Messaging code, simply a packaging issue for my jar file. By the way, I reproduced the problem by adding the jndi.properties file to the mdb-example.ejb3 file generated by the ejb3mdb example.

                                Therefore, I will not be sending the jar file.

                                It might by nice, however, if the DLQHandler.createSevice method was modified to look for the class not found exception and generate an error that lets the user know to check the jar file for an extraneous jndi.properties file. Let me know and I will submit a proposed patch.

                                • 13. Re: Configuring Destinations
                                  Ovidiu Feodorov Master

                                  I would rather add the conclusion to the FAQs. Please feel free to create an entry and post your conclusion there: http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossMessaging

                                  • 14. Re: Configuring Destinations
                                    Ovidiu Feodorov Master


                                    PeterJ wrote:
                                    First, I am using JBossAS 4.0.5CR1 (whichever EJB3 implementation that comes with it).

                                    I expanded the "stock" 4.0.5.CR1 release (this is what I used for the release smoke tests) and I don't see any default EJB3 installation. Have you used the installer?

                                    1 2 Previous Next