[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-2703?page=c...
]
Vladimir Ivanov commented on HHH-2703:
--------------------------------------
As far as I understand, it's impossible to rollback the transaction through the
setRollbackOnly() method call (that is why WebSphereExtendedJTATransactionLookup class
throws java.lang.UnsupportedOperationException), while it's possible to determine
transaction status through com.ibm.websphere.jtaextensions.ExtendedJTATransaction class
(and HHH-3111 fixed that way). Does it possible to use com.ibm.wsspi.uow.UOWManager
implementation class which is available under "java:comp/websphere/UOWManager"
name in JNDI for this purpose? It is public and supported by IBM and have already been
used by Spring framework team in their
org.springframework.transaction.jta.WebSphereUowTransactionManager class (they need it to
implement suspend/resume transaction functionality, for example for REQUIRES_NEW or NEVER
transaction attributes).
For example, following code rollbacks JTA transaction in our case:
try {
// Retrieve an instance of the UOWSynchronizationRegistry interface from
JNDI.
final InitialContext initialContext = new InitialContext();
final UOWSynchronizationRegistry uowSyncRegistry =
(UOWSynchronizationRegistry)initialContext.lookup("java:comp/websphere/UOWSynchronizationRegistry");
uowSyncRegistry.setRollbackOnly();
logDebug(this, "Transaction is now marked for rollback");
} catch (Exception e) {
logDebug(this, "UOWSynchronizationRegistry - exception was
thrown:", e);
throw new RuntimeException(e);
}
Investigate integration between Spring and WAS TM
-------------------------------------------------
Key: HHH-2703
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-2703
Project: Hibernate Core
Issue Type: Task
Components: core
Reporter: Steve Ebersole
Assignee: Steve Ebersole
Supposedly as a result of Spring and IBM's blood pact, Spring has tight integration
with the WAS TM (not sure how that is possible since IBM continually claims that TM access
is unsupported whenever this is asked in relation to Hibernate). Anyway, there may be
some stuff we could use here...
http://blog.interface21.com/main/2007/06/21/spring-framework-certified-on...
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira