1 2 Previous Next 22 Replies Latest reply on Feb 22, 2008 4:43 PM by starksm64

    JMS Topics/Queues in ProfileService

      I have deployed a bunch of sample Topics and Queues, I tried to find them through the ManagementView.getComponentsForType where the ComponentType was "JMSDestination" for the parent type and "Queue" or "Topic" type. However, the method returned null.

      I also looked for the destinations-service.xml in the list of ManagedDeployments through the ManagementView.getDeploymentNames() and did not see it in the list of deployments.

      Am I using the incorrect ComponentType, or does this still need to be implemented?

      Thanks

        • 1. Re: JMS Topics/Queues in ProfileService

          OK, I see for messaging in the deploymentNames collection it is pointing to the directory and not a specific file. But I would expect to see any files in that directory that has Topics or Queues defined would get their own ManagedDeployment object and that name of that object still appear in the deploymentNames collection.

          And this is odd, sometimes it sees templates for Queues and Topics and sometimes it doesn't.

          Sometimes it discovers the QueueServiceMO and sometimes it doesn't. Still wasn't discovering the Topics and Queues I defined in the destinations-service.sml

          The ProfileServiceUnitTestCase is passing its testJMSDestinations method.

          I will look more into this, and post updates.

          Thanks

          • 2. Re: JMS Topics/Queues in ProfileService

            And the UnitTestCase passes because it has ManagedComponent objects for just QueueServiceMO, but nothing defined in the destinations-service.xml (I take that back, see later in this post)

            If I look at the QueueServiceMO ManagedComponent object, the value for its owner ManagedDeployment shows
            vfsfile:/C:/JBossServers/jboss-5.0.0.Beta4.marked/server/default/deploy/messaging/destinations-service.xml

            Also looking at the ManagedComponents returned by ManagementView.getComponentsByType, is that I am getting 4 Components, 2 for ExpiryQueue and 2 for DLQ, however in all four cases when you call getName() it returns "QueueServiceMO" (which is what I first saw to start this post. ) whereas the componentName shows "jboss.messaging.destination:name=ExpiryQueue,service=Queue"

            I think I am starting to confuse myself.

            Thanks

            • 3. Re: JMS Topics/Queues in ProfileService

              I also see the problem of why all the other Topics and Queues that I defined in the destinations-service.xml don't get found.

              They don't have
              @org.jboss.system.deployers.managed.ManagementObjectClass(code=org.jboss.jms.server.destination.QueueServiceMO)

              No the following question arises. So this is a tag that needs to be put into every Queue or Topic you want managed. Why wouldn't that be automatic or default, so that users don't have to remember that they must have in there. Is there a case where you wouldn't want it to show up in the ProfileService?

              Thanks

              • 4. Re: JMS Topics/Queues in ProfileService
                starksm64

                Yes, the ManagementObjectClas annotation is required because the mbean itself is not annotated with the management information.

                The names are incorrect in beta4. I fixed that last week. Still have to create a patch for beta4.

                • 5. Re: JMS Topics/Queues in ProfileService
                  starksm64

                   

                  "bytor99999" wrote:

                  No the following question arises. So this is a tag that needs to be put into every Queue or Topic you want managed. Why wouldn't that be automatic or default, so that users don't have to remember that they must have in there. Is there a case where you wouldn't want it to show up in the ProfileService?

                  The template should be creating managed destinations, so yes, those should have the annotation.

                  • 6. Re: JMS Topics/Queues in ProfileService

                     

                    "scott.stark@jboss.org" wrote:
                    Yes, the ManagementObjectClas annotation is required because the mbean itself is not annotated with the management information.

                    The names are incorrect in beta4. I fixed that last week. Still have to create a patch for beta4.


                    If I download the latest build from Hudson, will the fix be there?

                    Thanks

                    • 7. Re: JMS Topics/Queues in ProfileService
                      starksm64

                      Its still sitting on my laptop. I'll check it in later tonight.

                      • 8. Re: JMS Topics/Queues in ProfileService

                        Is there a way we can hide the xml annotation tag in say the Jaxb object that reads the xml file, and not write it to the xml file either.

                        I can just see the Forum posts (just like mine here), Support cases opening up for AS and the console already.

                        "How come I don't see my Queue/Topic in the console?"
                        "Well, did you remember, when you copied it from AS 4.x xml into AS 5 to include that annotation tag?"
                        "What is that? I didn't know that." or "Oh, I forgot"


                        :)

                        • 9. Re: JMS Topics/Queues in ProfileService
                          starksm64

                          I suppose there a few ways we could do this, add the annotation at the server level to apply to all mbeans in the deployment, an aspect to augment the destination mbeans, ...

                          Its just the sar deployer that is parsing the jms destinations, so it cannot be done generally.

                          • 10. Re: JMS Topics/Queues in ProfileService

                            Here
                            http://www.jboss.com/index.html?module=bb&op=viewtopic&t=130253

                            is why I was getting null value returned from getManagedComponentForType() method.

                            • 11. Re: JMS Topics/Queues in ProfileService

                               

                              "scott.stark@jboss.org" wrote:
                              Its still sitting on my laptop. I'll check it in later tonight.


                              Has this been updated? I am unable to create a new Destination through the template, not sure if it is this fix, or about the naming.

                              Thanks

                              • 12. Re: JMS Topics/Queues in ProfileService
                                starksm64

                                Sorry, I had to go to a jcp meeting down at Sun today, so lost yesterday to travel. I'll start working on it again tonight on my way home. If I don't get it tonight, it will be done tomorrow.

                                • 13. Re: JMS Topics/Queues in ProfileService
                                  starksm64

                                  I finally got it checked in and the JmsDestinationUnitTestCase are passing. These need to be expanded for stats/ops still.

                                  • 14. Re: JMS Topics/Queues in ProfileService

                                    Thank you so much Scott.

                                    Speaking of stats? Will the destinations return stat values? Right now in DS I am getting null when I call getValue() in the ManagedProperty, but was hoping it was DS specific and destinations might have values.

                                    Thanks

                                    1 2 Previous Next