Although you are access the same database (resource) you will still need application 
servers that support two-phase commit (2PC) in order to execute operations
across servers within a single transaction.  The this is required because you are 
using two separate connections to the database that would otherwise be unaware of
each other.  You need to 2PC to inform the database that these two database 
connections are working together within the same transaction.

It's feasible that a vendor could provide connection sharing  through some type of 
database gateway -- that would eliminate the need for 2PC -- but I'm not aware of
one that does this.

Richard
--
Richard Monson-Haefel
Author of Enterprise JavaBeans, 2nd Edition  (O'Reilly 2000)
Co-Author of Java Message Service (O'Reilly 2000)
http://www.EjbNow.com


"Maliyackel, Anup Kumar (CTS)" wrote:

> hi
>
> I have read that when developinng J2ee applications using two app servers or
> two databases, the two phase commit protocol is necessary to maintain data
> consistency.
>
> If I am using two app servers , but writing to the same database how
> important is this?
>
> Regards
> Anup
>
> This e-mail and any files transmitted with it are for the sole use of the intended 
>recipient(s) and may contain confidential and privileged information.
> If you are not the intended recipient, please contact the sender by reply e-mail and 
>destroy all copies of the original message.
> Any unauthorised review, use, disclosure, dissemination, forwarding, printing or 
>copying of this email or any action taken in reliance on this e-mail is strictly
> prohibited and may be unlawful.
>
>                 Visit us at http://www.cognizant.com
>
> ===========================================================================
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff EJB-INTEREST".  For general help, send email to
> [EMAIL PROTECTED] and include in the body of the message "help".

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to