On 7/5/06, Claudio Cumetti <[EMAIL PROTECTED]> wrote:
I have a container managed stateless session EJB that inserts a row into a database table using an XA Data Source. From within that same EJB, I want to be able to post a JBI message using ServiceMix and have that participate in the same XA transaction. Is that supported? Could you provide me with a how-to or snippet of code of how it's done?
Claudio, This depends on how you're developing your application actually. Are you defining a flow in ServiceMix and one of the endpoints is a Servlet fronting the EJB or are you simply looking to make a programmatic call from within your EJB? If you're looking to make the EJB an endpoint in a flow, I think the only way to do this currently would be to front the EJB with a Servlet. This would allow the EJB to be executed via HTTP and using HTTP allows for an endpoint to be defined in ServiceMix. An example of this type of client HTTP invocation is noted here: http://goopen.org/confluence/display/SM/HTTP#HTTP-ClientsideHTTPinvocation If you're interested in making a programmatic call from within your EJB, this can be done using the ServiceMix client API. Examples are provided here: http://goopen.org/confluence/display/SM/Pojo%20Support#POJOsupport-BeingevenmorePOJO There are also more examples of this here: http://servicemix.org/site/client-api.html Bruce -- perl -e 'print unpack("u30","D0G)[EMAIL PROTECTED]&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*" );' Apache Geronimo - http://geronimo.apache.org/ Apache ActiveMQ - http://incubator.apache.org/activemq/ Apache ServiceMix - http://incubator.apache.org/servicemix/ Castor - http://castor.org/
