11 Replies Latest reply on Nov 3, 2010 10:28 AM by mmusgrov

    Create a queue by deploying a service.xml file to jboss

    eduarm76

      Hi,

       

      We are in the process of evaluating Blacktie as a replacement for Tuxedo, so my first task is to  to create a number of simple queues services (ala Tuxedo /Q) inside Blacktie.

       

      A simple solution seems to be defining these services inside the jboss instance using a service.xml file (this is cover in the JIRA issue: https://jira.jboss.org/browse/BLACKTIE-304)  , this functionality should be available in the upcoming 2.0.0.CR1 release.

       

      Is this actually the best/recommended way of doing this?

      If so, can we expect the docummentation of this new functionality soon?

       

      And finally, is there any other way of achiving this using the current version?

       

      Thanks.

        • 1. Re: Create a queue by deploying a service.xml file to jboss
          tomjenkinson

          Hi Eduardo,

           

          Firstly, thanks for your interest in BlackTie!

           

          You are right that in CR1 we will be delivering functionality to allow queues to be available outside the lifespan of the services which consume from them. We aim to deliver this functionality on the 30th June, hopefully this will be soon enough for you to continue your evaluation.

           

          Unfortunately this is not really possible with the current version as there is conflicting configuration which may reap BlackTie queues without consumers.

           

          Hope this helps,

          Tom

          • 2. Re: Create a queue by deploying a service.xml file to jboss
            eduarm76

            Thanks a lot Tom, we'll wait for CR1. Is there any new release date for this version?

            • 3. Re: Create a queue by deploying a service.xml file to jboss
              tomjenkinson

              Hi Eduardo,

               

              Thanks for getting back to us. You can find the roadmap details (including release dates) in our Jira instance here: https://jira.jboss.org/browse/BLACKTIE#selectedTab=com.atlassian.jira.plugin.system.project%3Aroadmap-panel

               

              CR1 is scheduled for release on the 31st July.

               

              Hope this is OK for you,

              Tom

              • 4. Re: Create a queue by deploying a service.xml file to jboss
                tomjenkinson

                Hi Eduardo,

                 

                Just so you know, we just released 2.0.0.Final which is suitable for the requirement you expressed.

                 

                All the best,

                Tom

                • 5. Re: Create a queue by deploying a service.xml file to jboss
                  eduarm76

                  Hi Tom,

                   

                  And thanks for the alert, is there is any update in the documentation about how to  implement this?

                   

                  By the way we are  trying to be present at your conference in Berlin, it will be great if we could disscuss our migration scenario with you.

                   

                  Regards,

                  Eduardo.

                  • 6. Re: Create a queue by deploying a service.xml file to jboss
                    tomjenkinson

                    Hi Eduardo,

                     

                    I have just created a Jira to add some more documentation to our wiki for this: https://jira.jboss.org/browse/BLACKTIE-333

                    However, in the meantime, we did already add an example for this to our release, you can see this under:

                    <BLACKTIE_BIN_DIR>/examples/xatmi/queues

                     

                    It will be great to meet and discuss your migration scenario, hopefully you will also find my presentation useful in that regard!

                     

                    Tom

                    • 7. Re: Create a queue by deploying a service.xml file to jboss
                      mmusgrov

                      I have created a short article on the JBoss wiki describing this feature:

                      http://community.jboss.org/wiki/DecouplingXATMIservicesandclientsusingaqueuingpattern

                      • 8. Re: Create a queue by deploying a service.xml file to jboss
                        eduarm76

                        Hi Michael,

                         

                        I'm trying to run the xatmi/queues example, and after reading your wiki Article I did the following:

                         

                        1. Deploy the file $JBOSS_HOME/server/all/deploy/BTR_TestOne.xml (also without the extension), with the same content as in the wiki.
                        2. Start JBOSS with $JBOSS_HOME/bin/run.sh -c all -b $JBOSSAS_IP_ADDR
                        3. Run the the client with ./client put 2 0 9

                         

                        I get the following error, in the client:

                             2010-11-01 17:57:29,734 [0x7f54d853f760] INFO  (AtmiBrokerLogc           :66  ) - tpacall error: -1 6

                         

                        In the server:

                        javax.jms.JMSException: There is no administratively defined queue with name:BTR_TestOne
                            at org.jboss.jms.server.endpoint.ServerSessionEndpoint.createQueue(ServerSessionEndpoint.java:299)
                            at org.jboss.jms.server.endpoint.advised.SessionAdvised.org$jboss$jms$server$endpoint$advised$SessionAdvised$createQueue$aop(SessionAdvised.java:105)
                            at org.jboss.jms.server.endpoint.advised.SessionAdvised$createQueue_6431069199924553036.invokeTarget(SessionAdvised$createQueue_6431069199924553036.java)
                            at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:111)
                            at org.jboss.jms.server.container.ServerLogInterceptor.invoke(ServerLogInterceptor.java:105)
                            at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
                            at org.jboss.jms.server.endpoint.advised.SessionAdvised.createQueue(SessionAdvised.java)
                            at org.jboss.jms.wireformat.SessionCreateQueueRequest.serverInvoke(SessionCreateQueueRequest.java:74)
                            at org.jboss.jms.server.remoting.JMSServerInvocationHandler.invoke(JMSServerInvocationHandler.java:143)
                            at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:891)
                            at org.jboss.remoting.transport.local.LocalClientInvoker.invoke(LocalClientInvoker.java:106)
                            at org.jboss.remoting.Client.invoke(Client.java:1724)
                            at org.jboss.remoting.Client.invoke(Client.java:629)
                            at org.jboss.remoting.Client.invoke(Client.java:617)
                            at org.jboss.jms.client.delegate.DelegateSupport.doInvoke(DelegateSupport.java:189)
                            at org.jboss.jms.client.delegate.DelegateSupport.doInvoke(DelegateSupport.java:160)
                            at org.jboss.jms.client.delegate.ClientSessionDelegate.org$jboss$jms$client$delegate$ClientSessionDelegate$createQueue$aop(ClientSessionDelegate.java:319)
                            at org.jboss.jms.client.delegate.ClientSessionDelegate$createQueue_6431069199924553036.invokeTarget(ClientSessionDelegate$createQueue_6431069199924553036.java)
                            at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:111)
                            at org.jboss.jms.client.container.FailoverValveInterceptor.invoke(FailoverValveInterceptor.java:92)
                            at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:86)
                            at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
                            at org.jboss.jms.client.container.ClosedInterceptor.invoke(ClosedInterceptor.java:170)
                            at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:86)
                            at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
                            at org.jboss.jms.client.delegate.ClientSessionDelegate.createQueue(ClientSessionDelegate.java)
                            at org.jboss.jms.client.JBossSession.createQueue(JBossSession.java:250)
                            at org.codehaus.stomp.jms.StompSession.convertDestination(StompSession.java:101)
                            at org.codehaus.stomp.jms.StompSession.sendToJms(StompSession.java:79)
                            at org.codehaus.stomp.jms.ProtocolConverter.onStompSend(ProtocolConverter.java:280)
                            at org.codehaus.stomp.jms.ProtocolConverter.onStompFrame(ProtocolConverter.java:146)
                            at org.codehaus.stomp.tcp.TcpTransport.run(TcpTransport.java:133)
                            at java.lang.Thread.run(Thread.java:662)

                         

                        Maybe I'm missing something, but the everything else (all other examples) seems to be running ok.

                        Any idea?

                        • 9. Re: Create a queue by deploying a service.xml file to jboss
                          tomjenkinson

                          Hi Eduardo,

                           

                          The file in step 1 should be named:

                          $JBOSS_HOME/server/all/deploy/TestOne-service.xml

                          To be honest, it could be named anything that ends in "-service.xml", only files named -service.xml will be picked up.

                           

                          Hope this helps!

                          Tom

                          1 of 1 people found this helpful
                          • 10. Re: Create a queue by deploying a service.xml file to jboss
                            eduarm76

                            Hi Tom,

                             

                            Thanks for the clarification, after adding the "-service.xml" sufix I'm now able to see my new queue in the Admin interface.

                             

                            So now into my next problem, in order to test my new queue service I'm taking the following stepts:

                             

                            1.Verify that the queue is Available in the JBOSS interface (Name:/queue/BTR_Qtrace Run State: RUNNING Status:Available)

                            2. Duplicate the examples/xatmi/queues into my own directoy examples/xatmi/queues-ctbto

                            3. Modify the queues.c source file. Changing the Service definition to :

                                static char* SERVICE = (char*) "Qtrace";

                            4. Modify btconfig.xml change Service name to Qtrace:

                                <SERVICE name='Qtrace' externally-managed-destination='true' size="1" />

                            5. Build client with:

                               generate_client -Dclient.includes=queues.c

                            6. Test client using:

                                ./client put 2 4 8

                             

                            The funny thing is that the message count in /queue/BTR_Qtrace is still 0, but  /queue/BTR_TestOne is actually growing at the right value.

                            So I guess my client is still connecting at the example queue, even after the changing all the source files.

                             

                            Am I missing something?

                            • 11. Re: Create a queue by deploying a service.xml file to jboss
                              mmusgrov

                              Hi

                               

                              The function send_one() in queues.c is sending the message to the queue TestOne. Change it to Qtrace.