From: Lew on
Lew wrote:
>> Additional commentary:
>> - The JNDI name is whatever you configure it to be. It doesn't have to
>> be "UserTransaction".

Arne Vajhøj wrote:
> 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>

I stand corrected.

--
Lew
From: Lew on
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

Arne Vajhøj wrote:
> 1) Yes. Any fully compliant Java EE app server (any compliant
> EJB container) must support JTA for EJB's with bean managed
> transactions.

He said "all application servers", not "all fully-compliant Java EE
application servers". Tomcat is an application server that is not (natively)
an EJB container, and does not support JTA out of the box.

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

--
Lew
From: Arne Vajhøj on
On 10-08-2010 20:22, Mike Schilling wrote:
> "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.

Because it is not required in the servlet spec.

Arne
From: Arne Vajhøj on
On 10-08-2010 20:38, Lew wrote:
> 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.

Anything can support EJB's if you add an EJB container.

Arne

From: Arne Vajhøj on
On 10-08-2010 20:50, Lew wrote:
> 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
>
> Arne Vajhøj wrote:
>> 1) Yes. Any fully compliant Java EE app server (any compliant
>> EJB container) must support JTA for EJB's with bean managed
>> transactions.
>
> He said "all application servers", not "all fully-compliant Java EE
> application servers". Tomcat is an application server that is not
> (natively) an EJB container, and does not support JTA out of the box.

Neither does Zope (Python), VisiBroker (CORBA) etc..

But given the book mentioned and the code snippet, then
I can't see much relevance for servers without an EJB container.

Arne