9 Replies Latest reply on Sep 15, 2002 4:58 PM by garyg

    MBean Deployment

    garyg

      I'm working on my first MBean and I hava a service file for my application in the ~/server/default/deploy directory (acaiis-service.xml). In it I've listed many topics and queues that work fine. Yet when I add in the following custom MBean, I get the errors below about all the queues/topics, MDB's, etc.. w/ JMSExceptions of "This destination is not open!"

      Any help much appreciated.




      23:56:25,694 INFO [manager] Creating
      23:56:25,696 INFO [manager] Created
      23:56:25,703 INFO [manager] Destroying
      23:56:25,741 ERROR [manager] Destroying failed
      javax.jms.JMSException: This destination is not open!
      at org.jboss.mq.server.JMSDestinationManager.closeDestination(JMSDestinationManager.java:795)
      at org.jboss.mq.server.jmx.DestinationMBeanSupport.destroyService(DestinationMBeanSupport.java:114)
      at org.jboss.system.ServiceMBeanSupport.destroy(ServiceMBeanSupport.java:232)
      at java.lang.reflect.Method.invoke(Native Method)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:967)
      at $Proxy5.destroy(Unknown Source)
      at org.jboss.system.ServiceController.destroy(ServiceController.java:530)

      --- this error is towards the end ----------------

      23:57:07,828 ERROR [URLDeploymentScanner] MBeanException: Exception in MBean operation 'checkIncompleteDeployments()'
      Cause: Incomplete Deployment listing:
      Packages waiting for a deployer:

      Incompletely deployed packages:
      [org.jboss.deployment.DeploymentInfo@f83f144f { url=file:/u/public/jboss/jboss-3.0.2/server/default/deploy/acaiis-service.xml }
      deployer: org.jboss.deployment.SARDeployer@f4fb3
      status: Deployment FAILED reason: acaiis:service=Scheduler is not registered.; - nested throwable: (javax.management.InstanceNotFoundException: acaiis:service=Scheduler is not registered.)
      state: FAILED
      watch: file:/u/public/jboss/jboss-3.0.2/server/default/deploy/acaiis-service.xml

      ]MBeans waiting for classes:

      MBeans waiting for other MBeans:
      [ObjectName: acaiis:service=Scheduler
      state: NOTYETINSTALLED
      I Depend On:

      Depends On Me: ]
      23:57:07,903 INFO [URLDeploymentScanner] Started
      23:57:07,905 INFO [MainDeployer] Deployed package: file:/u/public/jboss/jboss-3.0.2/server/default/conf/jboss-service.xml
      23:57:07,975 INFO [Server] JBoss (MX MicroKernel) [3.0.2 Date:200208271339] Started in 1m:47s:353ms

        • 1. Re: MBean Deployment

          The queues won't start until the destintion manager
          starts.

          Add a
          My:name=queue

          to ensure the scheduler doesn't start until the queues
          are deployed.

          Regards,
          Adrian

          • 2. Re: MBean Deployment
            garyg

            I don't fully understand what the my:name is? Can someone tell me how that works out w/ the scheduler mbean below?Also, I was guessing on the name portion of it as acaiis is my app's name.

            Any help much appreciated.


            <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager



            my:name=queue

            • 3. Re: MBean Deployment

              The should contain the jmx name of the queue

              jboss.mq.destination:service=Queue,name=manager

              Regards,
              Adrian

              • 4. Re: MBean Deployment
                garyg

                What is the syntax of an mbean's 'name' attribute? I'm trying to create a scheduler service and don't know what is supposed to go before the service part.



                Thanks.

                • 5. Re: MBean Deployment

                  That's the MBean object name.

                  [Domain]:propertyName=value[,propertyName=value,...]

                  domain is optional, you must provide at least one (name, value) pair, and you can include more (name, value) pairs by separating commas

                  • 6. Re: MBean Deployment
                    garyg

                    Still trying to get this MBean deployed correctly in my *-services.xml file. When I add in the following MBean, I still get the errors below. I even tried putting in a depends line (which I don't see how the Scheduler depends on the Queue), but didn't help.

                    Any help much appreciated.

                    ----- snip my-service.xml
                    ...

                    <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager


                    <!-- whether the depends line is in or out, it's a no go -->


                    jboss.mq.destination:service=Queue,name=manager

                    ...
                    -----

                    00:26:01,666 INFO [manager] Creating
                    00:26:01,668 INFO [manager] Created
                    00:26:01,699 INFO [manager] Destroying
                    00:26:01,722 ERROR [manager] Destroying failed
                    javax.jms.JMSException: This destination is not open!
                    at org.jboss.mq.server.JMSDestinationManager.closeDestination(JMSDestinationManager.java:795)
                    at org.jboss.mq.server.jmx.DestinationMBeanSupport.destroyService(DestinationMBeanSupport.java:114)
                    at org.jboss.system.ServiceMBeanSupport.destroy(ServiceMBeanSupport.java:232)
                    at java.lang.reflect.Method.invoke(Native Method)
                    at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
                    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
                    at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:967)
                    at $Proxy5.destroy(Unknown Source)

                    --------- and towards the end of the startup output ...

                    00:35:53,283 ERROR [URLDeploymentScanner] MBeanException: Exception in MBean operation 'checkIncompleteDeployments()'
                    Cause: Incomplete Deployment listing:
                    Packages waiting for a deployer:

                    Incompletely deployed packages:
                    [org.jboss.deployment.DeploymentInfo@f83f144f { url=file:/u/public/jboss/jboss-3.0.2/server/default/deploy/acaiis-service.xml }
                    deployer: org.jboss.deployment.SARDeployer@f4fb3
                    status: Deployment FAILED reason: DefaultDomain:service=Scheduler is not registered.; - nested throwable: (javax.management.InstanceNotFoundException: DefaultDomain:service=Scheduler is not registered.)
                    state: FAILED/
                    watch: file:/u/public/jboss/jboss-3.0.2/server/default/deploy/acaiis-service.xml
                    lastDeployed: 1031978115014
                    lastModified: 1031978114000
                    mbeans:
                    jboss.mq.destination:service=Topic,name=manager (state not available)
                    DefaultDomain:service=Scheduler (state not available)
                    ]MBeans waiting for classes:

                    MBeans waiting for other MBeans:
                    [ObjectName: DefaultDomain:service=Scheduler
                    state: NOTYETINSTALLED
                    I Depend On:
                    Depends On Me: ]
                    00:43:06,268 INFO [URLDeploymentScanner] Started
                    00:43:06,270 INFO [MainDeployer] Deployed package: file:/u/public/jboss/jboss-3.0.2/server/default/conf/jboss-service.xml
                    00:43:06,305 INFO [Server] JBoss (MX MicroKernel) [3.0.2 Date:200208271339] Started in 1m:36s:530ms

                    • 7. Re: MBean Deployment

                      I think I misunderstood the nature of the orignal
                      problem.

                      I think the problem has something to do this MBean
                      not getting registered.

                      Try moving your scheduler into a different
                      -service.xml

                      You should be getting an error message.

                      Do you implement preRegister() ?

                      Try looking in
                      server/default/log/server.log

                      Regards,
                      Adrian

                      • 8. Re: MBean Deployment

                        There is a bug in
                        org.jboss.mq.server.jmx.(Queue/DestinationSupport)

                        It adds the queue in start and removes it in
                        destroy.

                        This should be either
                        create/destroy or
                        start/stop

                        This explains the error you see, but it is not the
                        cause of your problem. It is just trying to remove
                        something that was never added.

                        Regards,
                        Adrian

                        • 9. Re: MBean Deployment
                          garyg

                          Great ... adding the mbean deployment code to a separate service file other than my service file where I declare all my queues/topics took away the problems of my queues/topics.