• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Transactions Questions

 
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi friends
I have got a couple of questions on transactions.
1. I read that CMP entity beans cannot support bean managed transactions. Does it mean that BMP entity beans can support BMT ? Why not ?
2. Does EJB support two-phase commit ? Is there any configuration needed for it ?
3. I know that EJB2.0 Containers support JTA. Do they support JTS also ? I understand that JTS is an implementation which uses JTA API ?
Thanks in advance
Vipin
[ November 25, 2003: Message edited by: Vipin Mohan ]
 
Bartender
Posts: 3904
43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


1. I read that CMP entity beans cannot support bean managed transactions. Does it mean that BMP entity beans can support BMT ? Why not ?


Specification says that any (CMP, BMP) Entity bean MUST use
CMT. Ant this makes sense: suppose you are creating bean,
forgot to use transaction API in INSERT statement, inserting data in some tables. In one table you successfully inserted, in other table -
exception. Rollback dies not happend. It could be a mess....
Also, once you use CMT, don't try to access transaction via DB
Connection (resourse). It's prohibited.


2. Does EJB support two-phase commit ? Is there any configuration needed for it ?


EJB container supports tw0-phase commits. It uses this technique for
updating data from several DBs in one transaction. There is no need
to configure it. The advantage of EJB technology that it makes a lot of
programming stuff for you behind the scene. And you don't need to worry about details, while concentrating on business logics writing.


3. I know that EJB2.0 Containers support JTA. Do they support JTS also ? I understand that JTS is an implementation which uses JTA API ?


Let's read specification:


17.1.3 Relationship to JTA and JTS
The Java™Transaction API (JTA) is a specification of the interfaces between a transaction manager
and the other parties involved in a distributed transaction processing system: the application programs,
the resource managers, and the application server.
The Java Transaction Service (JTS) API is a Java binding of the CORBA Object Transaction Service
(OTS) 1.1 specification. JTS provides transaction interoperability using the standard IIOP protocol for
transaction propagation between servers. The JTS API is intended for vendors who implement transaction
processing infrastructure for enterprise middleware. For example, an EJB Server vendor may use a
JTS implementation as the underlying transaction manager.
The EJB architecture does not require the EJB Container to support the JTS interfaces. The EJB architecture
requires that the EJB Container support the JTA API defined in and the Connector APIs
defined in .


Once again:


The EJB architecture DOES NOT require the EJB Container to support the JTS interfaces. The EJB architecture
requires that the EJB Container support the JTA API


That's all what you need to know about JTS for the test.
Regards.
 
Vipin Mohan
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi Mikalai
Thats clear now.
Thanks so much
Vipin
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic