  | 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
|
|
|
  | | | Global transaction problem... | Global transaction problem... 2003-07-31 - By Moore, Gary
Back Ramya,
It sounds like you are calling a SB method which calls another SB method.
It also appears as though you are tyring to do this with 2 seperate DataSources.
If you are using 2 datasources, then the underlying database must support a 2 phase commit operation so that each DataSource instance can coordinate commit and rollback together.
If the only difference is the schema, then you may try to use the same data source, and if possible the same connection (you could pass it to the other method call as a param) then simple prefix your schema to the table in SQL. This approach has the drawback of having the reference to the schema name in the SQL though.
-- --Original Message-- -- From: Ramya_Sundaresan [mailto:Ramya_Sundaresan@(protected)] Sent: Thursday, July 31, 2003 7:59 AM To: J2EEPATTERNS-INTEREST@(protected) Subject: Global transaction problem...
hi
I have a doubt w.r.t the global transaction problem in ejb
I have a method pointing to a schema in a session bean
As i loop through this resultset, i am invoking another method that points to a differenct schema and try to insert data into another table... While doing so i get the following error:
"An illegal attempt to use multiple resources that have only one-phase capability has occurred within a global transaction."
Please help me out
ramya
************************************************************************** This email (including any attachments) is intended for the sole use of the intended recipient/s and may contain material that is CONFIDENTIAL AND PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or distribution or forwarding of any or all of the contents in this message is STRICTLY PROHIBITED. If you are not the intended recipient, please contact the sender by email and delete all copies; your cooperation in this regard is appreciated. **************************************************************************
==================================================================== Community Web Site (Core J2EE Patterns Catalog - Online Version): http://java.sun.com/blueprints/corej2eepatterns Getting Started (Beta Version): http://developer.java.sun.com/developer/technicalArticles/J2EE/patterns/ Get the book: http://www.amazon.com/exec/obidos/ASIN/0130648841/corej2eepatte-20 (See http://tte-20.ora-code.com) List Archive: http://archives.java.sun.com/archives/j2eepatterns-interest.html Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to listserv@(protected)
==================================================================== Community Web Site (Core J2EE Patterns Catalog - Online Version): http://java.sun.com/blueprints/corej2eepatterns Getting Started (Beta Version): http://developer.java.sun.com/developer/technicalArticles/J2EE/patterns/ Get the book: http://www.amazon.com/exec/obidos/ASIN/0130648841/corej2eepatte-20 (See http://tte-20.ora-code.com) List Archive: http://archives.java.sun.com/archives/j2eepatterns-interest.html Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to listserv@(protected)
|
|
 |