Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Eclipse Process Manager (Stardust) » Transaction handling exceptions using Stardust with JBoss 5.1 and Jackrabbit(Transaction handling exceptions thrown using Stardust with JBoss 5.1 and Jackrabbit)
Transaction handling exceptions using Stardust with JBoss 5.1 and Jackrabbit [message #742033] Thu, 20 October 2011 05:26 Go to next message
Srinivasan Iyer is currently offline Srinivasan IyerFriend
Messages: 36
Registered: October 2011
Member
JBoss throws an IllegalStateException such as below when Stardust services are used. It seems to occur only after DMS operations have been executed.

java.lang.IllegalStateException: Trying to change transaction TransactionImple < ac, BasicAction: af492b4:c1e1:4e15bbe6:286 status: ActionStatus.RUNNING > in enlist! at org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener.enlist(TxConnectionManager.java:623) at org.jboss.resource.connectionmanager.TxConnectionManager.transactionStarted(TxConnectionManager.java:394) at org.jboss.resource.connectionmanager.CachedConnectionManager.userTransactionStarted(CachedConnectionManager.java:350) at org.jboss.tm.usertx.UserTransactionRegistry.userTransactionStarted(UserTransactionRegistry.java:119) at org.jboss.tm.usertx.client.ServerVMClientUserTransaction.begin(ServerVMClientUserTransaction.java:141) at org.springframework.transaction.jta.JtaTransactionManager.doJtaBegin(JtaTransactionManager.java:863) at org.springframework.transaction.jta.JtaTransactionManager.doBegin(JtaTransactionManager.java:820)

[Updated on: Thu, 20 October 2011 08:28]

Report message to a moderator

Re: Transaction handling exceptions using Stardust with JBoss 5.1 and Jackrabbit [message #742037 is a reply to message #742033] Thu, 20 October 2011 05:30 Go to previous messageGo to next message
Srinivasan Iyer is currently offline Srinivasan IyerFriend
Messages: 36
Registered: October 2011
Member
Spring service calls using Stardust API initiate a new transaction. Stardust service calls participate in this transaction since Stardust services in general have the transaction propagation attribute required defined. An Stardust login call (done per service call), however, is executed in a nested transaction (transaction attribute requiresNew). So when it comes to an Stardust login, the current transaction is suspended and resumed once the nested transaction (the actual login) is done.

The problem is that Jackrabbit does not explicitly close sessions per transaction, but keeps it open and JBoss does not allow to suspend transactions if resource handles are still open. You need to make sure that all Stardust services used in any custom business facade method are retrieved first (enforcing login) before you use the DMS service for the very first time.

A service call stack such as the following fails:

>> start custom business method
>> do business logic
>> get DocumentManagementService
>> use DocumentManagentService
>> do business logic
>> get WorkflowService
>> use WorkflowService
>> use DocumentManagentService
>> do business logic
>> get QueryService
>> use QueryService
>> end custom business method

The following service call stack on the other hand does not fail:

>> start custom business method
>> get DocumentManagementService
>> get WorkflowService
>> get QueryService
>> do business logic
>> use DocumentManagentService
>> do business logic
>> use WorkflowService
>> use DocumentManagentService
>> do business logic
>> use QueryService
>> end custom business method


Please note: If you for example would have a service call (no Stardust service calls included at all) with transaction attribute requiresNew after Jackrabbit has been used, you would see this exception thrown from JBoss as well.

[Updated on: Thu, 20 October 2011 08:29]

Report message to a moderator

Re: Transaction handling exceptions using Stardust with JBoss 5.1 and Jackrabbit [message #742211 is a reply to message #742037] Thu, 20 October 2011 09:34 Go to previous message
Srinivasan Iyer is currently offline Srinivasan IyerFriend
Messages: 36
Registered: October 2011
Member
The problems with Jackrabbit listed above seem to be related to this ticket
https://issues.apache.org/jira/browse/JCR-2712
Previous Topic:How to turn on remote debugging in Tomcat 5.5?
Next Topic:Identifying the slowest non-interactive (automatic) activity instance using SQL
Goto Forum:
  


Current Time: Thu Apr 25 07:42:48 GMT 2024

Powered by FUDForum. Page generated in 0.03446 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top