[esb-java-dev] tomcat/war support

Ruwan Linton ruwan at wso2.com
Thu Aug 30 22:59:29 PDT 2007


Hmmm...

I thought vise versa would happen. Here is my explanation to this behavior.

Synapse gets the message through the SynapseMR, but because of the fact 
that synapse engages after the dispatch phase and there is an actual 
service in Axis2 to which that messages is coming, that message will get 
dispatched to the service and never comes to the SynapseMR. This is 
expected.

Solution to tackle this,

Well, I had a discussion with Sanjiva about this. If we need to support 
this, we need to provide a different module which will inject the 
message to the synapse environment through an Axis2 handler (not an MR) 
and gets back the message after mediation to the handler it self and 
gives the message back to the Axis2 handler chain (if Synapse has not 
drop the message). But most importantly this handler should come in the 
predispatch phase.

Limitations,

This module should not be globally engaged, because if we do so we can 
not add proxy services in normal (the one we have now) synapse module 
(if globally engaged messages coming to proxy service will also be 
mediated before dispatching to proxy). Obviously if the normal synapse 
env is not there in a particular Axis2 instance then it is OK to engage 
it globally.

Thoughts?

Thanks,
Ruwan.

Upul Godage wrote:
> I engaged synapse module to SimpleStockQuoteService with a simple 
> Synapse configuration with logging. When the client calls it gets the 
> response as usual.  But the Synapse log is not displayed as though 
> Synapse never exists.
>
> Upul
>
> On 8/30/07, *Sanjiva Weerawarana* <sanjiva at wso2.com 
> <mailto:sanjiva at wso2.com>> wrote:
>
>     Did you try to engage Synapse against an Axis2 service and see
>     whether you
>     could mediate the messages? That's the key thing we need to be
>     able to do!
>
>     Sanjiva.
>
>     Upul Godage wrote:
>     > Hi,
>     >
>     > I was able to run Synapse SNAPSHOT on Axis2 1.3 WAR on top of
>     Tomcat 5
>     > Servlet container. I have run some Synapse samples. Axis2
>     Version web
>     > service ran without any problems with Synapse deployed.
>     >
>     > What I did was,
>     > Deployed Axis2 1.3 WAR in Tomcat 5.
>     > In the exploded WAR,
>     > - added Synapse mar module.
>     > - module entry in axis2.xml
>     > - 4 Synapse jars + 2 Sandesha jars in axis2 WAR lib directory
>     > - Synapse configuration xml given as a system variable (-D...)
>     synapse.xml
>     > - Synapse home directory given as a system variable (-D...) for file
>     > locations when some samples needed files. e.g. WSDL file for
>     proxy service
>     >
>     > Upul
>     >
>     > On 8/30/07, *Upul Godage* <upulg.dev at gmail.com
>     <mailto:upulg.dev at gmail.com>
>     > <mailto:upulg.dev at gmail.com <mailto:upulg.dev at gmail.com>>> wrote:
>     >
>     >     Hi,
>     >
>     >     I was able to run Synapse SNAPSHOT on Axis2 1.3 WAR on top
>     of Tomcat
>     >     5 Servlet container. I have run some Synapse samples. Axis2
>     Version
>     >     web service ran without any problems with Synapse deployed.
>     >
>     >     What I did was,
>     >     Deployed Axis2 1.3 WAR in Tomcat 5.
>     >     In the exploded WAR,
>     >     - added Synapse mar module.
>     >     - module entry in axis2.xml
>     >     - 4 Synapse jars + 2 Sandesha jars in axis2 WAR lib directory
>     >     - Synapse configuration xml given as a system variable (-D...)
>     >     synapse.xml
>     >     - Synapse home directory given as a system variable (-D...)
>     for file
>     >     locations when some samples needed files. e.g. WSDL file for
>     proxy
>     >     service
>     >
>     >     Upul
>     >
>     >
>     >
>     >
>     >
>     >         On 8/30/07, *Asankha C. Perera* <asankha at wso2.com
>     <mailto:asankha at wso2.com>
>     >         <mailto: asankha at wso2.com <mailto:asankha at wso2.com>>> wrote:
>     >
>     >             Sanjiva
>     >             >  what I'm saying is that it should be possible for
>     someone
>     >             to use
>     >             >  Synapse/ESB as a regular old Axis2 module without
>     anything
>     >             extra! The
>     >             >  limitations you mention are part of Axis2 (and
>     any other
>     >             WS-* runtime
>     >             >  that uses regular servlets) too - and its
>     something users
>     >             are willing
>     >             >  to live with obviously (for some scenarios at least).
>     >             Upul looked into this today, but so far the response
>     from
>     >             Synapse did
>     >             not reach the actual client that sent the request to
>     >             Synapse. This
>     >             requires a bit of debugging to find out the root
>     cause.. I
>     >             will update
>     >             on this as soon as we know something.
>     >             >  I still don't understand why you're opposed to
>     just making
>     >             it work
>     >             >  right as a "regular" Axis2 module and simply
>     document all the
>     >             >  limitations it comes with!
>     >             No.. I am not opposed.. but I think the non-servlet
>     model is
>     >             better
>     >             suited.. maybe I am wrong. We will certainly support
>     both
>     >             options anyway
>     >             for 1.1 release, and as soon as Upul figures out
>     what needs
>     >             to be done
>     >             we could discuss specifics
>     >             >  Oh BTW have you guys made progress with moving
>     the NIO
>     >             transport to
>     >             >  Axis2? Axis2 needs that too for sure.
>     >             Yep.. this went into the Axis2 1.3 release
>     >
>     >             thanks
>     >             asankha
>     >
>     >             _______________________________________________
>     >             Esb-java-dev mailing list
>     >             Esb-java-dev at wso2.org <mailto:Esb-java-dev at wso2.org>
>     <mailto: Esb-java-dev at wso2.org <mailto:Esb-java-dev at wso2.org>>
>     >             http://wso2.org/cgi-bin/mailman/listinfo/esb-java-dev
>     >             < http://wso2.org/cgi-bin/mailman/listinfo/esb-java-dev>
>     >
>     >
>     >
>     >
>     >
>     >
>     ------------------------------------------------------------------------
>     >
>     > _______________________________________________
>     > Esb-java-dev mailing list
>     > Esb-java-dev at wso2.org <mailto:Esb-java-dev at wso2.org>
>     > http://wso2.org/cgi-bin/mailman/listinfo/esb-java-dev
>     <http://wso2.org/cgi-bin/mailman/listinfo/esb-java-dev>
>
>     --
>     Sanjiva Weerawarana, Ph.D.
>     Founder, Chairman & CEO; WSO2, Inc.; http://www.wso2.com/
>     email: sanjiva at wso2.com <mailto:sanjiva at wso2.com>; cell: +94 77
>     787 6880; fax: +1 509 691 2000
>
>     "Oxygenating the Web Service Platform."
>
>     _______________________________________________
>     Esb-java-dev mailing list
>     Esb-java-dev at wso2.org <mailto:Esb-java-dev at wso2.org>
>     http://wso2.org/cgi-bin/mailman/listinfo/esb-java-dev
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Esb-java-dev mailing list
> Esb-java-dev at wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/esb-java-dev
>   





More information about the Esb-java-dev mailing list