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 Dasarath Weeratunge <dw...@purdue.edu> on 2005/11/23 06:28:20 UTC

Re: kandula basics

Quoting Andrea Di Vincenzo <an...@studio.unibo.it>:

> Hi Dasarath,
> 
> Of course I'm interested in obtaining a copy of the EWS documentation! It 
> would be useful for my master thesis.

OK.

Thilina, could you please request a copy of the EWS project from the dept...

> 
> Actually I'm reading the source code of Kandula. I find it very interesting.
> 
> There's only one thing that is not very clear to me. I refer to the scenario
> 
> of Transaction Inflow. Let's say that an application invokes two different 
> web service operations hosted by the same remote domain. So two messages 
> arrive at this domain containing the same context.
> 
> On the first invocation, after the context has been imported and a local 
> branch has been created, the TransactionHandler asks the transaction manager
> 
> to associate the new local transaction with the current thread. Right?

Correct.

> 
> On the second invocation a local transaction corresponding to the context is
> 
> detected, so there's no need to create a new local transaction. But for the 
> work of the ws operation invoked to be done in the scope of the same local 
> transaction already existing, the thread serving this second invocation also
> 
> should be associated with the local transaction. Right?

Correct.

> 
> If I didn't make mistakes till now, my question is:
> is the underlying Transaction Manager capable of managing multiple threads 
> working in the scope of the same transaction?

This has not been tested unfortunately.

Still if it ever becomes a problem we can always create a new transaction for 
the second (or any subsequent) invocation(s) if the previous one is being used 
by another thread. Since the two local transactions are two branches of one 
global transaction the end result should be the same. If one of the local tx 
were to rollback the other will too when the global tx is terminated, etc. 
However, this is more to do with the actual implementation of the transaction 
manager than the concept. We may also need to consider the fact that web 
services are stateless here.

Also, consider the following scenario. EJB1 and EJB2 are in 2 domains. EJB1 
calls EJB2. Then EJB1 calls WS2 which calls EJB2 (JSR 109). WS2 is in the same 
domain as EJB2. So the tx context of EJB1 gets propagated to domain 2 twice: 
once through RMI/JRMP and then again via ws-tx. The two invokations create two 
branches in domain 2. In this case there is no way for us to recognize that 
there is a branch in domain 2 that corresponds to tx context of EJB1 already 
when the second invokation is made (regardless of in which order they happen.) 
Yet like before this is not a problem-- at least to my knowledge:-)

> 
> Hope I didn't misunderstand too many things. I'm relatively new to 
> transactions.

there is a first time for everything:-)

thanks,
--dasarath

> 
> Thanks in advance.
> Andrea
> 
> 
> ----- Original Message ----- 
> From: "Dasarath Weeratunge" <dw...@purdue.edu>
> To: "Andrea Di Vincenzo" <an...@studio.unibo.it>
> Cc: <ka...@ws.apache.org>
> Sent: Tuesday, November 22, 2005 11:55 PM
> Subject: Re: kandula basics
> 
> 
> > Quoting Andrea Di Vincenzo <an...@studio.unibo.it>:
> >
> >> Hi Dasarath,
> >>
> >> I have found very useful the documentation at:
> >>
> >>
> >
> 
http://svn.apache.org/repos/asf/webservices/kandula/branches/Kandula_1/src/html
> > /ws-tx.htm
> >
> > I'm sorry, I forgot that this may still be in the svn.
> >
> >>
> >> Furthermore, reading it I feel how if it were part of a larger document. 
> >> For
> >> example I read:
> >>
> >> "...Client Axis Engine calls it's invoke method on request flow [20]... "
> >>
> >> What does [20] refers to?
> >
> > EWS (http://ws.apache.org/ews/) and Kandula were developed together at U 
> > of
> > Moratuwa, Sri Lanka and above documentation relates to this initial work. 
> > (I
> > may be able to get a copy of this if you are interested.)
> >
> > The two projects together provide a JSR 109 implementation that also 
> > handles
> > propagation of security and transaction contexts along services 
> > invokations
> > from WS to J2EE and vice-versa.
> >
> >> Do you know why it is not in the architecture guide page of the web site?
> >
> > Kandula has two parts: a ws-tx implementation and a bridge that handles
> > transaction propagation between J2EE and WS. Initially we thought of only
> > having the ws-tx implementation in Kandula and moving the bridging code to
> > EWS. That's why the second half of the documentation is not in the
> > architecture guide of Kandula.
> >
> > thanks,
> > --dasarath
> >
> >
> >
> >>
> >> Best Regards
> >> Andrea
> >>
> >> ----- Original Message ----- 
> >> From: "Dasarath Weeratunge" <dw...@purdue.edu>
> >> To: "Andrea Di Vincenzo" <an...@studio.unibo.it>
> >> Cc: <ka...@ws.apache.org>
> >> Sent: Saturday, November 19, 2005 10:20 PM
> >> Subject: Re: kandula basics
> >>
> >>
> >> > Quoting Andrea Di Vincenzo <an...@studio.unibo.it>:
> >> >
> >> >> Hi all
> >> >>
> >> >> I'm writing my thesis about Web Services and Transactions
> >> >>
> >> >> so I would like to understand the Kandula basics and I'm asking if
> >> >> documentation exists that explains in more detail - than the 
> >> >> Architecture
> >> >> Guide does - what happens behind the scene when invoking
> >> >> transaction-aware
> >> >> Web Services in the scope of a JTA Transaction.
> >> >
> >> > Hi Andrea,
> >> >
> >> > Unfortunately we do not have any further documentation on how Kandula
> >> > interfaces with JTA/JTS. The best way to get to know the details would 
> >> > be
> >> > to
> >> > download Kandula_1 and run the provided sample. Then you can follow the
> >> > code
> >> > and ask questions on the mailing list.
> >> >
> >> > I may be able to provide you with additional samples that use 
> >> > EJBs/JBoss
> >> > that
> >> > demonstrates how transactions are imported/exported to/from J2EE. These
> >> > are not
> >> > available in svn due to copyright issues.
> >> >
> >> > In a nut shell, Kandula uses the JCA 1.5 transaction importing 
> >> > mechanism
> >> > to
> >> > import transaction into J2EE.
> >> >
> >> > You may also try the book, (it doesn't talk about importing 
> >> > transactions
> >> > but
> >> > talks about ws-tx protocol suite)
> >> > Web Services Platform Architecture : SOAP, WSDL, WS-Policy, 
> >> > WS-Addressing,
> >> > WS-
> >> > BPEL, WS-Reliable Messaging, and More (Paperback)
> >> > http://www.amazon.com/gp/product/0131488740/102-4698261-2928158?
> >> > v=glance&n=283155
> >> >
> >> > thanks,
> >> > --dasarath
> >> >
> >> >
> >> >
> >> >>
> >> >> The University of Bologna, Italy, is actually very interested in
> >> >> understanding the internals of Kandula, and I would also like to help
> >> >> some
> >> >> way.
> >> >>
> >> >> Thanks in advance
> >> >> Andrea
> >> >>
> >> >>
> >> >> ---------------------------------------------------------------------
> >> >> To unsubscribe, e-mail: kandula-dev-unsubscribe@ws.apache.org
> >> >> For additional commands, e-mail: kandula-dev-help@ws.apache.org
> >> >>
> >> >>
> >> >
> >> >
> >> >
> >> >
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: kandula-dev-unsubscribe@ws.apache.org
> >> For additional commands, e-mail: kandula-dev-help@ws.apache.org
> >>
> >>
> >
> >
> >
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: kandula-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: kandula-dev-help@ws.apache.org
> 
> 




---------------------------------------------------------------------
To unsubscribe, e-mail: kandula-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: kandula-dev-help@ws.apache.org


Re: kandula basics

Posted by Andrea Di Vincenzo <an...@studio.unibo.it>.
Hi Dasarath,

----- Original Message ----- 
From: "Dasarath Weeratunge" <dw...@purdue.edu>
To: "Andrea Di Vincenzo" <an...@studio.unibo.it>
Cc: <ka...@ws.apache.org>
Sent: Wednesday, November 23, 2005 6:28 AM
Subject: Re: kandula basics


> Quoting Andrea Di Vincenzo <an...@studio.unibo.it>:
>
>> Hi Dasarath,
>>
>> Of course I'm interested in obtaining a copy of the EWS documentation! It
>> would be useful for my master thesis.
>
> OK.
>
> Thilina, could you please request a copy of the EWS project from the 
> dept...
>
>>
>> Actually I'm reading the source code of Kandula. I find it very 
>> interesting.
>>
>> There's only one thing that is not very clear to me. I refer to the 
>> scenario
>>
>> of Transaction Inflow. Let's say that an application invokes two 
>> different
>> web service operations hosted by the same remote domain. So two messages
>> arrive at this domain containing the same context.
>>
>> On the first invocation, after the context has been imported and a local
>> branch has been created, the TransactionHandler asks the transaction 
>> manager
>>
>> to associate the new local transaction with the current thread. Right?
>
> Correct.
>
>>
>> On the second invocation a local transaction corresponding to the context 
>> is
>>
>> detected, so there's no need to create a new local transaction. But for 
>> the
>> work of the ws operation invoked to be done in the scope of the same 
>> local
>> transaction already existing, the thread serving this second invocation 
>> also
>>
>> should be associated with the local transaction. Right?
>
> Correct.
>
>>
>> If I didn't make mistakes till now, my question is:
>> is the underlying Transaction Manager capable of managing multiple 
>> threads
>> working in the scope of the same transaction?
>
> This has not been tested unfortunately.
>
> Still if it ever becomes a problem we can always create a new transaction 
> for
> the second (or any subsequent) invocation(s) if the previous one is being 
> used
> by another thread. Since the two local transactions are two branches of 
> one
> global transaction the end result should be the same. If one of the local 
> tx
> were to rollback the other will too when the global tx is terminated, etc.
> However, this is more to do with the actual implementation of the 
> transaction
> manager than the concept.

I have found an'interesting discussion, involving Mark Little and JOTM 
developers, about support for multiple threads running in the scope of the 
same transaction in the JOTM Mail Archive:

http://mail-archive.objectweb.org/jotm/2003-05/msg00041.html and subsequent 
posts

Anyway, for the purpose of my master thesis, I'm assuming that a new branch 
is created for each transactional invocation served by a different thread.

I heard about Mark Little because he is an author of:  "Java Transaction 
Processing, Design and Implementation", Prentice Hall. I've read this book 
to introduce myself to transactions.

> We may also need to consider the fact that web
> services are stateless here.

What do you exactly mean here?
It's not always clear to me what "stateless" mean.

Best Regards
Andrea 


---------------------------------------------------------------------
To unsubscribe, e-mail: kandula-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: kandula-dev-help@ws.apache.org


Re: kandula basics

Posted by Andrea Di Vincenzo <an...@studio.unibo.it>.
Hi Dasarath,

----- Original Message ----- 
From: "Dasarath Weeratunge" <dw...@purdue.edu>
To: "Andrea Di Vincenzo" <an...@studio.unibo.it>
Cc: <ka...@ws.apache.org>
Sent: Wednesday, November 23, 2005 6:28 AM
Subject: Re: kandula basics


> Quoting Andrea Di Vincenzo <an...@studio.unibo.it>:
>
>> Hi Dasarath,
>>
>> Of course I'm interested in obtaining a copy of the EWS documentation! It
>> would be useful for my master thesis.
>
> OK.
>
> Thilina, could you please request a copy of the EWS project from the 
> dept...
>
>>
>> Actually I'm reading the source code of Kandula. I find it very 
>> interesting.
>>
>> There's only one thing that is not very clear to me. I refer to the 
>> scenario
>>
>> of Transaction Inflow. Let's say that an application invokes two 
>> different
>> web service operations hosted by the same remote domain. So two messages
>> arrive at this domain containing the same context.
>>
>> On the first invocation, after the context has been imported and a local
>> branch has been created, the TransactionHandler asks the transaction 
>> manager
>>
>> to associate the new local transaction with the current thread. Right?
>
> Correct.
>
>>
>> On the second invocation a local transaction corresponding to the context 
>> is
>>
>> detected, so there's no need to create a new local transaction. But for 
>> the
>> work of the ws operation invoked to be done in the scope of the same 
>> local
>> transaction already existing, the thread serving this second invocation 
>> also
>>
>> should be associated with the local transaction. Right?
>
> Correct.
>
>>
>> If I didn't make mistakes till now, my question is:
>> is the underlying Transaction Manager capable of managing multiple 
>> threads
>> working in the scope of the same transaction?
>
> This has not been tested unfortunately.
>
> Still if it ever becomes a problem we can always create a new transaction 
> for
> the second (or any subsequent) invocation(s) if the previous one is being 
> used
> by another thread. Since the two local transactions are two branches of 
> one
> global transaction the end result should be the same. If one of the local 
> tx
> were to rollback the other will too when the global tx is terminated, etc.
> However, this is more to do with the actual implementation of the 
> transaction
> manager than the concept.

I have found an'interesting discussion, involving Mark Little and JOTM 
developers, about support for multiple threads running in the scope of the 
same transaction in the JOTM Mail Archive:

http://mail-archive.objectweb.org/jotm/2003-05/msg00041.html and subsequent 
posts

Anyway, for the purpose of my master thesis, I'm assuming that a new branch 
is created for each transactional invocation served by a different thread.

I heard about Mark Little because he is an author of:  "Java Transaction 
Processing, Design and Implementation", Prentice Hall. I've read this book 
to introduce myself to transactions.

> We may also need to consider the fact that web
> services are stateless here.

What do you exactly mean here?
It's not always clear to me what "stateless" mean.

Best Regards
Andrea 


---------------------------------------------------------------------
To unsubscribe, e-mail: kandula-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: kandula-dev-help@ws.apache.org