You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fx-dev@ws.apache.org by mi...@bt.com on 2005/09/15 10:59:44 UTC

Kandula interop sample - run transaction manger from service

Hello,

 

Kandula interop sample works fine... however what about when I need to
start the whole transaction stuff not from the client but from the
service? 

 

Let's assume service (call it Initiator) that contains functionality of
InteropPortTypeRPCServiceTestCase.java from the sample (starts
transaction manager, activate and register within coordinator service).
This service invokes InteropService (like in the sample) and if
transactions handlers within these services are deployed correctly,
coordination context from Initiator should be passed to InteropService
in the message header and initiates registration within the same
activity. My trouble is that Transaction tx = tm.getTransaction() called
from TransactionHandler while invoked refers to null. Where's the
difference between interop sample and example described above?

 

Please correct me if the idea using transaction manager like in the
sample is wrong or if there is more straightforward way how to get
described functionality.

 

 

Many thanks

Michal Burian

 


Re: Kandula interop sample - run transaction manger from service

Posted by Thilina Gunarathne <cs...@gmail.com>.
Hi Michal,
When somebody starts and registers for a activity, Kandula associates the 
trasaction to the executing thread (using a thread local variable). 

 tm.getTransaction()

The above method basically looks for the transaction in the thread and 
returns it to the caller (handler ).

I'm getting the feeling that this thread issue has to do something with your 
problem. just check whether the handler runs on a seperate thread.....

~Thilina



On 9/15/05, michal.burian@bt.com <mi...@bt.com> wrote:
> 
>  Hello,
> 
>  Kandula interop sample works fine… however what about when I need to 
> start the whole transaction stuff not from the client but from the service? 
> 
>  Let's assume service (call it Initiator) that contains functionality of InteropPortTypeRPCServiceTestCase.java from the sample (starts transaction manager, activate and register within coordinator service). This service invokes InteropService (like in the sample) and if transactions handlers within these services are deployed correctly, coordination context from Initiator should be passed to InteropService in the message header and initiates registration within the same activity. My trouble is that Transaction tx = tm.getTransaction() called from TransactionHandler while invoked refers to null. Where's the difference between interop sample and example described above?
> 
>  Please correct me if the idea using transaction manager like in the 
> sample is wrong or if there is more straightforward way how to get described 
> functionality.
> 
>   Many thanks
> 
> Michal Burian
> 
>  


-- 
"May the SourcE be with u" 
http://www.bloglines.com/blog/thilina 
http://webservices.apache.org/~thilina/

Re: Kandula interop sample - run transaction manger from service

Posted by Thilina Gunarathne <cs...@gmail.com>.
Hi Michal,
When somebody starts and registers for a activity, Kandula associates the 
trasaction to the executing thread (using a thread local variable). 

 tm.getTransaction()

The above method basically looks for the transaction in the thread and 
returns it to the caller (handler ).

I'm getting the feeling that this thread issue has to do something with your 
problem. just check whether the handler runs on a seperate thread.....

~Thilina



On 9/15/05, michal.burian@bt.com <mi...@bt.com> wrote:
> 
>  Hello,
> 
>  Kandula interop sample works fine… however what about when I need to 
> start the whole transaction stuff not from the client but from the service? 
> 
>  Let's assume service (call it Initiator) that contains functionality of InteropPortTypeRPCServiceTestCase.java from the sample (starts transaction manager, activate and register within coordinator service). This service invokes InteropService (like in the sample) and if transactions handlers within these services are deployed correctly, coordination context from Initiator should be passed to InteropService in the message header and initiates registration within the same activity. My trouble is that Transaction tx = tm.getTransaction() called from TransactionHandler while invoked refers to null. Where's the difference between interop sample and example described above?
> 
>  Please correct me if the idea using transaction manager like in the 
> sample is wrong or if there is more straightforward way how to get described 
> functionality.
> 
>   Many thanks
> 
> Michal Burian
> 
>  


-- 
"May the SourcE be with u" 
http://www.bloglines.com/blog/thilina 
http://webservices.apache.org/~thilina/