From: Arne Vajhøj on
On 10-08-2010 12:36, Lew wrote:
> gk wrote:
>> my question for this was little different . What I meant is , whether
>> there is a spec that application servers have to employ a JTA service
>> MANDATORY so that developer can get a handle of it .
>
> No, it's not mandatory, but it's pretty near universal, including for
> the products you specifically mentioned. That's what I meant by,
> "Yes, pretty much" and "Yes, those have it". Tomcat does not, AFAIK.

It does not.

But then Tomcat does not support EJB's at all.

Arne
From: Arne Vajhøj on
On 10-08-2010 05:43, gk wrote:
> Here is a code from Mastering Enterprise Java Bean which Idon't
> understand . Could you please clarify this doubt ?
>
> Here is the excerpt
> http://i218.photobucket.com/albums/cc298/curseofgoldendragon/usertransaction.png

1) Yes. Any fully compliant Java EE app server (any compliant
EJB container) must support JTA for EJB's with bean managed
transactions.

2) No. Anything that can participate in XA transactions can be used:
database (JDBC drivers), message queues (JMS providers),
EIS systemer (JCA connectorer).

Arne

From: Arne Vajhøj on
On 10-08-2010 08:17, Lew wrote:
> Additional commentary:
> - The JNDI name is whatever you configure it to be. It doesn't have to
> be "UserTransaction".

It does.

From the EJB spec:

<quote>
The container must make the javax.transaction.UserTransaction interface
available to
the enterprise bean's business method, message listener method, or
ejbTimeout method via the
javax.ejb.EJBContext interface and under the environment entry
java:comp/UserTransaction.
</quote>

Arne

From: Mike Schilling on


"Arne Vajh�j" <arne(a)vajhoej.dk> wrote in message
news:4c61e4eb$0$280$14726298(a)news.sunsite.dk...
> On 10-08-2010 12:36, Lew wrote:
>> gk wrote:
>>> my question for this was little different . What I meant is , whether
>>> there is a spec that application servers have to employ a JTA service
>>> MANDATORY so that developer can get a handle of it .
>>
>> No, it's not mandatory, but it's pretty near universal, including for
>> the products you specifically mentioned. That's what I meant by,
>> "Yes, pretty much" and "Yes, those have it". Tomcat does not, AFAIK.
>
> It does not.
>
> But then Tomcat does not support EJB's at all.

Right. Tomcat is a J2EE-compliant servlet container, but not an EJB
container. Servlets can also make use of JTA, but in Tomcat (at least), the
transaction manager doesn't come with.

From: Lew on
gk wrote:
>>>> What I meant is , whether
>>>> there is a spec that application servers have to employ a JTA service
>>>> MANDATORY so that developer can get a handle of it .

Lew wrote:
>>> No, it's not mandatory, but it's pretty near universal, including for
>>> the products you specifically mentioned. That's what I meant by,
>>> "Yes, pretty much" and "Yes, those have it". Tomcat does not, AFAIK.

Arne Vajhøj wrote:
>> It does not.
>>
>> But then Tomcat does not support EJB's at all.

Mike Schilling wrote:
> Right. Tomcat is a J2EE-compliant servlet container, but not an EJB
> container. Servlets can also make use of JTA, but in Tomcat (at least),
> the transaction manager doesn't come with.

Tomcat can support EJBs if you add Apache OpenEJB.

--
Lew