Thread: One of Two Inserts Fails, but does NOT rollback

This question is answered. Helpful answers available: 5. Correct answers available: 1.


Permlink Replies: 6 - Pages: 1 - Last Post: Nov 6, 2009 6:29 AM Last Post By: anvv sharma
marleta

Posts: 7
Registered: 01/14/09
One of Two Inserts Fails, but does NOT rollback
Posted: Jan 14, 2009 12:08 PM
 
Click to report abuse...   Click to reply to this thread Reply
I am having trouble get basic transaction functionality to work. I made a very basic example to test my problem:

1. I have an xA Data Source set up for my local machine's oraclexe.
2. I made a bpel process that makes two inserts into two different tables in that local XE.
3. I executed the process from BPELConsole with input that will succeed for the first insert and fail on the second insert, which should cause a rollback.

After the instance completes, neither the insert nor the instance are rolled back.

I have tried adding the "transaction"="participate" property to all of the DB adapeters individually and adding that property to entire process (outside the partner link bindings in the bpel.xml). Neither has helped.

This is an xA Data Source and the transaction level is "Global and Local"

I am working in version 10.1.3.3.1.

All the documentation and forum help I can find suggests that my test should be rolling back, so I am confused.

Thanks.
Ramana Ranga Raju

Posts: 184
Registered: 06/24/08
Re: One of Two Inserts Fails, but does NOT rollback
Posted: Jan 14, 2009 12:54 PM   in response to: marleta in response to: marleta
 
Click to report abuse...   Click to reply to this thread Reply
did you put both the adapter's for insert operations in single scope.........

And check below mentioned steps:

1. Create the XA datasouce connection.
2. Place the invoke operations which are participating in XA transaction in a single scope.
3. Add the property 'transaction=participate' for the partner links which are in XA transaction.
4. Add the

<configurations>
<property name="transaction" encryption="plaintext">participate</property>
</configurations>

in bpel.xml.

I guess you also need to apply a patch to achieve this. I am not sure about the patch number.

Let me know if you have any questions.

Thanks
Ramana.
marleta

Posts: 7
Registered: 01/14/09
Re: One of Two Inserts Fails, but does NOT rollback
Posted: Jan 14, 2009 1:53 PM   in response to: Ramana Ranga Raju in response to: Ramana Ranga Raju
 
Click to report abuse...   Click to reply to this thread Reply
Thanks for you reply, but I've already tried all of that.

All my DB Adapter invokes are already in the same scope, and I have tried putting the transaction participate property in every possible place I know of.

As far as I know 10.1.3.3.1 (with the MLR that we are using), is the latest patch for 10.1.3.3 (We just upgraded our patches in our test and development environments in November and my local is set up to mimic those environments)
marleta

Posts: 7
Registered: 01/14/09
Re: One of Two Inserts Fails, but does NOT rollback
Posted: Apr 21, 2009 2:25 PM   in response to: marleta in response to: marleta
 
Click to report abuse...   Click to reply to this thread Reply
I figured out this issue: oracle xe does not support XA transactions. The rollback works with oracle 10g.
anvv sharma

Posts: 73
Registered: 12/20/06
Re: One of Two Inserts Fails, but does NOT rollback
Posted: Nov 6, 2009 5:25 AM   in response to: Ramana Ranga Raju in response to: Ramana Ranga Raju
 
Click to report abuse...   Click to reply to this thread Reply
Hi,

i am working out the same thing...

when i add the following in bpel.xml

<configurations>
<property name="transaction" encryption="plaintext">participate</property>
</configurations>

I am getting the following error

Cannot find the specified instance

If the instance has recently been initiated, the invocation data may not have been delivered to the engine yet. Refresh your browser window or try again in a few seconds.

But if i remove this line from bpel.xml, i am able to an instance of the BPELProcess ? why is it so.

regards,
anvv sharma

Martien van den...

Posts: 82
Registered: 12/12/07
Re: One of Two Inserts Fails, but does NOT rollback
Posted: Nov 6, 2009 5:37 AM   in response to: anvv sharma in response to: anvv sharma
 
Click to report abuse...   Click to reply to this thread Reply
Check out the domain.log. Your bpel instances is probably failing.

Regards,
Martien
anvv sharma

Posts: 73
Registered: 12/20/06
Re: One of Two Inserts Fails, but does NOT rollback
Posted: Nov 6, 2009 6:29 AM   in response to: Martien van den... in response to: Martien van den...
 
Click to report abuse...   Click to reply to this thread Reply
Hi,

Yes, i am getting an exception in my BPEL Process

I have...

1) Receive Acitvity

2) DB Adapter - Insert a Record in DB here i have given at partnerlink; transaction=participate

3) Calling a Target System (here i am getting exception becoz of Target System)

4) Reply Activity

I am trying do to :

The inserted DB record should be rolled back if there is any exception in TargetSystem

How can i achieve this...

regards
anvv sharma
Legend
Guru Guru : 2500 - 1000000 pts
Expert Expert : 1000 - 2499 pts
Pro Pro : 500 - 999 pts
Journeyman Journeyman : 200 - 499 pts
Newbie Newbie : 0 - 199 pts
Oracle ACE Director
Oracle ACE Member
Oracle Employee ACE
Helpful Answer (5 pts)
Correct Answer (10 pts)

Point your RSS reader here for a feed of the latest messages in all forums