[jboss-dev-forums] [Design of JBoss jBPM] - Re: command iteration
tom.baeyens@jboss.com
do-not-reply at jboss.com
Mon Aug 28 02:55:46 EDT 2006
what a way to start your monday mornin!
the J2EE 1.4 spec says:
"
J2EE.6.7 Java? Transaction API (JTA) 1.0 Requirements
JTA defines the UserTransaction interface that is used by applications to start, and
commit or abort transactions. Enterprise beans are expected to get UserTransaction
objects through the EJBContext?s getUserTransaction method. Other application
components get a UserTransaction object through a JNDI lookup using the name
java:comp/UserTransaction.
JTA also defines a number of interfaces that are used by an application server
to communicate with a transaction manager, and for a transaction manager to
interact with a resource manager. These interfaces must be supported as described
in the Connector specification. In addition, support for other transaction facilities
may be provided transparently to the application by a J2EE product.
The latest JTA 1.0 specification is version 1.0.1B and is available at http://
java.sun.com/products/jta.
"
and sun's blueprints stuff says:
"
8.5 Web Tier Transaction Guidelines
Servlets and JSP pages in a two-tier application can access enterprise information systems within the scope of a JTA transaction. Servlets and JSP pages support only programmatic transaction demarcation. A servlet or JSP page can use JNDI to look up a UserTransaction object (using the standard defined name java:comp/UserTransaction), and then use the UserTransaction interface to demarcate transactions.
Code Example 8.1 illustrates the use of the JTA UserTransaction interface to demarcate transactions within a Servlet:
Context ic = new InitialContext();
UserTransaction ut =
(UserTransaction) ic.lookup("java:comp/UserTransaction");
ut.begin();
// access resources transactionally here
ut.commit();
"
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3967744#3967744
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3967744
More information about the jboss-dev-forums
mailing list