-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Session and transaction handling issue- Spring and Hibernate
PostPosted: Mon Nov 12, 2007 5:39 pm 
Newbie

Joined: Mon Nov 12, 2007 5:32 pm
Posts: 1
In our scenario we are having

1)Bean A and Bean B
2)The transaction attribute of Bean A is requires and the Transaction Attribute of Bean B is Requires New.
3) Bean A calls Bean B by passing the datasource as an input parameter.
4)When Bean A calls Bean B the current transaction of Bean A is suspended and new transaction is created.

Then TransactionSyncronizationManager clears the transaction synchronization. While trying to initialise a new transaction the below exception is thrown.

[JtaTransactionManager] Suspending current transaction, creating new transaction with name [com.priya...sequence.interfaces.ICustomMySequenceOrganizer.getSequenceNextVal]

[org.springframework.transaction.support.TransactionSynchronizationManager] Removed value [org.springframework.orm.hibernate3.SessionHolder@1d16efc] for key [org.hibernate.impl.SessionFactoryImpl@895684] from thread [http-localhost%2F10.3.89.177-8080-1]


[org.springframework.transaction.support.TransactionSynchronizationManager] Clearing transaction synchronization

[STDERR] java.lang.IllegalStateException: Trying to change transaction TransactionImple < ac, BasicAction: a0359b1:4e3:4734f5c7:fc status: ActionStatus.RUNNING > in enlist!

[STDERR] at org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener.enlist(TxConnectionManager.java:525)

[STDERR] at org.jboss.resource.connectionmanager.TxConnectionManager.transactionStarted(TxConnectionManager.java:328)

[STDERR] at org.jboss.resource.connectionmanager.CachedConnectionManager.userTransactionStarted(CachedConnectionManager.java:360)

[STDERR] at org.jboss.tm.usertx.client.ServerVMClientUserTransaction.begin(ServerVMClientUserTransaction.java:127)

[STDERR] at org.springframework.transaction.jta.JtaTransactionManager.doJtaBegin(JtaTransactionManager.java:724)

[STDERR] at org.springframework.transaction.jta.JtaTransactionManager.doBegin(JtaTransactionManager.java:681)

[STDERR] at org.springframework.transaction.support.AbstractPlatformTransactionManager.handleExistingTransaction(AbstractPlatformTransactionManager.java:396)

[STDERR] at org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:329)

[STDERR] at org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(TransactionAspectSupport.java:262)

[STDERR] at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:101)

[STDERR] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)

[STDERR] at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)

[STDERR] at $Proxy89.getSequenceNextVal(Unknown Source)


Can you please help me out in this issue?

Thanks,
Kavipriya


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.