1 2 Previous Next 22 Replies Latest reply on Aug 27, 2009 10:41 AM by thammoud

    Integration with JBOSS 4.x

    thammoud

      From the docs:


      * Seamless integration into JBoss Application Server
      HornetQ can easily be installed as the JMS provider in JBoss Application Server 5.0 or later.

      Simple instructions are provided in the distribution showing you how to do this. Later releases of HornetQ will be the default JMS provider in JBoss Application Server 5.0, i.e. it will be pre-installed and you won't have to install anything manually.

      * JCA adaptor

      HornetQ provides a fully functional JCA adaptor that can be used in any JEE compliant application server to integrate HornetQ so it can be used for consuming messages via Message Driven Beans (MDBs), or for sending messages in Enterprise JavaBeans or servlets.


      So can we integrate this with JBOSS 4.x?? If so, do you have any docs to do this? This reads like a great product that overcomes most if not all the shortcomings of 1.x and JM. Keep up the fantastic work.



        • 1. Re: Integration with JBOSS 4.x
          ataylor

          No, HornetQ is only tested against JBoss 5.0 or later as detailed.

          • 2. Re: Integration with JBOSS 4.x
            thammoud

            Any plans to integrate it with 4.x given that the vast majority of your users are on 4.x still? The migration to 5.x is very painful.

            • 3. Re: Integration with JBOSS 4.x
              leosbitto

               

              "thammoud" wrote:
              Any plans to integrate it with 4.x given that the vast majority of your users are on 4.x still? The migration to 5.x is very painful.


              Well, considering that "HornetQ provides a fully functional JCA adaptor that can be used in any JEE compliant application server" and "JBoss AS 4.x is a JEE compliant application server" is seems that it should simply work. However, I have to admit that I have not tested the HornetQ JCA adaptor in JBoss AS 4.x. I have successfully tested working with HornetQ from JBoss 4.2.3.GA by simply using the XAConnectionFactory and pooling the resources (connections, sessions, producers, consumers) appropriately, but that did not involve any EJB (I use custom MBeans services) which might make it inappropriate for most of the EJB-loving JEE folks...

              • 4. Re: Integration with JBOSS 4.x
                timfox

                Yes it should work

                • 5. Re: Integration with JBOSS 4.x
                  thammoud

                  I will try it today and provide you with feedback. Thanks.

                  • 6. Re: Integration with JBOSS 4.x
                    thammoud

                    Ok. So far I have done the following:


                    1) Modified the login-config to include Hornet's policy and copied over the user and role properties to the proper place
                    2) Copied hornetq-ra.rar over jms-ra.rar
                    3) Deleted hajndi-jms-ds.xml
                    4) Copied clustered/jms-ds.xml to deploy/jms-ds.xml
                    5) Deleted anything with existing jboss messaging and activemq (The whole idea after all)

                    Started server and got:


                    07:06:53,763 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jms-ra.rar
                    07:06:53,841 ERROR [STDERR] Aug 27, 2009 7:06:53 AM org.hornetq.core.logging.Logger info
                    INFO: HornetQ resource adaptor started
                    


                    The topics did not start since they are declared (probably an issue) in the the following format. For example:

                     <mbean code="org.jboss.jms.server.destination.TopicService" name="jboss.messaging.destination:service=Topic,name=UserManager"
                     xmbean-dd="xmdesc/Topic-xmbean.xml">
                     <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
                     <depends>jboss.messaging:service=PostOffice</depends>
                     <attribute name="Clustered">true</attribute>
                     </mbean>
                    


                    I am getting dependency errors on ServerPeer and PostOffice. We have all the destinations in a sar file. Can you please provide a sample Topic and Queue examples of declaring these in the new format?

                    Thanks

                    • 7. Re: Integration with JBOSS 4.x
                      ataylor

                      I'm looking at this as we speak. The main issue is that HornetQ is completely pojo'ified, i.e it has no mBeans so it is deployed via the micro container which is the kernel inside jboss 5.x.

                      An alternative would be to have the HornetQ running standalone and configure the JCA adapter to consume its messages remotely or do you want complete integration.

                      Give me a day or so to see what i can come up with.

                      • 8. Re: Integration with JBOSS 4.x
                        timfox

                        The goal is not to run HornetQ inside JBoss AS 4.x.

                        The goal is to configure the JCA adaptor to talk to an external HornetQ server, so MBeans etc in JBoss AS 4.2 can be served.

                        This should be easy to configure.

                        • 9. Re: Integration with JBOSS 4.x
                          thammoud

                          For performance reasons, we need to be able to run all in the same container with some remote clients. So something that can work with 4.x will be greatly appreciated.

                          One more thing, I am getting a bit confused with the JCA adapter. I am assuming that the in vm setting in the ra.xml is how objects in the same vm will take to the adapter.

                          I need to setup connectors/acceptors for for remote clients. From the docs, I will need to do that using hornetq-configuration.xml. I dropped a malformed one in the deploy directory to see if it is being used and it did not look like it was being used.

                          Thanks

                          • 10. Re: Integration with JBOSS 4.x
                            ataylor

                             

                            For performance reasons, we need to be able to run all in the same container with some remote clients. So something that can work with 4.x will be greatly appreciated.


                            Since HornetQ is not built on MBeans this won't be possible, HornetQ requires the microcontainer to deploy which is only available in JBoss 5.x

                            One more thing, I am getting a bit confused with the JCA adapter. I am assuming that the in vm setting in the ra.xml is how objects in the same vm will take to the adapter.


                            Since HornetQ will be running remotely you obviously won't be able to use th einvm transport.

                            • 11. Re: Integration with JBOSS 4.x
                              timfox

                               

                              "thammoud" wrote:
                              For performance reasons, we need to be able to run all in the same container with some remote clients. So something that can work with 4.x will be greatly appreciated.

                              One more thing, I am getting a bit confused with the JCA adapter. I am assuming that the in vm setting in the ra.xml is how objects in the same vm will take to the adapter.


                              No, the JCA adaptor instance always lives in the same VM as your MDBs, EJBs etc.

                              The in vm setting transport is used when the *jca adaptor* is talking to a HornetQ instance in the same VM too.

                              There's a nice diagram in the user manual that shows this.


                              • 13. Re: Integration with JBOSS 4.x
                                thammoud

                                Tim, that is exactly what I thought. Now, assuming that, how do I define connectors/acceptors for the remote clients. I am assuming that I will need to define these in hornetq-configuration.xml file. I tired doing that, but the file seems to be ignored so I must be doing something wrong.

                                • 14. Re: Integration with JBOSS 4.x
                                  ataylor

                                  How are you staring HornetQ?

                                  1 2 Previous Next