5 Replies Latest reply on Feb 7, 2008 11:19 AM by burrsutter

    [Oracle AQ] receive original javax.message.Message

    krzych_pl

      Hi

      I'm using org.jboss.soa.esb.oracle.aq.AQInitialContextFactory in my jms provider. In my service I need to pass original javax.message.Message object sent by Oracle to some other module. But inside my service I can only work on org.jboss.soa.esb.message.Message object. Is there any possibility to get original javax.message.Message inside my service??

      Thanks in advance

        • 1. Re: [Oracle AQ] receive original javax.message.Message
          krzych_pl

          Of course I want to receive javax.jms.Message.

          Sorry for that mistake

          • 2. Re: [Oracle AQ] receive original javax.message.Message
            burrsutter

            Interesting question and one that I've not tried before. However, use the following in your action chain:

             <action name="action2" class="org.jboss.soa.esb.actions.SystemPrintln">
             <property name="printfull" value="true"/>
             </action>
            


            Dig through the output and hopefully you will find what you need. I suspect the original javax.jms.Message is not available but you could reconstruct it from the ESB Message. Keep in mind that the ESB handles non-JMS message types (File, FTP, WS, HTTP, etc) so it needed a solution that allows for all of those types.


            • 3. Re: [Oracle AQ] receive original javax.message.Message
              krzych_pl

              I understand that. But in many solutions, there could be nessesary to use original type of "message" (also in such cases as WS, HTTP or even File or FTP). If original message is transformed into internal esb-message somewhere in provider, maybe providers should also contain some "untransform" method. In fact many of calls could be represented in some standarized way (like JMS in javax.jms.Message). Moreover many external libraries or even some service logics can process only standarized representation of messages because of using that logic (or libraries) in some different modules or components of whole system. Some of that components may not be based on JBoss so we can not demand that they will process JBossESB message types. In my opinion there should be some way (maybe some method in ESB internal message - it could even return only Object type) to transform message into original form.

              • 4. Re: [Oracle AQ] receive original javax.message.Message
                jpechanec

                Hi,

                if the message is serializable, well it should be when sent over wire :-), then you can use your own composer and store the original message in the message body or header.

                It is a little bit abusing of the composer mechanism, but if necessary...

                J.

                • 5. Re: [Oracle AQ] receive original javax.message.Message
                  burrsutter

                  Good suggestion. Check out the quickstart called scheduled_services for an example of how to build your own Composer so you have the original JMS message in any form that you like it.