1 Reply Latest reply on May 2, 2007 10:48 AM by carstenrudat

    JMS-Topic-Deployment on JBoss 5 Beta 2

      Hi all,

      I have an (Session-Bean)-JAR within an EAR. Inside the JAR, there is an META-INF/jboss-service.xml witch defines a JMS-Topic "messageTopic".

      A sessionBean - inside the same JAR - has an @Resource-injection with this just deployed topic - and this fails. The sessionbean will not be deployed, but after all I see the "messageTopic" in JBoss' jmx-console, so my jboss-service.xml is deployed.

      I want to ask, if I do anything wrong? Perhaps, I have to give (how?) an order of deployment (first deploy the topic, then deploy the sessionbean).
      Or is it just a bug, because of JBoss 5 is beta?

      Additionally, I have to say, that my project worked with jboss-4.0.2.GA.

      Best regards,

      Carsten

        • 1. Re: JMS-Topic-Deployment on JBoss 5 Beta 2

          I just want to ask again... but I have to admit that my session bean is a mbean, not a session bean!

          Here is the code:

          @Resource(mappedName="topic/myMessageTopic")
          protected Topic messageTopic;
          


          My jboss-service.xml (in same JAR-file, as my MBean)
          <?xml version="1.0" encoding="UTF-8"?>
          <server>
           <mbean code="org.jboss.jms.server.destination.TopicService"
          name="jboss.messaging.destination:service=Topic,name=myMessageTopic" xmbean-dd="xmdesc/Topic-xmbean.xml">
           <attribute name="JNDIName">topic/myMessageTopic</attribute>
           <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
           <depends>jboss.messaging:service=PostOffice</depends>
           </mbean>
          </server>
          


          As I said, the deployment of the mbean fails. After the deployment of the most of the jar, I see that the topic is startet... I think it is just a problem of timing: my mbean is deployed before jboss starts the topic...

          Any ideas?
          Carsten