7 Replies Latest reply on Aug 24, 2001 3:14 AM by Peter Antman

    Need Help! Transactions & JMS

    Michael Briggs Newbie

      I have reviewed the new documentation on using JMS as resource. The documentation and the associated examples do not address subscribing.

      I can publish (I beleive transactionally) using the configuration described in the documentation, however, I can not seem to have a client (in another VM) receive messages.

      If I use a simplier configuration (not configuring JMS as a resource), everything works fine, except the messages are not transactional.

      I am sure this is a mis-configuration issue on my part, I just need some help as I have tried everything under the sun to try and make this work.

      I am using v. 2.2.4 and not using MDBs.
      The client is not a bean and running in a seperate VM on the same machine.

      Thanks for any help.

      -Michael

        • 1. Re: Need Help! Transactions & JMS
          Peter Antman Expert


          > I am using v. 2.2.4 and not using MDBs.
          > The client is not a bean and running in a seperate VM
          As said in the manual JMS RA does not work with 2.2.x.

          //Peter

          • 2. Re: Need Help! Transactions & JMS
            Michael Briggs Newbie

            Sorry, I should have said 2.4.x.

            • 3. Re: Need Help! Transactions & JMS
              Peter Antman Expert

              Ok, I have to review what you actually wrote to start with. Is the following conditions met:

              - JBoss 2.4.x
              - JMS RA used from with inside a session or entity bean
              - send or sync receive only.

              If not, it will not work. JMS-RA is for EJB:s only, it is not possible (or meaningfull) to use it ouside of the JBoss containers. Is that what you are trying to do.

              Subscribing, on the other hand, should allways be done with MDB, when working inside JBoss.

              //Peter

              • 4. Re: Need Help! Transactions & JMS
                Michael Briggs Newbie

                Yes we are using JBoss 2.4.x
                Yes JMS RA used from within an Entity bean to publish message.

                > - send or sync receive only.
                I am not sure what you are asking. Please explain.

                The subscriber is a java client application outside the server VM.

                The general scenario we are trying to accomplish with JBoss is this:
                When entity bean gets changed it publishes a JMS message (sort of like a Database trigger). Since the message is published in the entity bean's setter methods, the message should only be truly published when the transaction commits. With the configuration described in the manual, this appears to work. However, we have no way of verifying this since our subscribers are unable to receive messages. As stated before, the manual does not address subscribers in this configuration.

                Thanks for you help!

                -Michael

                • 5. Re: Need Help! Transactions & JMS
                  Peter Antman Expert


                  > However, we have no way of verifying this since our
                  > subscribers are unable to receive messages. As
                  > stated before, the manual does not address
                  > subscribers in this configuration.
                  >
                  Well, yes it is. Since the subscriber would be a standalone JMS client as covered in the part of the manual that treats normal JMS.

                  If you have a standard JMS subscriber that subscribed to the same destination your bean is publishing to it should work.

                  If not, there is a bug lurking somewhere. Have you turned debugging on in JBoss or looked into log/server.log?

                  //Peter
                  > Thanks for you help!
                  >
                  > -Michael

                  • 6. Re: Need Help! Transactions & JMS
                    Michael Briggs Newbie

                    Peter,
                    As I stated in the original post, 'normal' configuration of JMS, messaging works fine, albeit non-transactionally. I understand this configuration is covered in the manual.
                    However, with JMS setup as a resource the subscriber is not covered. If this configuration does not affect the subscriber, then the documentation should probably mention it.

                    If the subscriber is unaffected by the publisher using JMS as a resource, and the subscriber is not receiving messages, then I must assume there is a bug.

                    You mention turning on debugging. Forgive me for my ignorance, as I am very new to Jboss and open-source, how do I turn debugging on?

                    And regarding the server.log, what information am I looking for?

                    Thanks again for your help!

                    -Michael

                    • 7. Re: Need Help! Transactions & JMS
                      Peter Antman Expert

                      > Peter,

                      > If the subscriber is unaffected by the publisher
                      > using JMS as a resource, and the subscriber is not
                      > receiving messages, then I must assume there is a
                      > bug.

                      Yes, now we are on. How you publish a message to a destination has nothing to do with how you get it from the destination.

                      >
                      > You mention turning on debugging. Forgive me for my
                      > ignorance, as I am very new to Jboss and open-source,
                      > how do I turn debugging on?

                      conf/deafult/log4j.properties
                      log4j.appender.Console.Threshold=DEBUG

                      >
                      > And regarding the server.log, what information am I
                      > looking for?

                      If you look, you will see.

                      Otherwise you will have to share your code and configuration.

                      //Peter
                      >
                      > Thanks again for your help!
                      >
                      > -Michael