users@glassfish.java.net

Re: Start a transaction from client and propagate it to server

From: sankara rao bhogi <Sankara.Rao_at_Sun.COM>
Date: Wed, 18 Apr 2007 14:49:03 +0530

Legolas Woodland wrote:
> Hi
> Thank you very much.
> to explain more:
> We have our web services in a web application which is deployed into
> glasfish application server.
> so our web services are based on servlet if i am not mistaken.
> What i look to do is like:
> -lookup into application server using initialcontext and ..
> -retreive a user transaction from the JNDI?
> -start user transaction before invoking first web service
> -commit user transaction after calling second web service.
>

I suspect it wouldn't work for web services. The work in web services
wouldn't be part of the transactional scope of the client. It will work
if you replace the calls to webservices with EJB method calls, assuming
one of the Required, RequiresNew, Supports attributes are specified.

> I know that Enterprise pack support ws-tx but in our case we call all
> web services using DDI and we do not use enterprise pack to develop
> web services clients.
> Thanks
>
> On 4/18/07, *sankara rao bhogi* <Sankara.Rao_at_sun.com
> <mailto:Sankara.Rao_at_sun.com>> wrote:
>
> Legolas Woodland wrote:
> > HI
> > Thank you for reading my post
> > Here is my problem, please let me know if you have any tips or
> advice.
> > We have an standalone client running on remote machines (it is
> not ACC
> > or anything link that, its a simple command line tool)
> > we call several web services from this client, all of these web
> > services are in the same glassfish application server.
> > one web service insert data to DB1 using connection pool and
> datasource
> > another web service use jms server (sun mq) and send message to it .
> > now we want to support XA transaction between these two, do you
> have
> > any solution?
> > is it do-able to have XA transaction in web services?
>
> XA transactions from client to server are possible, if you are
> trying to
> invoke EJBs from the clients.
>
> WSTX supports transactions with in the web services. I have CCed
> Joe in
> this mail to clarify this specific scenario.
>
> regards
> sankar
> > Thanks
>
>
> --
> "The best insurance for tomorrow is the effective use of today."
> -- Why Smart People Do Dumb Things by Dr. Mortimer Feinberg and John
>
>


-- 
"The best insurance for tomorrow is the effective use of today.”
-- Why Smart People Do Dumb Things by Dr. Mortimer Feinberg and John