Java Mailing List Archive

http://www.junlu.com/

Google
Google
Mailing List
Home
Forum Home
JBoss - Java Application Server
Struts - A MVC web framework
Tomcat - JSP/Servlet container
iText - An open source PDF Java Library
JDOM - JDOM XML Parser
J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition
J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog
Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology
JSP - A mailing list about Java Server Pages specification and reference
Struts & Hibernate
Subjects
JSP editor plugin for eclipse ?
org apache jasper JasperException: Unable to compile class for JSP
Tomcat: Connection reset by peer: socket write error
Cannot retrieve definition for form bean null
Struts Tiles Tutorial (free Struts training)
Where do I download Tomcat 4 0 6?
Data Access Object (DAO) pattern, example DAO 's
Where to download Tomcat v 4 1 24 from?
Tomcat 5 0 16 Requested resource not available
Oracle Connection Pooling in 3 2 2
Servlet : Session invalidate
Servlet action is currently unavailable
Tomcat/Struts Unicode Encoding/Decoding problems
Tomcat and webapplication specific java library path
Running a Simple JMS Example
Mapping in workers2 properties
org apache jasper JasperException
Cannot find message resources under key org apache struts action
   MESSAGE
problem with html:text bean throwing exception
Cannot find message resources under key org apache struts action MESSAGE
invalid direct reference problem with solution
Tool for jsp debug Try Sysdeo Eclipse Plugin
Tomcat 5 Cannot load JDBC driver class 'null ' SQL state: null
weblogic ejbc
java properties file
Jboss 3 2 3 Coyote Can 't re
Tomcat 5, Apache2 and mod jk2 integration problem
JBoss example problem new to J2EE
url string for connecting jboss to oracle
Value attribute of <html:checkbox
javax servlet ServletException: BeanUtils populate
HTTP Status 404 The requested resource is not available
5 0 18: Windows XP Pro vs Windows 2000
 
Transactions

Transactions

2004-05-25       - By Jaise George

 Back
Reply:     1     2     3  

The following is an excerpt from the URL
<http://info.borland.com/techpubs/jbuilder/jbuilder8/enterprise/transact
ions.html>
http://info.borland.com/techpubs/jbuilder/jbuilder8/enterprise/transacti
ons.html

Local and global transactions

When a single connection to a database exists, the enterprise bean can
directly control the transaction by calling commit() or rollback() on
the connection. This type of transaction is a local transaction. Using
global transactions, all database connections are registered with the
global transaction service, which handles the transaction. For a global
transaction, the enterprise bean never makes calls directly on a
database connection itself.

A bean that uses bean-managed transaction demarcation uses the
javax.transaction.UserTransaction Source code of javax.transaction.UserTransaction interface to identify the boundaries
of a global transaction. When a bean uses container-managed demarcation,
the container interrupts each client call to control the transaction
demarcation, using the transaction attribute set in the bean's
deployment descriptor by the application assembler. The transaction
attribute also determines whether the transaction is local or global.

For container-managed transactions, the container follows certain rules
to determine when it should do a local versus a global transaction.
Usually a container calls the method within a local transaction after
verifying that no global transaction already exists. It also verifies
that it isn't expected to start a new global transaction and that the
transaction attributes are set for container-managed transactions. The
container automatically wraps a method call within a local transaction
if one of the follow conditions is true:

The transaction attribute is set to NotSupported and the container
detects that the database resources were accessed.

The transaction attribute is set to Supports and the container detects
that the method wasn't invoked from within a global transaction.

The transaction attribute is set to Never and the container detects that
database resources are accessed.



Best Regards

Jaise

-- --Original Message-- --
From: A mailing list for Java(tm) 2 Platform, Enterprise Edition
[mailto:J2EE-INTEREST@(protected)] On Behalf Of Ashutosh Bhardwaj
Sent: Tuesday, May 25, 2004 1:22 PM
To: J2EE-INTEREST@(protected)
Subject: Transactions


Can somebody throw some lighty on local and global transactions ? what
are shareable and unsahreable connections?

regards,
ashutosh
========================================================================
=== To unsubscribe, send email to listserv@(protected) and include in
the body of the message "signoff J2EE-INTEREST". For general help, send
email to listserv@(protected) and include in the body of the message
"help".




===========================================================================
To unsubscribe, send email to listserv@(protected) and include in the body
of the message "signoff J2EE-INTEREST".  For general help, send email to
listserv@(protected) and include in the body of the message "help".


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<TITLE>Message</TITLE>

<META content="MSHTML 6.00.2800.1106" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT size=2>
<P>The following is an excerpt from the URL </FONT><A
href="http://info.borland.com/techpubs/jbuilder/jbuilder8/enterprise
/transactions.html"><U><FONT
color=#0000ff
size=2>http://info.borland.com/techpubs/jbuilder/jbuilder8/enterprise
/transactions.html</U></FONT></A></P>
<P><FONT size=2>Local and global transactions</FONT></P>
<P><FONT size=2>When a single connection to a database exists, the enterprise
bean can directly control the transaction by calling commit() or rollback() on
the connection. This type of transaction is a local transaction. Using global
transactions, all database connections are registered with the global
transaction service, which handles the transaction. For a global transaction,
the enterprise bean never makes calls directly on a database connection itself.
</FONT></P>
<P><FONT size=2>A bean that uses bean-managed transaction demarcation uses the
javax.transaction.UserTransaction Source code of javax.transaction.UserTransaction interface to identify the boundaries of a
global transaction. When a bean uses container-managed demarcation, the
container interrupts each client call to control the transaction demarcation,
using the transaction attribute set in the bean's deployment descriptor by the
application assembler. The transaction attribute also determines whether the
transaction is local or global.</FONT></P>
<P><FONT size=2>For container-managed transactions, the container follows
certain rules to determine when it should do a local versus a global
transaction. Usually a container calls the method within a local transaction
after verifying that no global transaction already exists. It also verifies
that
it isn't expected to start a new global transaction and that the transaction
attributes are set for container-managed transactions. The container
automatically wraps a method call within a local transaction if one of the
follow conditions is true:</FONT></P>
<P><FONT size=2>The transaction attribute is set to NotSupported and the
container detects that the database resources were accessed.</FONT></P>
<P><FONT size=2>The transaction attribute is set to Supports and the container
detects that the method wasn't invoked from within a global
transaction.</FONT></P>
<P><FONT size=2>The transaction attribute is set to Never and the container
detects that database resources are accessed. </FONT></P>
<P><SPAN class=683455808-25052004><FONT face=Verdana color=#000080
size=2></FONT></SPAN>&nbsp;</P>
<P><FONT face=Verdana color=#000080 size=2><SPAN class=683455808-25052004>Best
Regards</SPAN></FONT></P>
<P><FONT face=Verdana color=#000080 size=2><SPAN
class=683455808-25052004>Jaise</SPAN></FONT></P></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
 <DIV></DIV>
 <DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left><FONT
 face=Tahoma size=2>-- --Original Message-- --<BR><B>From:</B> A mailing list
 for Java(tm) 2 Platform, Enterprise Edition
 [mailto:J2EE-INTEREST@(protected)] <B>On Behalf Of </B>Ashutosh
 Bhardwaj<BR><B>Sent:</B> Tuesday, May 25, 2004 1:22 PM<BR><B>To:</B>
 J2EE-INTEREST@(protected)<BR><B>Subject:</B>
Transactions<BR><BR></FONT></DIV>
 <DIV><SPAN class=390085007-25052004><FONT face=Arial size=2>Can somebody
throw
 some lighty on local and global transactions ? what are shareable and
 unsahreable connections?</FONT></SPAN></DIV>
 <DIV><SPAN class=390085007-25052004><FONT face=Arial
 size=2></FONT></SPAN>&nbsp;</DIV>
 <DIV><SPAN class=390085007-25052004><FONT face=Arial
 size=2>regards,</FONT></SPAN></DIV>
 <DIV><SPAN class=390085007-25052004><FONT face=Arial
 size=2>ashutosh</FONT></SPAN></DIV>==========================================
=================================
 To unsubscribe, send email to listserv@(protected) and include in the body
of
 the message "signoff J2EE-INTEREST". For general help, send email to
 listserv@(protected) and include in the body of the message "help".
 <P></P></BLOCKQUOTE></BODY></HTML>
===========================================================================
To unsubscribe, send email to listserv@(protected) and include in the body
of the message "signoff J2EE-INTEREST".  For general help, send email to
listserv@(protected) and include in the body of the message "help".
<p>

©2008 junlu.com - Jax Systems, LLC, U.S.A.