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 2008/01/30 16:08:12 UTC
Re: Kandula 1
Quoting Dominik Heller <Do...@gmx.net>:
Geronimo handles J2EE transactions. If your application uses any J2EE artifacts,
any transactions that involve them are handled by Geronimo (or its equivalent).
Now, if you write web service whose implementation is in J2EE (e.g. an EJB or
Servelet), Kandula forwards incoming web services transactions on to J2EE
transaction infrastructure (e.g. J2EE). In effect, your J2EE domain becomes a
branch of the web services transaction.
In the unlikely case that your application does not use J2EE but uses resources
directly, Kandula has a minimal transaction manager similar to Geronimo that can
handle XAResource interface.
We have sample code that illustrate both approaches. The latter is just for
experimentation. This is also why we have two TxHandlers.
-- Dasarath
> Hey Dasarath,
> I have a question regarding Geronimo. Is the Geronimo used by Kandula the
> transaction core for all the transactions? I allready know that Geronimo
> provides a transaction API similar to JTA, but is Geronimo the engine in the
> background or what exactly is the purpose of its existence.
>
> THX
>
> Dominik
> --
> Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
> Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer
>
---------------------------------------------------------------------
To unsubscribe, e-mail: kandula-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: kandula-dev-help@ws.apache.org
Re: Kandula 1
Posted by Hannes Erven <ha...@erven.at>.
Hi folks,
Dominik has reported in the past a problem where a bridged transaction -
as he described today - with two participants fails to roll back when
one of the participants cannot successfully prepare.
The stacktrace Dominik showed me:
Caused by: java.lang.IllegalStateException: Status is STATUS_PREPARED
at
org.apache.geronimo.transaction.manager.TransactionImpl.rollback(TransactionImpl.java:438)
at
org.apache.geronimo.transaction.manager.TransactionManagerImpl.rollback(TransactionManagerImpl.java:210)
... points to the Geronimo transactionImpl that refuses calls to
.rollback() after having PREPARED.
However, even and especially the participant that successfully prepared
must be able to finally roll back, so I don't quite understand what's
going on here.
Dasarath, could you please shed some light on what is going on here?
Thank you, best regards & good night
-hannes
---------------------------------------------------------------------
To unsubscribe, e-mail: kandula-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: kandula-dev-help@ws.apache.org
Re: Kandula 1
Posted by Dominik <do...@gmx.net>.
Dasarath Weeratunge schrieb:
> Quoting Dominik Heller <Do...@gmx.net>:
>
> The TestSuite1 contains examples of both.
>
> If you are using a J2EE container then Kandula should be passed a reference to
> the transaction manager of that container. So when your application receives a
> web service request, Kandula can convert the incoming coordination context to a
> suitable JTA transaction and attach that tx to the thread executing your
> application logic. So that the method invocation will be performed under a
> transaction context-- J2EE in this case. Kandula will later on terminate this
> transaction when the coordination context is terminated.
>
> In the source you get from SVN, the Bridge class simply creates its own instance
> of J2EE transaction manager. This is not correct as it would create two separate
> TM instances inside the same J2EE container. At this point the details are very
> much container specific. We also have to consider how much isolation there
> exists between different J2EE containers e.g. Servelet container and EJB container.
>
> This work was motivated by JSR109 long ago.
>
> -- Dasarath
>
>
>
>> Hey Dasarath,
>> I have developed my Application pretty close to the Banking example, so I am
>> using the TransactionManagerImpl on the clientside and a transactionManager
>> which is bridged from geronimo. So right now I have a non-J2EE application,
>> if I would want to create a J2EE app, I could use the geronimo
>> transactionManager directly, right? Which are the two TxHandlers can you
>> point me to them and to the sample code for both approaches?
>>
>> THX
>> -Dominik
>>
>>
>> -------- Original-Nachricht --------
>>
>>> Datum: Wed, 30 Jan 2008 10:08:12 -0500
>>> Von: Dasarath Weeratunge <dw...@purdue.edu>
>>> An: Dominik Heller <Do...@gmx.net>
>>> CC: kandula-dev@ws.apache.org
>>> Betreff: Re: Kandula 1
>>>
>>> Quoting Dominik Heller <Do...@gmx.net>:
>>>
>>> Geronimo handles J2EE transactions. If your application uses any J2EE
>>> artifacts,
>>> any transactions that involve them are handled by Geronimo (or its
>>> equivalent).
>>> Now, if you write web service whose implementation is in J2EE (e.g. an EJB
>>> or
>>> Servelet), Kandula forwards incoming web services transactions on to J2EE
>>> transaction infrastructure (e.g. J2EE). In effect, your J2EE domain
>>> becomes a
>>> branch of the web services transaction.
>>>
>>> In the unlikely case that your application does not use J2EE but uses
>>> resources
>>> directly, Kandula has a minimal transaction manager similar to Geronimo
>>> that can
>>> handle XAResource interface.
>>>
>>> We have sample code that illustrate both approaches. The latter is just
>>> for
>>> experimentation. This is also why we have two TxHandlers.
>>>
>>> -- Dasarath
>>>
>>>
>>>
>>>
>>>
>>>> Hey Dasarath,
>>>> I have a question regarding Geronimo. Is the Geronimo used by Kandula
>>>>
>>> the
>>>
>>>> transaction core for all the transactions? I allready know that Geronimo
>>>> provides a transaction API similar to JTA, but is Geronimo the engine in
>>>>
>>> the
>>>
>>>> background or what exactly is the purpose of its existence.
>>>>
>>>> THX
>>>>
>>>> Dominik
>>>> --
>>>> Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
>>>> Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer
>>>>
>>>>
>> --
>> GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS.
>> Alle Infos und kostenlose Anmeldung: http://www.gmx.net/de/go/freemail
>>
>>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: kandula-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: kandula-dev-help@ws.apache.org
>
>
So I hope I got this right, regarding the TestSuite1 I have two
different TransactionManagers. The first one "wstm" is the Kandula
transaactionManager which is used for non-J2EE Applications, right? The
second transactionManager "tm" is meant for J2EE Applications and is
based on the transactionManager of geronimo. In the banking example the
web service uses org.apache.kandula.geronimo.Bridge to get the
transactionManager and it uses the mediator to pass the context
information to the JTA transaction created by the geronimo
transactionManager, right?
import javax.transaction.TransactionManager;
import org.apache.geronimo.transaction.manager.NamedXAResource;
import org.apache.kandula.coordinator.at.TransactionManagerImpl;
import org.apache.kandula.geronimo.Bridge;
TransactionManagerImpl wstm = TransactionManagerImpl.getInstance();
TransactionManager tm = Bridge.getInstance().getTM();
So in the end the banking example would be a non-J2EE Application which
uses bridging to usa a JTA transaction for a non j2EE web service?
thx
-Dominik
---------------------------------------------------------------------
To unsubscribe, e-mail: kandula-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: kandula-dev-help@ws.apache.org
Re: Kandula 1
Posted by Dasarath Weeratunge <dw...@purdue.edu>.
Quoting Dominik <do...@gmx.net>:
> Dasarath Weeratunge schrieb:
> > Quoting Dominik Heller <Do...@gmx.net>:
> >
> > The TestSuite1 contains examples of both.
> >
> > If you are using a J2EE container then Kandula should be passed a reference
> to
> > the transaction manager of that container. So when your application
> receives a
> > web service request, Kandula can convert the incoming coordination context
> to a
> > suitable JTA transaction and attach that tx to the thread executing your
> > application logic. So that the method invocation will be performed under a
> > transaction context-- J2EE in this case. Kandula will later on terminate
> this
> > transaction when the coordination context is terminated.
> >
> > In the source you get from SVN, the Bridge class simply creates its own
> instance
> > of J2EE transaction manager. This is not correct as it would create two
> separate
> > TM instances inside the same J2EE container. At this point the details are
> very
> > much container specific. We also have to consider how much isolation there
> > exists between different J2EE containers e.g. Servelet container and EJB
> container.
> >
> > This work was motivated by JSR109 long ago.
> >
> > -- Dasarath
> >
> >
> >
> >> Hey Dasarath,
> >> I have developed my Application pretty close to the Banking example, so I
> am
> >> using the TransactionManagerImpl on the clientside and a
> transactionManager
> >> which is bridged from geronimo. So right now I have a non-J2EE
> application,
> >> if I would want to create a J2EE app, I could use the geronimo
> >> transactionManager directly, right? Which are the two TxHandlers can you
> >> point me to them and to the sample code for both approaches?
> >>
> >> THX
> >> -Dominik
> >>
> >>
> >> -------- Original-Nachricht --------
> >>
> >>> Datum: Wed, 30 Jan 2008 10:08:12 -0500
> >>> Von: Dasarath Weeratunge <dw...@purdue.edu>
> >>> An: Dominik Heller <Do...@gmx.net>
> >>> CC: kandula-dev@ws.apache.org
> >>> Betreff: Re: Kandula 1
> >>>
> >>> Quoting Dominik Heller <Do...@gmx.net>:
> >>>
> >>> Geronimo handles J2EE transactions. If your application uses any J2EE
> >>> artifacts,
> >>> any transactions that involve them are handled by Geronimo (or its
> >>> equivalent).
> >>> Now, if you write web service whose implementation is in J2EE (e.g. an
> EJB
> >>> or
> >>> Servelet), Kandula forwards incoming web services transactions on to
> J2EE
> >>> transaction infrastructure (e.g. J2EE). In effect, your J2EE domain
> >>> becomes a
> >>> branch of the web services transaction.
> >>>
> >>> In the unlikely case that your application does not use J2EE but uses
> >>> resources
> >>> directly, Kandula has a minimal transaction manager similar to Geronimo
> >>> that can
> >>> handle XAResource interface.
> >>>
> >>> We have sample code that illustrate both approaches. The latter is just
> >>> for
> >>> experimentation. This is also why we have two TxHandlers.
> >>>
> >>> -- Dasarath
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>> Hey Dasarath,
> >>>> I have a question regarding Geronimo. Is the Geronimo used by Kandula
> >>>>
> >>> the
> >>>
> >>>> transaction core for all the transactions? I allready know that
> Geronimo
> >>>> provides a transaction API similar to JTA, but is Geronimo the engine
> in
> >>>>
> >>> the
> >>>
> >>>> background or what exactly is the purpose of its existence.
> >>>>
> >>>> THX
> >>>>
> >>>> Dominik
> >>>> --
> >>>> Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
> >>>> Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer
> >>>>
> >>>>
> >> --
> >> GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS.
> >> Alle Infos und kostenlose Anmeldung: http://www.gmx.net/de/go/freemail
> >>
> >>
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: kandula-dev-unsubscribe@ws.apache.org
> > For additional commands, e-mail: kandula-dev-help@ws.apache.org
> >
> >
> So I hope I got this right, regarding the TestSuite1 I have two
> different TransactionManagers. The first one "wstm" is the Kandula
> transaactionManager which is used for non-J2EE Applications, right? The
> second transactionManager "tm" is meant for J2EE Applications and is
> based on the transactionManager of geronimo. In the banking example the
> web service uses org.apache.kandula.geronimo.Bridge to get the
> transactionManager and it uses the mediator to pass the context
> information to the JTA transaction created by the geronimo
> transactionManager, right?
Correct.
>
> import javax.transaction.TransactionManager;
> import org.apache.geronimo.transaction.manager.NamedXAResource;
> import org.apache.kandula.coordinator.at.TransactionManagerImpl;
> import org.apache.kandula.geronimo.Bridge;
>
> TransactionManagerImpl wstm = TransactionManagerImpl.getInstance();
>
> TransactionManager tm = Bridge.getInstance().getTM();
>
> So in the end the banking example would be a non-J2EE Application which
> uses bridging to usa a JTA transaction for a non j2EE web service?
Wrong.
BankOne examples shows how non-J2EE clients (say .NET) can access transactional
J2EE services through Web services transaction framework.
-- Dasarath
>
> thx
> -Dominik
>
---------------------------------------------------------------------
To unsubscribe, e-mail: kandula-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: kandula-dev-help@ws.apache.org
Re: Kandula 1
Posted by Dasarath Weeratunge <dw...@purdue.edu>.
Quoting Dominik Heller <Do...@gmx.net>:
The TestSuite1 contains examples of both.
If you are using a J2EE container then Kandula should be passed a reference to
the transaction manager of that container. So when your application receives a
web service request, Kandula can convert the incoming coordination context to a
suitable JTA transaction and attach that tx to the thread executing your
application logic. So that the method invocation will be performed under a
transaction context-- J2EE in this case. Kandula will later on terminate this
transaction when the coordination context is terminated.
In the source you get from SVN, the Bridge class simply creates its own instance
of J2EE transaction manager. This is not correct as it would create two separate
TM instances inside the same J2EE container. At this point the details are very
much container specific. We also have to consider how much isolation there
exists between different J2EE containers e.g. Servelet container and EJB container.
This work was motivated by JSR109 long ago.
-- Dasarath
> Hey Dasarath,
> I have developed my Application pretty close to the Banking example, so I am
> using the TransactionManagerImpl on the clientside and a transactionManager
> which is bridged from geronimo. So right now I have a non-J2EE application,
> if I would want to create a J2EE app, I could use the geronimo
> transactionManager directly, right? Which are the two TxHandlers can you
> point me to them and to the sample code for both approaches?
>
> THX
> -Dominik
>
>
> -------- Original-Nachricht --------
> > Datum: Wed, 30 Jan 2008 10:08:12 -0500
> > Von: Dasarath Weeratunge <dw...@purdue.edu>
> > An: Dominik Heller <Do...@gmx.net>
> > CC: kandula-dev@ws.apache.org
> > Betreff: Re: Kandula 1
>
> > Quoting Dominik Heller <Do...@gmx.net>:
> >
> > Geronimo handles J2EE transactions. If your application uses any J2EE
> > artifacts,
> > any transactions that involve them are handled by Geronimo (or its
> > equivalent).
> > Now, if you write web service whose implementation is in J2EE (e.g. an EJB
> > or
> > Servelet), Kandula forwards incoming web services transactions on to J2EE
> > transaction infrastructure (e.g. J2EE). In effect, your J2EE domain
> > becomes a
> > branch of the web services transaction.
> >
> > In the unlikely case that your application does not use J2EE but uses
> > resources
> > directly, Kandula has a minimal transaction manager similar to Geronimo
> > that can
> > handle XAResource interface.
> >
> > We have sample code that illustrate both approaches. The latter is just
> > for
> > experimentation. This is also why we have two TxHandlers.
> >
> > -- Dasarath
> >
> >
> >
> >
> > > Hey Dasarath,
> > > I have a question regarding Geronimo. Is the Geronimo used by Kandula
> > the
> > > transaction core for all the transactions? I allready know that Geronimo
> > > provides a transaction API similar to JTA, but is Geronimo the engine in
> > the
> > > background or what exactly is the purpose of its existence.
> > >
> > > THX
> > >
> > > Dominik
> > > --
> > > Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
> > > Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer
> > >
> >
>
> --
> GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS.
> Alle Infos und kostenlose Anmeldung: http://www.gmx.net/de/go/freemail
>
---------------------------------------------------------------------
To unsubscribe, e-mail: kandula-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: kandula-dev-help@ws.apache.org
Re: Kandula 1
Posted by Dominik Heller <Do...@gmx.net>.
Hey Dasarath,
I have developed my Application pretty close to the Banking example, so I am using the TransactionManagerImpl on the clientside and a transactionManager which is bridged from geronimo. So right now I have a non-J2EE application, if I would want to create a J2EE app, I could use the geronimo transactionManager directly, right? Which are the two TxHandlers can you point me to them and to the sample code for both approaches?
THX
-Dominik
-------- Original-Nachricht --------
> Datum: Wed, 30 Jan 2008 10:08:12 -0500
> Von: Dasarath Weeratunge <dw...@purdue.edu>
> An: Dominik Heller <Do...@gmx.net>
> CC: kandula-dev@ws.apache.org
> Betreff: Re: Kandula 1
> Quoting Dominik Heller <Do...@gmx.net>:
>
> Geronimo handles J2EE transactions. If your application uses any J2EE
> artifacts,
> any transactions that involve them are handled by Geronimo (or its
> equivalent).
> Now, if you write web service whose implementation is in J2EE (e.g. an EJB
> or
> Servelet), Kandula forwards incoming web services transactions on to J2EE
> transaction infrastructure (e.g. J2EE). In effect, your J2EE domain
> becomes a
> branch of the web services transaction.
>
> In the unlikely case that your application does not use J2EE but uses
> resources
> directly, Kandula has a minimal transaction manager similar to Geronimo
> that can
> handle XAResource interface.
>
> We have sample code that illustrate both approaches. The latter is just
> for
> experimentation. This is also why we have two TxHandlers.
>
> -- Dasarath
>
>
>
>
> > Hey Dasarath,
> > I have a question regarding Geronimo. Is the Geronimo used by Kandula
> the
> > transaction core for all the transactions? I allready know that Geronimo
> > provides a transaction API similar to JTA, but is Geronimo the engine in
> the
> > background or what exactly is the purpose of its existence.
> >
> > THX
> >
> > Dominik
> > --
> > Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
> > Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer
> >
>
--
GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS.
Alle Infos und kostenlose Anmeldung: http://www.gmx.net/de/go/freemail
---------------------------------------------------------------------
To unsubscribe, e-mail: kandula-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: kandula-dev-help@ws.apache.org