You are viewing a plain text version of this content. The canonical link for it is here.
Posted to kandula-dev@ws.apache.org by Dasarath Weeratunge <dw...@purdue.edu> on 2007/06/01 01:05:53 UTC

Re: Kandula1 and JTA integration

Quoting Dobri Kitipov <kd...@gmail.com>:

> Hi Dasarath,
> I am trying to research how the integration of Kandua1 with JTA is done. As
> it is visible from the official web site there is no more architectural
> guide. There was some information about that. My understanding is that it is
> out-of-date. The BankOne example that is the closest example to what I am
> interested in is also not mentioned anymore? Is this because it is not
> actuall. When the updated arch guide will be updated and available?

Some work has been done in integrating Kandula(1) and JTA. Specifically, how 
to export a JTA transaction to web services and vice versa. The current 
implementation supports the latter- i.e. importing a web services transaction 
into JTA. The BankOne sample demonstrates this capability. Exporting JTA 
transactions is not implemented. Its my view that this requires an extension 
to the current WS-AT specification. The earlier code (prior to December 2005) 
had an implementation that allowed JTA transactions to be exported but I never 
got to implementing that part when I revised code in 2006.

It is possible to import web services transactions into JTA by registering the 
JTA transaction in the web services transaction as a branch. Most JTA 
implementations have mechanisms through which this can be done efficiently. 
These mechanisms are there because these transaction managers need to support 
JCA transaction inflow. However, when trying the things the other way around 
we come across the problem of how to bring a transaction controlled by a web 
services transaction coordinator to be controlled by a JTA transaction 
manager. It can be done but only through non-standard means at present.

> 
> Can you provide me with a document that explains how JTA integration is
> done? It will be very helpful for me.

JCA transaction inflow is the standard way to import a transaction in to JTA 
to the best of my knowledge. However, I have not reviewed the latest specs.
Still, most JTA implementations Geronimo, JBoss, JOTM, etc., provide more 
convinient but implementation specific interfaces for getting the samething 
done. The current code in Kandula1 works only with Geronimo. Extensions to 
other TMs should not be hard.

> My willing is to understand how a WS with a TX behaviour can participate
> into WS-TX. Let's say we have a WS with the following business logic
> demarcated with a TX:
> 
> ...
>           javax.transaction.UserTransaction tx = getTransaction();
>         try
>         {
>             tx.begin();
> 
>                 credit(..);
>                 debit(..);
> 
>             tx.commit();
>         }
>         catch (NotSupportedException e)
>         {
>         }
> ...
> Can you provide me with the concept (example) how to bind
> KandulaResource's TX methods (e.g. commit, rollback etc.) with the
> one provided by a given transaction manager used in a concrete WS
> Method (Atomikos, SimpleJTA etc.)? How the above method code example could
> be integrated with WS
> TX?

I'm not sure what you mean by a KandulaResource. However, I can think of 2 
types of resources. 1) Resources controlled by a JTA implementation yet are 
part of some global transaction in the web services domain. These need to 
implement the XAResource (or its subinterface NamedXAResource) 2) Resources 
directly controlled by Kandula that extend the AbstractParticipant interface 
and are registered with the Kandula provided TransactionManager that mimics 
the JTA TransactionManager interface. Please look at the IntropIBM sample for 
details on the latter and BankOne/TestSuite1 for the former.

> 
> I have may be some stupid questions, but my understanding is that Kandula is
> designed to mediate b/n WS-TX and a given WS JTA TX? Anyway can Kandula be
> used to start a JTA TX into a given WS? I mean as analogy to EJB-s you can

Yes/No. We implemented this on JBoss sometime back but due to platform 
specific nature of our implementation no samples were posted. At the time 
Geronimo was still on the drawing board and we couldn't figure out how to 
include JBoss or JOTM related code in Apache repo. When playing with EJBs 
things get even more complicated because of the way the Web Container (where 
Tomcat/Axis runs) and EJB container may be structured in the J2EE server. I 
never tested Kandula mechanisms using EJBs on Geronimo. If anyone likes to do 
that and post a sample, I would be very grateful:-)

Please let us know if you have any further questions.

--dasarath

> declaratively define the TX behavior of a business logic. Say it another
> way, if WS's business logic is not demarcated with JTA TX but a
> KandulaResource is defined does it mean for the given WS method to be
> executed into JTA TX? Doing so we can reuse WS that we want to participate
> into a TX. Can you clarify the use-cases when Kandula AT is supposed to be
> used?
> 
> Thank you,
> 
> Dobri
> 


actuallyye demonstrates this capability. Exporting JTA 
transactions is not implemented. Its my view that this requires an extension 
to the current WS-AT specification. The earlier code (prior to december 2005) 
had an implementation that allowed JTA transactions to be exported by I never 
got to implementing part when I revised code in 2006.

It is possible to import web services transactions into JTA by registering the 
JTA transaction in the web services transaction as a branch. Most JTA 
implementations have mechanism through which this can be done efficiently. 
These mechanisms are there because these transaction managers need to support 
JCA transaction inflow. However, when trying the things the other way around 
we come across the problem of how to bring a transaction controlled by a web 
services transaction coordinator to be controlled by a JTA transaction 
manager. It can be done but only through non-standard means.

> 
> Can you provide me with a document that explains how JTA integration is
> done? It will be very helpful for me.

JCA transaction inflow is the standard way to import a transaction in to JTA 
to the best of my knowledge. However, I have not reviewed the latest specs.
Still, most JTA implementations Geronimo, JBoss, JOTM, etc., provide more 
convenient but implementation specific interfaces for getting the same thing 
done. The current code in Kandula1 works only with Geronimo. 

> My willing is to understand how a WS with a TX behavior can participate
> into WS-TX. Let's say we have a WS with the following business logic
> demarcated with a TX:
> 
> ...
>           javax.transaction.UserTransaction tx = getTransaction();
>         try
>         {
>             tx.begin();
> 
>                 credit(..);
>                 debit(..);
> 
>             tx.commit();
>         }
>         catch (NotSupportedException e)
>         {
>         }
> ...
> Can you provide me with the concept (example) how to bind
> KandulaResource's TX methods (e.g. commit, rollback etc.) with the
> one provided by a given transaction manager used in a concrete WS
> Method (Atomikos, SimpleJTA etc.)? How the above method code example could
> be integrated with WS
> TX?

I'm not sure what you mean by a KandulaResource. However, I can think of 2 
types of resources. 1) Resources controlled by a JTA implementation yet are 
part of some global transaction in the web services domain. 2) Resources 
directly controlled by Kandula that extend the AbstractParticipant interface 
and are registered with the Kandula provided TransactionManager that mimics 
the JTA TransactionManager interface. Please look at the IntropIBM sample for 
details on the latter and BankOne/TestSuite1 for the former.

> 
> I have may be some stupid questions, but my understanding is that Kandula is
> designed to mediate b/n WS-TX and a given WS JTA TX? Anyway can Kandula be
> used to start a JTA TX into a given WS? I mean as analogy to EJB-s you can

Yes/No. We implemented this on JBoss sometime back but due to platform 
specific nature of our implementation no samples were posted. At the time 
Geronimo was still on the drawingboard and we couldn't figure out how to 
include JBoss or JOTM related code in Apache repo. When playing with EJBs 
things get even more complicated because of the way the Web Contrainer (where 
Tomcat/Axis runs) and EJB container may be structured in the J2EE server.

Presently I'm watching where WS-AT/BA are headed. Any further work on this 
area will depend on that.

Please let us know if you have any further questions.

--dasarath

> declaratively define the TX behaviour of a business logic. Say it another
> way, if WS's business logic is not demarcated with JTA TX but a
> KandulaResource is defined does it mean for the given WS method to be
> executed into JTA TX? Doing so we can reuse WS that we want to participate
> into a TX. Can you clarify the use-cases when Kandula AT is supposed to be
> used?
> 
> Thank you,
> 
> Dobri
> 


convenient back but due to platform 
specific nature of our implementation no samples were posted. At the time 
Geronimo was still on the drawing board and we couldn't figure out how to 
include JBoss or JOTM related code in Apache repo. When playing with EJBs 
things get even more complicated because of the way the Web Container (where 
Tomcat/Axis runs) and EJB container may be structured in the J2EE server. I 
never tested Kandula mechanisms using EJBs on Geronimo. If anyone likes to do 
that and post a sample, I would be very grateful:-)

Please let us know if you have any further questions.

--dasarath

> declaratively define the TX behavior of a business logic. Say it another
> way, if WS's business logic is not demarcated with JTA TX but a
> KandulaResource is defined does it mean for the given WS method to be
> executed into JTA TX? Doing so we can reuse WS that we want to participate
> into a TX. Can you clarify the use-cases when Kandula AT is supposed to be
> used?
> 
> Thank you,
> 
> Dobri
> 


actuallyye demonstrates this capability. Exporting JTA 
transactions is not implemented. Its my view that this requires an extension 
to the current WS-AT specification. The earlier code (prior to december 2005) 
had an implementation that allowed JTA transactions to be exported by I never 
got to implementing part when I revised code in 2006.

It is possible to import web services transactions into JTA by registering the 
JTA transaction in the web services transaction as a branch. Most JTA 
implementations have mechanism through which this can be done efficiently. 
These mechanisms are there because these transaction managers need to support 
JCA transaction inflow. However, when trying the things the other way around 
we come across the problem of how to bring a transaction controlled by a web 
services transaction coordinator to be controlled by a JTA transaction 
manager. It can be done but only through non-standard means.

> 
> Can you provide me with a document that explains how JTA integration is
> done? It will be very helpful for me.

JCA transaction inflow is the standard way to import a transaction in to JTA 
to the best of my knowledge. However, I have not reviewed the latest specs.
Still, most JTA implementations Geronimo, JBoss, JOTM, etc., provide more 
convenient but implementation specific interfaces for getting the same thing 
done. The current code in Kandula1 works only with Geronimo. 

> My willing is to understand how a WS with a TX behavior can participate
> into WS-TX. Let's say we have a WS with the following business logic
> demarcated with a TX:
> 
> ...
>           javax.transaction.UserTransaction tx = getTransaction();
>         try
>         {
>             tx.begin();
> 
>                 credit(..);
>                 debit(..);
> 
>             tx.commit();
>         }
>         catch (NotSupportedException e)
>         {
>         }
> ...
> Can you provide me with the concept (example) how to bind
> KandulaResource's TX methods (e.g. commit, rollback etc.) with the
> one provided by a given transaction manager used in a concrete WS
> Method (Atomikos, SimpleJTA etc.)? How the above method code example could
> be integrated with WS
> TX?

I'm not sure what you mean by a KandulaResource. However, I can think of 2 
types of resources. 1) Resources controlled by a JTA implementation yet are 
part of some global transaction in the web services domain. 2) Resources 
directly controlled by Kandula that extend the AbstractParticipant interface 
and are registered with the Kandula provided TransactionManager that mimics 
the JTA TransactionManager interface. Please look at the IntropIBM sample for 
details on the latter and BankOne/TestSuite1 for the former.

> 
> I have may be some stupid questions, but my understanding is that Kandula is
> designed to mediate b/n WS-TX and a given WS JTA TX? Anyway can Kandula be
> used to start a JTA TX into a given WS? I mean as analogy to EJB-s you can

Yes/No. We implemented this on JBoss sometime back but due to platform 
specific nature of our implementation no samples were posted. At the time 
Geronimo was still on the drawingboard and we couldn't figure out how to 
include JBoss or JOTM related code in Apache repo. When playing with EJBs 
things get even more complicated because of the way the Web Contrainer (where 
Tomcat/Axis runs) and EJB container may be structured in the J2EE server.

Presently I'm watching where WS-AT/BA are headed. Any further work on this 
area will depend on that.

Please let us know if you have any further questions.

--dasarath

> declaratively define the TX behaviour of a business logic. Say it another
> way, if WS's business logic is not demarcated with JTA TX but a
> KandulaResource is defined does it mean for the given WS method to be
> executed into JTA TX? Doing so we can reuse WS that we want to participate
> into a TX. Can you clarify the use-cases when Kandula AT is supposed to be
> used?
> 
> Thank you,
> 
> Dobri
> 


same thinge back but due to platform 
specific nature of our implementation no samples were posted. At the time 
Geronimo was still on the drawing board and we couldn't figure out how to 
include JBoss or JOTM related code in Apache repo. When playing with EJBs 
things get even more complicated because of the way the Web Container (where 
Tomcat/Axis runs) and EJB container may be structured in the J2EE server. I 
never tested Kandula mechanisms using EJBs on Geronimo. If anyone likes to do 
that and post a sample, I would be very greatful:-)

Please let us know if you have any further questions.

--dasarath

> declaratively define the TX behaviour of a business logic. Say it another
> way, if WS's business logic is not demarcated with JTA TX but a
> KandulaResource is defined does it mean for the given WS method to be
> executed into JTA TX? Doing so we can reuse WS that we want to participate
> into a TX. Can you clarify the use-cases when Kandula AT is supposed to be
> used?
> 
> Thank you,
> 
> Dobri
> 


actuallyye demonstrates this capability. Exporting JTA 
transactions is not implemented. Its my view that this requires an extension 
to the current WS-AT specification. The earlier code (prior to december 2005) 
had an implementation that allowed JTA transactions to be exported by I never 
got to implementing part when I revised code in 2006.

It is possible to import web services transactions into JTA by registering the 
JTA transaction in the web services transaction as a branch. Most JTA 
implementations have mechanism through which this can be done efficiently. 
These mechanisms are there because these transaction managers need to support 
JCA transaction inflow. However, when trying the things the other way around 
we come across the problem of how to bring a transaction controlled by a web 
services transaction coordinator to be controlled by a JTA transaction 
manager. It can be done but only through non-standard means.

> 
> Can you provide me with a document that explains how JTA integration is
> done? It will be very helpful for me.

JCA transaction inflow is the standard way to import a transaction in to JTA 
to the best of my knowledge. However, I have not reviewed the latest specs.
Still, most JTA implementations Geronimo, JBoss, JOTM, etc., provide more 
convenient but implementation specific interfaces for getting the same thing 
done. The current code in Kandula1 works only with Geronimo. 

> My willing is to understand how a WS with a TX behavior can participate
> into WS-TX. Let's say we have a WS with the following business logic
> demarcated with a TX:
> 
> ...
>           javax.transaction.UserTransaction tx = getTransaction();
>         try
>         {
>             tx.begin();
> 
>                 credit(..);
>                 debit(..);
> 
>             tx.commit();
>         }
>         catch (NotSupportedException e)
>         {
>         }
> ...
> Can you provide me with the concept (example) how to bind
> KandulaResource's TX methods (e.g. commit, rollback etc.) with the
> one provided by a given transaction manager used in a concrete WS
> Method (Atomikos, SimpleJTA etc.)? How the above method code example could
> be integrated with WS
> TX?

I'm not sure what you mean by a KandulaResource. However, I can think of 2 
types of resources. 1) Resources controlled by a JTA implementation yet are 
part of some global transaction in the web services domain. 2) Resources 
directly controlled by Kandula that extend the AbstractParticipant interface 
and are registered with the Kandula provided TransactionManager that mimics 
the JTA TransactionManager interface. Please look at the IntropIBM sample for 
details on the latter and BankOne/TestSuite1 for the former.

> 
> I have may be some stupid questions, but my understanding is that Kandula is
> designed to mediate b/n WS-TX and a given WS JTA TX? Anyway can Kandula be
> used to start a JTA TX into a given WS? I mean as analogy to EJB-s you can

Yes/No. We implemented this on JBoss sometime back but due to platform 
specific nature of our implementation no samples were posted. At the time 
Geronimo was still on the drawingboard and we couldn't figure out how to 
include JBoss or JOTM related code in Apache repo. When playing with EJBs 
things get even more complicated because of the way the Web Contrainer (where 
Tomcat/Axis runs) and EJB container may be structured in the J2EE server.

Presently I'm watching where WS-AT/BA are headed. Any further work on this 
area will depend on that.

Please let us know if you have any further questions.

--dasarath

> declaratively define the TX behaviour of a business logic. Say it another
> way, if WS's business logic is not demarcated with JTA TX but a
> KandulaResource is defined does it mean for the given WS method to be
> executed into JTA TX? Doing so we can reuse WS that we want to participate
> into a TX. Can you clarify the use-cases when Kandula AT is supposed to be
> used?
> 
> Thank you,
> 
> Dobri
> 


convenient back but due to platform 
specific nature of our implementation no samples were posted. At the time 
Geronimo was still on the drawing board and we couldn't figure out how to 
include JBoss or JOTM related code in Apache repo. When playing with EJBs 
things get even more complicated because of the way the Web Container (where 
Tomcat/Axis runs) and EJB container may be structured in the J2EE server. I 
never tested Kandula mechanisms using EJBs on Geronimo. If anyone likes to do 
that and post a sample, I would be very greatful:-)

Please let us know if you have any further questions.

--dasarath

> declaratively define the TX behaviour of a business logic. Say it another
> way, if WS's business logic is not demarcated with JTA TX but a
> KandulaResource is defined does it mean for the given WS method to be
> executed into JTA TX? Doing so we can reuse WS that we want to participate
> into a TX. Can you clarify the use-cases when Kandula AT is supposed to be
> used?
> 
> Thank you,
> 
> Dobri
> 


actuallyye demonstrates this capability. Exporting JTA 
transactions is not implemented. Its my view that this requires an extension 
to the current WS-AT specification. The earlier code (prior to december 2005) 
had an implementation that allowed JTA transactions to be exported by I never 
got to implementing part when I revised code in 2006.

It is possible to import web services transactions into JTA by registering the 
JTA transaction in the web services transaction as a branch. Most JTA 
implementations have mechanism through which this can be done efficiently. 
These mechanisms are there because these transaction managers need to support 
JCA transaction inflow. However, when trying the things the other way around 
we come across the problem of how to bring a transaction controlled by a web 
services transaction coordinator to be controlled by a JTA transaction 
manager. It can be done but only through non-standard means.

> 
> Can you provide me with a document that explains how JTA integration is
> done? It will be very helpful for me.

JCA transaction inflow is the standard way to import a transaction in to JTA 
to the best of my knowledge. However, I have not reviewed the latest specs.
Still, most JTA implementations Geronimo, JBoss, JOTM, etc., provide more 
convenient but implementation specific interfaces for getting the same thing 
done. The current code in Kandula1 works only with Geronimo. 

> My willing is to understand how a WS with a TX behavior can participate
> into WS-TX. Let's say we have a WS with the following business logic
> demarcated with a TX:
> 
> ...
>           javax.transaction.UserTransaction tx = getTransaction();
>         try
>         {
>             tx.begin();
> 
>                 credit(..);
>                 debit(..);
> 
>             tx.commit();
>         }
>         catch (NotSupportedException e)
>         {
>         }
> ...
> Can you provide me with the concept (example) how to bind
> KandulaResource's TX methods (e.g. commit, rollback etc.) with the
> one provided by a given transaction manager used in a concrete WS
> Method (Atomikos, SimpleJTA etc.)? How the above method code example could
> be integrated with WS
> TX?

I'm not sure what you mean by a KandulaResource. However, I can think of 2 
types of resources. 1) Resources controlled by a JTA implementation yet are 
part of some global transaction in the web services domain. 2) Resources 
directly controlled by Kandula that extend the AbstractParticipant interface 
and are registered with the Kandula provided TransactionManager that mimics 
the JTA TransactionManager interface. Please look at the IntropIBM sample for 
details on the latter and BankOne/TestSuite1 for the former.

> 
> I have may be some stupid questions, but my understanding is that Kandula is
> designed to mediate b/n WS-TX and a given WS JTA TX? Anyway can Kandula be
> used to start a JTA TX into a given WS? I mean as analogy to EJB-s you can

Yes/No. We implemented this on JBoss sometime back but due to platform 
specific nature of our implementation no samples were posted. At the time 
Geronimo was still on the drawingboard and we couldn't figure out how to 
include JBoss or JOTM related code in Apache repo. When playing with EJBs 
things get even more complicated because of the way the Web Contrainer (where 
Tomcat/Axis runs) and EJB container may be structured in the J2EE server.

Presently I'm watching where WS-AT/BA are headed. Any further work on this 
area will depend on that.

Please let us know if you have any further questions.

--dasarath

> declaratively define the TX behaviour of a business logic. Say it another
> way, if WS's business logic is not demarcated with JTA TX but a
> KandulaResource is defined does it mean for the given WS method to be
> executed into JTA TX? Doing so we can reuse WS that we want to participate
> into a TX. Can you clarify the use-cases when Kandula AT is supposed to be
> used?
> 
> Thank you,
> 
> Dobri
> 



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