|
|
|
shivam
|
Hi,
How does database transaction rollback will work in open esb? As an example, I have performed insert, update, delete operations on three different tables, defining each operation in a seperate wsdl. But insert and Update operations are not rolled back when SQL error occured in delete operation. I tried this with setting atomic property of bpel process to true. Please let me know if I am doing any wrong in above process. Thanks, SHiva M |
|
Andreas Egloff
|
It should roll back all of them if the BP is set to atomic. Can you
describe the scenario you set up? Is it one-way? Do you try to do any error/fault handilng yourself? Technically the way it works is that the original caller (consumer) will not commit until it receives a successful ACK (DONE), if it receives an ERROR it will roll back. The atomic BP will propagate the same transaction context to all invocations, and the providing components will enlist the resources in that XA transaction. Andi shivam wrote: > Hi, > > How does database transaction rollback will work in open esb? > > As an example, I have performed insert, update, delete operations on three > different tables, defining each operation in a seperate wsdl. But insert and > Update operations are not rolled back when SQL error occured in delete > operation. I tried this with setting atomic property of bpel process to > true. > > Please let me know if I am doing any wrong in above process. > > Thanks, > SHiva M > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] |
||||||||||||||||
|
Chris Selwyn
|
In reply to this post
by shivam
Some javascript/style in this post has been disabled (why?)
Setting Atomic=true does not, by itself, cause the process to execute
in a single transaction so that the actions can get rolled back.All Atomic=true does is cause the process to execute all actions in a transaction if a transaction already exists. You need to take into consideration what it is that is triggering the process to execute and whether or not it starts a transaction. See http://wiki.open-esb.java.net/Wiki.jsp?page=MEprocessingAndPropertyPropagation for more information about how transactions are handled. Chris shivam wrote: Hi, How does database transaction rollback will work in open esb? As an example, I have performed insert, update, delete operations on three different tables, defining each operation in a seperate wsdl. But insert and Update operations are not rolled back when SQL error occured in delete operation. I tried this with setting atomic property of bpel process to true. Please let me know if I am doing any wrong in above process. Thanks, SHiva M |
||||||||||||||||
|
jGofio
|
In reply to this post
by shivam
Hi, the solution is in the previous messages.
One way to make it work is using another BPEL (call it Proxy), that calls your atomic one. Proxy is not atomic and it just calls to the atomic BPEL passing the request and returnning the response. When the proxy calls the atomic BPEL, a new transaction is started and then the atomic one is executed inside this transaction and rolled back is something goes wrong. The bad new is that we are having problems if the bpel-se persistence is on and it generates and exception trying to execute again and again the atomic BPEL that has been rolled back. Hope this help.
|
||||||||||||||||
|
Chris Selwyn
|
Some javascript/style in this post has been disabled (why?)
I don't know why you are getting re-execution of the faulting process
but..My understanding is that in order for the child BPEL to be executed in a transaction then the parent BPEL must have "atomic=false". This causes the BPEL engine to always start a new transaction on every <invoke> that the parent process executes. If you had "atomic=true" then the child process would only inherit the parent process's transaction context and if there was none then the child would still not be in a transaction. Chris jGofio wrote: Hi, the solution is in the previous messages. One way to make it work is using another BPEL (call it Proxy), that calls your atomic one. Proxy is not atomic and it just calls to the atomic BPEL passing the request and returnning the response. When the proxy calls the atomic BPEL, a new transaction is started and then the atomic one is executed inside this transaction and rolled back is something goes wrong. The bad new is that we are having problems if the bpel-se persistence is on and it generates and exception trying to execute again and again the atomic BPEL that has been rolled back. Hope this help. shivam wrote: |
||||||||||||||||
|
jGofio
|
I have the parent with atomic=false. But if the invoked BPEL (atomic=true and it uses Batabase BC with XATransaction) fails, ie. trying to execute an incorrect sql, then the BPEL throws this exception:
JTS5054: Unexpected error occurred in after completion java.lang.NullPointerException at com.sun.jbi.engine.bpel.core.bpel.debug.BPELProcessRefImpl.removeProcessInstance(BPELProcessRefImpl.java:268) at com.sun.jbi.engine.bpel.core.bpel.debug.VirtualBPELEngineImpl.removeProcessInstance(VirtualBPELEngineImpl.java:134) at com.sun.jbi.engine.bpel.core.bpel.debug.DefaultDebugger.processInstanceDied(DefaultDebugger.java:355) at com.sun.jbi.engine.bpel.core.bpel.engine.impl.BPELProcessManagerImpl.instanceComplete(BPELProcessManagerImpl.java:1078) at com.sun.jbi.engine.bpel.core.bpel.engine.impl.BPELProcessManagerImpl.terminate(BPELProcessManagerImpl.java:803) at com.sun.jbi.engine.bpel.core.bpel.util.TxPropagationSynchronization.afterCompletion(TxPropagationSynchronization.java:75) at com.sun.jts.jta.SynchronizationImpl.after_completion(SynchronizationImpl.java:154) at com.sun.jts.CosTransactions.RegisteredSyncs.distributeAfter(RegisteredSyncs.java:210) at com.sun.jts.CosTransactions.TopCoordinator.afterCompletion(TopCoordinator.java:2585) at com.sun.jts.CosTransactions.CoordinatorTerm.rollback(CoordinatorTerm.java:556) at com.sun.jts.CosTransactions.TerminatorImpl.rollback(TerminatorImpl.java:305) at com.sun.jts.jta.TransactionImpl.rollback(TransactionImpl.java:155) at com.sun.enterprise.distributedtx.J2EETransaction.rollback(J2EETransaction.java:521) at com.sun.jbi.engine.bpel.core.bpel.persist.impl.StateManagerImpl.performDBTransactionForDBOs(StateManagerImpl.java:661) at com.sun.jbi.engine.bpel.core.bpel.persist.impl.StateManagerImpl.updateState(StateManagerImpl.java:440) at com.sun.jbi.engine.bpel.core.bpel.persist.impl.StateManagerImpl.persistState(StateManagerImpl.java:393) at com.sun.jbi.engine.bpel.core.bpel.model.runtime.impl.PersistenceManager.doXA(PersistenceManager.java:340) at com.sun.jbi.engine.bpel.core.bpel.model.runtime.impl.PersistenceManager.cancelXA(PersistenceManager.java:318) at com.sun.jbi.engine.bpel.core.bpel.model.runtime.impl.InvokeUnitImpl.processStatus(InvokeUnitImpl.java:882) at com.sun.jbi.engine.bpel.core.bpel.model.runtime.impl.InvokeUnitImpl.process(InvokeUnitImpl.java:542) at com.sun.jbi.engine.bpel.core.bpel.model.runtime.impl.InvokeUnitImpl.doAction(InvokeUnitImpl.java:182) at com.sun.jbi.engine.bpel.core.bpel.engine.impl.BPELInterpreter.execute(BPELInterpreter.java:162) at com.sun.jbi.engine.bpel.core.bpel.engine.BusinessProcessInstanceThread.execute(BusinessProcessInstanceThread.java:98) at com.sun.jbi.engine.bpel.core.bpel.engine.impl.BPELProcessManagerImpl.process(BPELProcessManagerImpl.java:1031) at com.sun.jbi.engine.bpel.core.bpel.engine.impl.EngineImpl.process(EngineImpl.java:289) at com.sun.jbi.engine.bpel.core.bpel.engine.impl.EngineImpl.process(EngineImpl.java:1291) at com.sun.jbi.engine.bpel.BPELSEInOutThread.processStatus(BPELSEInOutThread.java:374) at com.sun.jbi.engine.bpel.BPELSEInOutThread.processMsgEx(BPELSEInOutThread.java:231) at com.sun.jbi.engine.bpel.BPELSEInOutThread.run(BPELSEInOutThread.java:183) RAR5027:Unexpected exception in resource pooling javax.transaction.SystemException: java.lang.IllegalStateException at com.sun.enterprise.distributedtx.J2EETransactionManagerOpt.getTransaction(J2EETransactionManagerOpt.java:479) at com.sun.enterprise.resource.SystemResourceManagerImpl.getTransaction(SystemResourceManagerImpl.java:71) at com.sun.enterprise.resource.PoolManagerImpl.getResource(PoolManagerImpl.java:173) at com.sun.enterprise.connectors.ConnectionManagerImpl.internalGetConnection(ConnectionManagerImpl.java:327) at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:189) at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:165) at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:158) at com.sun.gjc.spi.base.DataSource.getConnection(DataSource.java:108) at com.sun.jbi.engine.bpel.core.bpel.connection.DBConnectionFactory.createNonXAConnection(DBConnectionFactory.java:313) at com.sun.jbi.engine.bpel.core.bpel.persist.impl.StateManagerImpl.performDBTransactionForDBOs(StateManagerImpl.java:688) at com.sun.jbi.engine.bpel.core.bpel.persist.impl.StateManagerImpl.updateState(StateManagerImpl.java:445) at com.sun.jbi.engine.bpel.core.bpel.persist.impl.StateManagerImpl.persistState(StateManagerImpl.java:393) at com.sun.jbi.engine.bpel.core.bpel.model.runtime.impl.PersistenceManager.updateState(PersistenceManager.java:268) at com.sun.jbi.engine.bpel.core.bpel.model.runtime.impl.ReplyUnitImpl.completeReply(ReplyUnitImpl.java:305) at com.sun.jbi.engine.bpel.core.bpel.model.runtime.impl.ReplyUnitImpl.doAction(ReplyUnitImpl.java:143) at com.sun.jbi.engine.bpel.core.bpel.engine.impl.BPELInterpreter.execute(BPELInterpreter.java:162) at com.sun.jbi.engine.bpel.core.bpel.engine.BusinessProcessInstanceThread.execute(BusinessProcessInstanceThread.java:98) at com.sun.jbi.engine.bpel.core.bpel.engine.impl.BPELProcessManagerImpl.process(BPELProcessManagerImpl.java:1031) at com.sun.jbi.engine.bpel.core.bpel.engine.impl.EngineImpl.process(EngineImpl.java:289) at com.sun.jbi.engine.bpel.core.bpel.engine.impl.EngineImpl.process(EngineImpl.java:1291) at com.sun.jbi.engine.bpel.BPELSEInOutThread.processStatus(BPELSEInOutThread.java:350) at com.sun.jbi.engine.bpel.BPELSEInOutThread.processMsgEx(BPELSEInOutThread.java:231) at com.sun.jbi.engine.bpel.BPELSEInOutThread.run(BPELSEInOutThread.java:183) And then this exception appears again and again: RAR5117 : Failed to obtain/create connection from connection pool [ bpelsePoolNoXA ]. Reason : javax.transaction.SystemException: java.lang.IllegalStateException RAR5114 : Error allocating connection : [Error in allocating a connection. Cause: javax.transaction.SystemException: java.lang.IllegalStateException] BPCOR-6144: Unable to connect to database at 2009/09/30 09:42:24 475. Engine : bpelse1, Cause : Error in allocating a connection. Cause: javax.transaction.SystemException: java.lang.IllegalStateException RAR5027:Unexpected exception in resource pooling javax.transaction.SystemException: java.lang.IllegalStateException at com.sun.enterprise.distributedtx.J2EETransactionManagerOpt.getTransaction(J2EETransactionManagerOpt.java:479) at com.sun.enterprise.resource.SystemResourceManagerImpl.getTransaction(SystemResourceManagerImpl.java:71) at com.sun.enterprise.resource.PoolManagerImpl.getResource(PoolManagerImpl.java:173) at com.sun.enterprise.connectors.ConnectionManagerImpl.internalGetConnection(ConnectionManagerImpl.java:327) at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:189) at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:165) at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:158) at com.sun.gjc.spi.base.DataSource.getConnection(DataSource.java:108) at com.sun.jbi.engine.bpel.core.bpel.connection.DBConnectionFactory.createNonXAConnection(DBConnectionFactory.java:313) at com.sun.jbi.engine.bpel.core.bpel.connection.DBConnectionFactory.isConnectionRestored(DBConnectionFactory.java:624) at com.sun.jbi.engine.bpel.core.bpel.connection.DBConnectionFactory.doNonXAConnectionRetry(DBConnectionFactory.java:435) at com.sun.jbi.engine.bpel.core.bpel.connection.DBConnectionFactory.doConnectionRetry(DBConnectionFactory.java:405) at com.sun.jbi.engine.bpel.core.bpel.persist.impl.StateManagerImpl.performDBTransactionForDBOs(StateManagerImpl.java:725) at com.sun.jbi.engine.bpel.core.bpel.persist.impl.StateManagerImpl.updateState(StateManagerImpl.java:445) at com.sun.jbi.engine.bpel.core.bpel.persist.impl.StateManagerImpl.persistState(StateManagerImpl.java:393) at com.sun.jbi.engine.bpel.core.bpel.model.runtime.impl.PersistenceManager.updateState(PersistenceManager.java:268) at com.sun.jbi.engine.bpel.core.bpel.model.runtime.impl.ReplyUnitImpl.completeReply(ReplyUnitImpl.java:305) at com.sun.jbi.engine.bpel.core.bpel.model.runtime.impl.ReplyUnitImpl.doAction(ReplyUnitImpl.java:143) at com.sun.jbi.engine.bpel.core.bpel.engine.impl.BPELInterpreter.execute(BPELInterpreter.java:162) at com.sun.jbi.engine.bpel.core.bpel.engine.BusinessProcessInstanceThread.execute(BusinessProcessInstanceThread.java:98) at com.sun.jbi.engine.bpel.core.bpel.engine.impl.BPELProcessManagerImpl.process(BPELProcessManagerImpl.java:1031) at com.sun.jbi.engine.bpel.core.bpel.engine.impl.EngineImpl.process(EngineImpl.java:289) at com.sun.jbi.engine.bpel.core.bpel.engine.impl.EngineImpl.process(EngineImpl.java:1291) at com.sun.jbi.engine.bpel.BPELSEInOutThread.processStatus(BPELSEInOutThread.java:350) at com.sun.jbi.engine.bpel.BPELSEInOutThread.processMsgEx(BPELSEInOutThread.java:231) at com.sun.jbi.engine.bpel.BPELSEInOutThread.run(BPELSEInOutThread.java:183) If I go to the bpel-se persistence database, in the table state, its state column is 'RUNNING' changing this value to 'DONE' and restarting the server, the exception didn't appear.
|
||||||||||||||||
|
Chris Selwyn
|
Some javascript/style in this post has been disabled (why?)
Ouch... I think that one will have to be one for the developers.Chris jGofio wrote:
|
||||||||||||||||
|
shivam
|
In reply to this post
by jGofio
Thanks JGofio for the suggestion.
I followed as u suggested. But insert operation is not rolled back when error occured in the transaction. I tried this on derby database. I used XADatasource transaction. In one of the posts, it is said that some databases will have issues with XA support. Is this true with derby? It is also said that transaction rollback can also be done by compensation handler. Please let me know how can we do this. Sorry for the late reply. Thanks, Shiva M
|
||||||||||||||||
|
jGofio
|
Hi,
First at all I working with MySQL. Compensation is a good option, and can always work for everything, because you can need to work with elements that aren't XA. But if we are talking about short life process that works with databases (that support XA), it will be good do it with XATransaction, because compensation means you have to write code to redo a sql delete operation... imaging a table with a lot of columns and/or cascade deletes to other tables... What is exactly happenning (exception, log)? The database is rolledback if you shutdown glassfish?? Do you have BPEL-SE persistence enabled?
|
||||||||||||||||
|
shivam
|
Hi,
Thanks JGofio for the information. BPEL-SE persistence is not enabled. I tried it again by enabling . It seems that the record is not inserted when exception is raised in bpel process. But when I query the database it is saying that SQL state 40XL1: A lock could not be obtained within the time requested, same exception is generating even after Glassfish is shutdown and database is connected again. I can notice that record is not inserted after I start the netbeans again. I also need to try this with Oracle database. Is anyone worked with tranaction rollback in BPEL for Oracle DB. Thanks, SHIva M
|
||||||||||||||||
|
shivam
|
Hi,
Transaction rollback for Oracle is working. However the following exception is repeating again and again RAR5027:Unexpected exception in resource pooling javax.transaction.SystemException: java.lang.IllegalStateException at com.sun.enterprise.distributedtx.J2EETransactionManagerOpt.getTransaction(J2EETransactionManagerOpt.java:479) at com.sun.enterprise.resource.SystemResourceManagerImpl.getTransaction(SystemResourceManagerImpl.java:71) at com.sun.enterprise.resource.PoolManagerImpl.getResource(PoolManagerImpl.java:173) at com.sun.enterprise.connectors.ConnectionManagerImpl.internalGetConnection(ConnectionManagerImpl.java:327) at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:189) at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:165) at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:158) at com.sun.gjc.spi.base.DataSource.getConnection(DataSource.java:108) at com.sun.jbi.engine.bpel.core.bpel.connection.DBConnectionFactory.createNonXAConnection(DBConnectionFactory.java:313) at com.sun.jbi.engine.bpel.core.bpel.connection.DBConnectionFactory.isConnectionRestored(DBConnectionFactory.java:624) at com.sun.jbi.engine.bpel.core.bpel.connection.DBConnectionFactory.doNonXAConnectionRetry(DBConnectionFactory.java:444) at com.sun.jbi.engine.bpel.core.bpel.connection.DBConnectionFactory.doConnectionRetry(DBConnectionFactory.java:405) at com.sun.jbi.engine.bpel.core.bpel.persist.impl.StateManagerImpl.performDBTransactionForDBOs(StateManagerImpl.java:725) at com.sun.jbi.engine.bpel.core.bpel.persist.impl.StateManagerImpl.updateState(StateManagerImpl.java:445) at com.sun.jbi.engine.bpel.core.bpel.persist.impl.StateManagerImpl.persistState(StateManagerImpl.java:393) at com.sun.jbi.engine.bpel.core.bpel.model.runtime.impl.PersistenceManager.updateState(PersistenceManager.java:268) at com.sun.jbi.engine.bpel.core.bpel.model.runtime.impl.ReplyUnitImpl.sendReply(ReplyUnitImpl.java:225) at com.sun.jbi.engine.bpel.core.bpel.model.runtime.impl.ReplyUnitImpl.doAction(ReplyUnitImpl.java:154) at com.sun.jbi.engine.bpel.core.bpel.model.runtime.impl.CodeReUseHelper.executeChildActivities(CodeReUseHelper.java:65) at com.sun.jbi.engine.bpel.core.bpel.model.runtime.impl.StructuredActivityUnitImpl.executeChildActivities(StructuredActivityUnitImpl.java:193) at com.sun.jbi.engine.bpel.core.bpel.model.runtime.impl.StructuredActivityUnitImpl.doAction(StructuredActivityUnitImpl.java:93) at com.sun.jbi.engine.bpel.core.bpel.model.runtime.impl.SequenceUnitImpl.doAction(SequenceUnitImpl.java:95) at com.sun.jbi.engine.bpel.core.bpel.model.runtime.impl.CodeReUseHelper.executeChildActivities(CodeReUseHelper.java:65) at com.sun.jbi.engine.bpel.core.bpel.model.runtime.impl.CatchAllUnitImpl.doAction(CatchAllUnitImpl.java:128) at com.sun.jbi.engine.bpel.core.bpel.model.runtime.impl.BPELProcessInstanceImpl.doFaultHandlingIfPossible(BPELProcessInstanceImpl.java:1142) at com.sun.jbi.engine.bpel.core.bpel.model.runtime.impl.BPELProcessInstanceImpl.doResumeAction(BPELProcessInstanceImpl.java:750) at com.sun.jbi.engine.bpel.core.bpel.model.runtime.impl.ActivityUnitImpl.doPassControlToParent(ActivityUnitImpl.java:253) at com.sun.jbi.engine.bpel.core.bpel.model.runtime.impl.StructuredActivityUnitImpl.doResumeAction(StructuredActivityUnitImpl.java:143) at com.sun.jbi.engine.bpel.core.bpel.model.runtime.impl.ActivityUnitImpl.doPassControlToParent(ActivityUnitImpl.java:253) at com.sun.jbi.engine.bpel.core.bpel.model.runtime.impl.VirtualThrowUnitImpl.doThrowAction(VirtualThrowUnitImpl.java:83) at com.sun.jbi.engine.bpel.core.bpel.model.runtime.impl.AbstractThrowUnitImpl.doAction(AbstractThrowUnitImpl.java:47) at com.sun.jbi.engine.bpel.core.bpel.engine.impl.BPELInterpreter.execute(BPELInterpreter.java:162) at com.sun.jbi.engine.bpel.core.bpel.engine.BusinessProcessInstanceThread.execute(BusinessProcessInstanceThread.java:98) at com.sun.jbi.engine.bpel.core.bpel.engine.impl.BPELProcessManagerImpl.process(BPELProcessManagerImpl.java:1031) at com.sun.jbi.engine.bpel.core.bpel.engine.impl.EngineImpl.process(EngineImpl.java:289) at com.sun.jbi.engine.bpel.core.bpel.engine.impl.EngineImpl.process(EngineImpl.java:1291) at com.sun.jbi.engine.bpel.BPELSEInOutThread.processStatus(BPELSEInOutThread.java:374) at com.sun.jbi.engine.bpel.BPELSEInOutThread.processMsgEx(BPELSEInOutThread.java:231) at com.sun.jbi.engine.bpel.BPELSEInOutThread.run(BPELSEInOutThread.java:183) RAR5117 : Failed to obtain/create connection from connection pool [ bpelseNonXAPool ]. Reason : javax.transaction.SystemException: java.lang.IllegalStateException RAR5114 : Error allocating connection : [Error in allocating a connection. Cause: javax.transaction.SystemException: java.lang.IllegalStateException] I don't unserstand why the error is generating for bpelseNonXAPool connection pool which is independant of the connection pool created for oracle . As a workaround, I disabled "Allow Non Component Callers: " for connection pool bpelseNonXAPool . The exception is disappeared, but I am unable to process further if any error is occured in my bpel for Transaction roll back using oracle. Thanks, Shiva M
|
||||||||||||||||
|
fmartin
|
In reply to this post
by shivam
One question regarding this:
What version of Oracle are you using? Is it Oracle express? Because I had similar problems with XE, that do not happen with 11g Standard Edition. Fernando -----Original message----- From: shivam [hidden email] Date: Tue, 13 Oct 2009 14:30:10 +0200 To: [hidden email] Subject: Re: Transaction rollback > > Hi, > > Transaction rollback for Oracle is working. > > However the following exception is repeating again and again > RAR5027:Unexpected exception in resource pooling > javax.transaction.SystemException: java.lang.IllegalStateException > at > com.sun.enterprise.distributedtx.J2EETransactionManagerOpt.getTransaction(J2EETransactionManagerOpt.java:479) > at > com.sun.enterprise.resource.SystemResourceManagerImpl.getTransaction(SystemResourceManagerImpl.java:71) > at > com.sun.enterprise.resource.PoolManagerImpl.getResource(PoolManagerImpl.java:173) > at > com.sun.enterprise.connectors.ConnectionManagerImpl.internalGetConnection(ConnectionManagerImpl.java:327) > at > com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:189) > at > com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:165) > at > com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:158) > at > com.sun.gjc.spi.base.DataSource.getConnection(DataSource.java:108) > at > com.sun.jbi.engine.bpel.core.bpel.connection.DBConnectionFactory.createNonXAConnection(DBConnectionFactory.java:313) > at > com.sun.jbi.engine.bpel.core.bpel.connection.DBConnectionFactory.isConnectionRestored(DBConnectionFactory.java:624) > at > com.sun.jbi.engine.bpel.core.bpel.connection.DBConnectionFactory.doNonXAConnectionRetry(DBConnectionFactory.java:444) > at > com.sun.jbi.engine.bpel.core.bpel.connection.DBConnectionFactory.doConnectionRetry(DBConnectionFactory.java:405) > at > com.sun.jbi.engine.bpel.core.bpel.persist.impl.StateManagerImpl.performDBTransactionForDBOs(StateManagerImpl.java:725) > at > com.sun.jbi.engine.bpel.core.bpel.persist.impl.StateManagerImpl.updateState(StateManagerImpl.java:445) > at > com.sun.jbi.engine.bpel.core.bpel.persist.impl.StateManagerImpl.persistState(StateManagerImpl.java:393) > at > com.sun.jbi.engine.bpel.core.bpel.model.runtime.impl.PersistenceManager.updateState(PersistenceManager.java:268) > at > com.sun.jbi.engine.bpel.core.bpel.model.runtime.impl.ReplyUnitImpl.sendReply(ReplyUnitImpl.java:225) > at > com.sun.jbi.engine.bpel.core.bpel.model.runtime.impl.ReplyUnitImpl.doAction(ReplyUnitImpl.java:154) > at > com.sun.jbi.engine.bpel.core.bpel.model.runtime.impl.CodeReUseHelper.executeChildActivities(CodeReUseHelper.java:65) > at > com.sun.jbi.engine.bpel.core.bpel.model.runtime.impl.StructuredActivityUnitImpl.executeChildActivities(StructuredActivityUnitImpl.java:193) > at > com.sun.jbi.engine.bpel.core.bpel.model.runtime.impl.StructuredActivityUnitImpl.doAction(StructuredActivityUnitImpl.java:93) > at > com.sun.jbi.engine.bpel.core.bpel.model.runtime.impl.SequenceUnitImpl.doAction(SequenceUnitImpl.java:95) > at > com.sun.jbi.engine.bpel.core.bpel.model.runtime.impl.CodeReUseHelper.executeChildActivities(CodeReUseHelper.java:65) > at > com.sun.jbi.engine.bpel.core.bpel.model.runtime.impl.CatchAllUnitImpl.doAction(CatchAllUnitImpl.java:128) > at > com.sun.jbi.engine.bpel.core.bpel.model.runtime.impl.BPELProcessInstanceImpl.doFaultHandlingIfPossible(BPELProcessInstanceImpl.java:1142) > at > com.sun.jbi.engine.bpel.core.bpel.model.runtime.impl.BPELProcessInstanceImpl.doResumeAction(BPELProcessInstanceImpl.java:750) > at > com.sun.jbi.engine.bpel.core.bpel.model.runtime.impl.ActivityUnitImpl.doPassControlToParent(ActivityUnitImpl.java:253) > at > com.sun.jbi.engine.bpel.core.bpel.model.runtime.impl.StructuredActivityUnitImpl.doResumeAction(StructuredActivityUnitImpl.java:143) > at > com.sun.jbi.engine.bpel.core.bpel.model.runtime.impl.ActivityUnitImpl.doPassControlToParent(ActivityUnitImpl.java:253) > at > com.sun.jbi.engine.bpel.core.bpel.model.runtime.impl.VirtualThrowUnitImpl.doThrowAction(VirtualThrowUnitImpl.java:83) > at > com.sun.jbi.engine.bpel.core.bpel.model.runtime.impl.AbstractThrowUnitImpl.doAction(AbstractThrowUnitImpl.java:47) > at > com.sun.jbi.engine.bpel.core.bpel.engine.impl.BPELInterpreter.execute(BPELInterpreter.java:162) > at > com.sun.jbi.engine.bpel.core.bpel.engine.BusinessProcessInstanceThread.execute(BusinessProcessInstanceThread.java:98) > at > com.sun.jbi.engine.bpel.core.bpel.engine.impl.BPELProcessManagerImpl.process(BPELProcessManagerImpl.java:1031) > at > com.sun.jbi.engine.bpel.core.bpel.engine.impl.EngineImpl.process(EngineImpl.java:289) > at > com.sun.jbi.engine.bpel.core.bpel.engine.impl.EngineImpl.process(EngineImpl.java:1291) > at > com.sun.jbi.engine.bpel.BPELSEInOutThread.processStatus(BPELSEInOutThread.java:374) > at > com.sun.jbi.engine.bpel.BPELSEInOutThread.processMsgEx(BPELSEInOutThread.java:231) > at > com.sun.jbi.engine.bpel.BPELSEInOutThread.run(BPELSEInOutThread.java:183) > RAR5117 : Failed to obtain/create connection from connection pool [ > bpelseNonXAPool ]. Reason : javax.transaction.SystemException: > java.lang.IllegalStateException > RAR5114 : Error allocating connection : [Error in allocating a connection. > Cause: javax.transaction.SystemException: java.lang.IllegalStateException] > > I don't unserstand why the error is generating for bpelseNonXAPool > connection pool which is independant of the connection pool created for > oracle . > > As a workaround, I disabled "Allow Non Component Callers: " for connection > pool bpelseNonXAPool . > > The exception is disappeared, but I am unable to process further if any > error is occured in my bpel for Transaction roll back using oracle. > > Thanks, > Shiva M > > > shivam wrote: > > > > Hi, > > > > Thanks JGofio for the information. BPEL-SE persistence is not enabled. > > > > I tried it again by enabling . It seems that the record is not inserted > > when exception is raised in bpel process. > > > > But when I query the database it is saying that > > SQL state 40XL1: A lock could not be obtained within the time requested, > > same exception is generating even after Glassfish is shutdown and > > database is connected again. > > > > > > I can notice that record is not inserted after I start the netbeans again. > > > > I also need to try this with Oracle database. > > > > Is anyone worked with tranaction rollback in BPEL for Oracle DB. > > > > Thanks, > > SHIva M > > > > > > > > > > jGofio wrote: > >> > >> Hi, > >> > >> First at all I working with MySQL. > >> > >> Compensation is a good option, and can always work for everything, > >> because you can need to work with elements that aren't XA. > >> > >> But if we are talking about short life process that works with databases > >> (that support XA), it will be good do it with XATransaction, because > >> compensation means you have to write code to redo a sql delete > >> operation... imaging a table with a lot of columns and/or cascade deletes > >> to other tables... > >> > >> What is exactly happenning (exception, log)? The database is rolledback > >> if you shutdown glassfish?? Do you have BPEL-SE persistence enabled? > >> > >> > >> > >> > >> shivam wrote: > >>> > >>> Thanks JGofio for the suggestion. > >>> > >>> I followed as u suggested. > >>> > >>> But insert operation is not rolled back when error occured in the > >>> transaction. > >>> I tried this on derby database. I used XADatasource transaction. > >>> > >>> In one of the posts, it is said that some databases will have issues > >>> with XA support. Is this true with derby? > >>> > >>> It is also said that transaction rollback can also be done by > >>> compensation handler. > >>> > >>> Please let me know how can we do this. > >>> > >>> Sorry for the late reply. > >>> > >>> Thanks, > >>> Shiva M > >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> jGofio wrote: > >>>> > >>>> Hi, the solution is in the previous messages. > >>>> > >>>> One way to make it work is using another BPEL (call it Proxy), that > >>>> calls your atomic one. Proxy is not atomic and it just calls to the > >>>> atomic BPEL passing the request and returnning the response. > >>>> > >>>> When the proxy calls the atomic BPEL, a new transaction is started and > >>>> then the atomic one is executed inside this transaction and rolled back > >>>> is something goes wrong. > >>>> > >>>> The bad new is that we are having problems if the bpel-se persistence > >>>> is on and it generates and exception trying to execute again and again > >>>> the atomic BPEL that has been rolled back. > >>>> > >>>> Hope this help. > >>>> > >>>> > >>>> shivam wrote: > >>>>> > >>>>> Hi, > >>>>> > >>>>> How does database transaction rollback will work in open esb? > >>>>> > >>>>> As an example, I have performed insert, update, delete operations on > >>>>> three different tables, defining each operation in a seperate wsdl. > >>>>> But insert and Update operations are not rolled back when SQL error > >>>>> occured in delete operation. I tried this with setting atomic property > >>>>> of bpel process to true. > >>>>> > >>>>> Please let me know if I am doing any wrong in above process. > >>>>> > >>>>> Thanks, > >>>>> SHiva M > >>>>> > >>>>> > >>>>> > >>>>> > >>>> > >>>> > >>> > >>> > >> > >> > > > > > > -- > View this message in context: http://n2.nabble.com/Transaction-rollback-tp3736777p3816050.html > Sent from the OpenESB Users mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [hidden email] > For additional commands, e-mail: [hidden email] > --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] |
||||||||||||||||
|
shivam
|
Hi Fernando,
We tested this on Oracle 10g. Thanks, Shiva M
|
||||||||||||||||
| Free Embeddable Forum Powered by Nabble | Help |