Maintaining database transaction in BPEL

Hi All,
Im using oracle SOA suite 10.1.3.3.0 version.
Here is a simple BPEL with two invoke activities, invoking database adapter.
First invoke activity inserts data to a table A. Second invoke activity inserts data to a table B.
If there is any exception in the second invoke activity, first invoke activity also has to be rolled back.
But that doesn't happen. First invoke gets commited.
Thanks
Jude.

Hi Jude,
That's default behaviour. You have to do some configuration to make invocations part of the same global transaction. This is described in the SOA Suite best practices guide. See: http://download.oracle.com/technology/tech/soa/soa_best_practices_1013x_drop3.pdf and then "XA Configuration - Two Database Adapter Invokes Committing or Rolling Back as a Unit" at 3-3.
Quote:
"The following is required to make two invokes commit or roll back as a unit:
Both the database adapter invokes must be configured to participate in global
transactions
Both invokes must participate in the same global transaction
The failure of either invoke must cause the global transaction to roll back"
Regards, Ronald

Similar Messages

  • Working with Transactions in BPEL PM

    Hi,
    I am working on the Transactions in BPEL by solving the sample (<drive>\product\10.1.3.1\OracleAS_1\samples\tutorials\122.DBAdapter\advanced\dmlInvoke\*XAInsert*) provided in Oracle SOA suite samples. In this, I have performed by taking two different datasources as mentioned in the readme.txt and I am able to acheive the transaction functionality (provided in the sample inserting into two different datasources in a single commit.). However, this transaction is rolled back to the last commit point when there is any error in Insert2Service or Insert1Service. Here the BPEL instance will disapppear since there is no persistent point for this process.
    I have used the wait activity in the process before the both inserts to store the instance to the dehydration store, so whenever there is any exception I could see the instance hanging on the wait activity. It never executes any activities further the BPEL engine control is lost for this particular instance.
    I would like to know whether can we catch any type of exception thrown by Adapter framework and execute the necessary error handling code in the same BPEL process. Any suggestions. Ideas are welcome. Please throw some light if any of them have done BPEL Transactions with these kind of scenarios. (I am more insterested in doing it without the compensation handler concept.)
    Thanks in advamce.
    Regards,
    Rakesh

    Hi Anirudh,
    Thank you for the quick response.
    Let me give you brief exact desciption of my what I'm trying to achieve.
    I have BPEL process which is performing insert operations into two different databases. I'm trying to achieve this in a single Transaction for both inserts so I have set the transaction property for both Partner Links as "Participate" which enable both the inserts to perform in single transaction. I have already included the exception handler blocks for both the DB Insert calls and also has global exception handler for my BPEL process.
    But since I have set the transaction property whenever there is any exception in the second insert or in the first insert operation then BPEL control is lost, it never executes the exception block and instance is disappeared since thare is no commit point. So I have included wait activity before first Insert and now whenever there is any exception the instance rollbacks to wait activity which is the last commit point for my process and hangs there without any control and it never executes the exception block.
    Please help me in this scenario how to catch the DB exception in my process and do further error handling tasks.
    Let me know if you need further details.
    Thanks,
    Rakesh

  • What kind of database driver should use for database adapter  in BPEL?

    what kind of database driver (XA or non-XA) should use for database adapter in BPEL? I have only one database adapter and no JMS.
    Thanks
    Jo
    Edited by: 799095 on Sep 30, 2010 8:35 AM

    Hi
    It depends on wheter you need XA transaction or not.
    See http://www.theserverside.com/discussions/thread.tss?thread_id=21385 third reply.
    If you only have one database and no synchronous dependency to the caller, non-XA should be OK.
    -Johan

  • How to use Database Adapter in BPEL

    I want to use Database Adapter in BPEL to transfer data from one table to other table and the data is still hold in the read table?
    I can find a example from http://download.oracle.com/docs/cd/B31017_01/integrate.1013/b28994/adptr_db.htm#BDCIGDCB.
    And the general design of my BPEL is as following:
    1. Add a "status" column to the read table. And alter the value of status column of all data in read table to "unreaded".
    2. Then create a empty BPEL (BPELAdapter) Project.
    3. Add a Database Adapter:
    (1) In step 1 of Adapter Configuration Wizard, configure the Service Name to datain.
    (2) In step 2, configure the database connection.
    (3) In step 3, choose "Poll for New or Changed Records in a Table".
    (4) Then click Import Tables button, and choose the read table.
    (5) In step 5, choose a column.
    (6) Don’t do anything in step 6 and 7.
    (7) In step 8, choose "Update a Field in the [Datain] Table (Logical Delete)".
    (8) In step 9, configure Logical Delete Field to STATUS, configure Read Value to readed and configure Unread Value to unreaded.
    (9) Don’t do anything in step 10 and 11.
    4. Add a receive activity to connect to above database adapter.
    5. Add another Database Adapter. Then configure this database adapter service WSDL:
    (1) In step 1 of Adapter Configuration Wizard, configure the Service Name to dataout.
    (2) In step 2, configure the database connection.
    (3) In step 3, choose Perform an Operation on a Table (and all items under it).
    (4) Then click Import Tables button, and choose the write table.
    (5) In step 5, choose a column.
    (6) Don’t do anything in step 6, 7 and 8.
    6. Add a invoke activity to connect to above database adapter.
    7. Add a assign activity between the receive activity and invoke activity. And configure the assign copy operation.
    But after I deploy this BPEL project to the BPEL server and invoke this project, I get following error. Meanwhile, this BPEL don't take effect.
    The following exception occured while processing this request:
    Can't find partnerLinkType 2.
    in
    "file:/D:/soft/SOASuite/product/10.1.3.1/OracleAS_1/bpel/domains/default/tmp/.bpel_BPELAdapter_1.0_e82210b05e4d3e997eed581d0d220293.tmp/_BPELAdapter.wsdl" WSDL to find PartnerLinkType "{http://xmlns.oracle.com/pcbpel/adapter/db/datain/datain_plt"。
    How to resolve?
    Thanks,
    Melody

    Now, I can insert data into the table through Database Adapter.
    But still can't select data from the table through Database Adapter.
    Above error still happen when invoke the read database table with Database Adapter project:
    Can't find partnerLinkType 2.
    in
    "file:/D:/soft/SOASuite/product/10.1.3.1/OracleAS_1/bpel/domains/default/tmp/.bpel_BPELAdapter_1.0_e82210b05e4d3e997eed581d0d220293.tmp/_BPELAdapter.wsdl" WSDL to find PartnerLinkType "{http://xmlns.oracle.com/pcbpel/adapter/db/datain/datain_plt"。

  • Can i use java only for database transaction with vb as a front end

    Hello All.
    I am sorry,i don't know whether this location is the correct location to post my question or not
    I have developed one application using complete vb only. That is completly desktop appliation and not suitable for centralized database. Is there any facility to keep my front end as same (vb application) and for the database transaction can i use jdbc? Is there any possibility to do that like View is vb based application and the database connectivity is only jdbc
    If my thought is wrongplease execuse me.
    thanks in advance
    sowjanya

    Sounds like a really bad choice even if it was possible.

  • Polling from the database view in BPEL 11g

    Hi,
    We do have a requirement of polling from the database view in BPEL 11g. I am exploring the following polling strategies in our case:
    - Delete
    - Logical Delete
    In case of Delete polling strategy, can we delete the record as the view does not allow deletion. In this case, do we have any other way to achieve this functionality?
    In case of Logical Delete, We have to mark the status column with particular value. how could we achieve the same when the view is not updateable.
    In 10g, we can override the delete polling strategy with an update statement. Is it possible in 11g?
    Thanks & Regards
    Siva

    Hi,
    I am also doing the same thing what you have done, please help me.
    I have used BPEL export utility for exporting my JPDs to BPEL. but it was not a good help, ultimately i m creating a process manually.
    the main problem what is the replacement of control(jcx files)
    please guide me really it would be great help..
    Thanks in advance and hope to hear from you.
    my mail id is [email protected]
    please send some document if you have...

  • Database transaction management in Web services

    Hi,
    I am using Oracle8i and firing some database queries from my web services. I want to do the transaction management for the same i.e. When one of the queries fail, i want to rollback. But when i write my own transaction management, it gives me an error :
    java.sql.SQLException: Cannot call Connection.commit in distributed transaction.Transaction Manager will commit the resource manager when the distributed transaction is committed.
    Can anyone please help me out as to how to perform the database transaction management in web services.
    Thanking in advance.
    Prashant

    Unfortunately to manage transactions over web services there is no viable solution available in market. All implementations come with restrictions e.g. Metro works with only EJBs on Glassfish, JBossTS works on JBoss but not with JAX-WS, Atomikos supports only Axis as of now.
    1. See explanation above.
    2. Yes, it can be but conditions mentioned above are applied :-)
    3. [www.oasis-open.org/committees/ws-tx/|www.oasis-open.org/committees/ws-tx/]
    4. Unfortunately as of now I do not see an easy way to this problem.

  • Database Transaction log suspected pages

    We migrated our Production Databases to New SQL Cluster and when I run query to find any suspected pages entries in MSDB Database .I found there are 5 entries in msdb.dbo.suspected_pages tables .These enries for Production Database Transaction file (File_id=2)
    , Pages_id =1,2,3,6,7 and the event _type was updated to 4 for all pages after I did DB restore and error_count is 1 for each page_id.
    As my understanding , before I did the DB restore ,there were transaction log pages were corrupted ,but the restored repaired those corrupted pages .Since pages are repaired then there is no need to concern for now .I have now Database consistency check
    job scheduled to check the Database corruption on Report server each night .I restore Database on report server using the a copy of Production Database Backup .Someone please help me to understand what caused the log file pages to get corrupted .Page_id 1,2,3,6,7 
    are called boot pages for the log file  ? What shold I do if I will find the Log file supected Pages ?
    Thank so your help in advance .
    Daizy

    Hi Andreas , Thanks for your reply .
    FYI- You have the event_type 1and 3 for your Database , but the event_type was updated to 4 on my system after I did restore and the date/time shows the exact date/time when the event_type was updated .
    Please help me understand usually Database Data file is organized in pages ,not the log file ??
    Thanks
    Daizy
    Hello Daizy
    yes, the event types 1-3 were the error-state before the "repair".
    After I did a Full backup + Restore I now have type 4 just as you do.
    Yes, the Log files is organized in so called "Virtual Log Files"/VLFs, which have nothing in common with the 8-KB data-pages of the data-files. Therefore a page_id does not make sense there.
    You can read more on the architecture of the Transaction Log here:
    SQL Server Transaction Log Architecture and Management
    This article by Paul Randal might also be of interest to you for:
    Transaction log corruption and backups
    Hope that helps.
    Andreas Wolter (Blog |
    Twitter)
    MCSM: Microsoft Certified Solutions Master Data Platform, MCM, MVP
    www.SarpedonQualityLab.com |
    www.SQL-Server-Master-Class.com

  • Once again:  Does MySQL allow multiple querys in one database transaction???

    Hello to ALL!!!
    The problem is:
    I'm trying to make simple query (database: "myDB" (engine:
    myisam/innodb - doesn't mater) with one table: "Info" with two
    columns: "Id" (autoinc), "info_c" (varchar):
    <cfif structkeyexists (form, "name")>
    <cfquery datasource="myDB" name="qDB" >
    INSERT into Info (info_c)
    VALUES ('#form.name#');
    SELECT @@identity AS Id
    </cfquery>
    </cfif>
    <cfform>
    <cfinput type="text" name="name">
    <cfinput type="submit" name="submit">
    </cfform>
    BUT after "Submit" I get:
    Error Executing Database Query.
    You have an error in your SQL syntax; check the manual that
    corresponds to your MySQL server version for the right syntax to
    use near '; select @@identity as Id' at line 2
    Please, tell me WHY???
    I have:
    MySQL
    Server information:
    MySQL version: MySQL 5.1.25-rc-community via TCP/IP
    Clent Information:
    Version: MySQL client version 5.1.11
    Coldfusion Version Information:
    Version 8,0,0,176276
    Great THANKS for your answers!!!

    > SELECT @@identity AS Id
    AFAIK, MySQL uses LAST_INSERT_ID(). @@IDENTITY is MS SQL
    specific. Though SCOPE_IDENITY() is recommended over @@IDENTITY.
    What version of CF are you using? ColdFusion supports the
    "result" attribute, which will return the ID value for simple
    inserts. See the documentation for details
    http://livedocs.adobe.com/coldfusion/8/Tags_p-q_17.html
    > Do JDBC drivers for MySQL prohibit the use of multiple
    queries
    > in a single database transaction???
    For security purposes this is disabled by default. To enable
    it you must modify your datasource url
    http://www.petefreitag.com/item/357.cfm

  • Database Transaction

    Hi,
    In our project we have EJB's(CAS) consumed in CAS. The EJB's communicate with SQL/Oracle DB's through standard queries(insert, update etc). Now we want to implement "Database Transaction" i.e, if the any one user from front-end is accessing the particular table of the DB, no other user should be able to modify the same table simultaneously. How is thisfeasible?
    Regards,
    Jagannathan R

    > It is the businness/functionality requirement which is prompting us to think that way.
    I'm sure there are technical other ways of accomplishing what's needed, such as 'dirty reads'.
    > Can you please elaborate the method that you are talking about even though it might take a huge toll on the performance?
    The "method" is the configuration of the database engines isolation level:
    http://msdn.microsoft.com/en-en/library/ms173763.aspx
    Markus

  • Database Transaction in xMII ?

    Is it possible to ensure a Database Transaction in xMII ?
    To clarify further, let me take an example :
    Suppose I have 2 tables : Tab1 and Tab 2 and I want to insert data simultaneously in both tables. The PK of Tab1 is a FK to Tab2. Is it possible to ensure that an insert into Tab1 will fail/rollback if there is an error in inserting dependent data in Tab2 without me doing an explicit rollback ?

    Very few applications are really database independent.  In fact, the ActivePortal and QualityPortal infrastructure in xMII is not.  It uses database-specific templates to achieve certain specific functionality.
    Quite often, database "independence" means a compromise in functionality, performance, or unnecessary coding to work around the incompatibilities.
    Instead, what you might consider is providing "template sets" for each of the databases you plan to support.  You can simply use an xMII BLS global variable to define the current database type, and use incoming links to the QueryTemplate property to dynamically choose the correct template(s).
    Also, if you wanted to use the database-agnostic code generated if you create a class in the NW Java IDE, you could create custom action(s) to insulate the user from the database specifics.  In version 12.0, you could even share JDBC connection pools between your custom action(s) and xMII (and other WebAS applications).
    - Rick

  • Maintaining database statistics

    i have created  index for a table and now i want maintain database statistics for this index
    i do not have any idea how  how can i do that.
    need suggestion on this
    Edited by: Pankaj Prasad on Aug 25, 2009 12:52 PM

    i have to create index for table which i have already made with field matnr dispo etc.
    now i have activated it. but after this point we have to take care for data base statics
    this last part i haven't done before and have no idea may be with T-code is db20 or 21
    need some suggestions

  • Urgent: EJB Transaction mechanism and Database Transaction mechanism

    Anybody please clarify me how EJB transaction mechanism use the underlying database transaction mechanism? Here my concern is that in the context EJB transaction, how much reponsibilities are performed by EJB container and how much responsibilities are performed by underlying database server. I will deem it a great favor if you kindly explain the whole story with example(s).

    Actually the ejb container is managing the persistence.
    It will be like this.
    if u r using entity beans or statefull beans
    while creating entity bean class you have to specify in the
    deployment descriptor, which table in the database this bean is representing .
    On the runtime , when you are creating an instance of a entity bean ,that instance will be corresponds to a row in the mapped table.
    what all changes you have made to that instance's attributes ie;
    columns in that row that all will be avilable in the session
    When you commit this particular session .this changes will be written to disk.
    that's how the change is managed ...
    assume if one user is modifying the particular row and another user is deleting it ..which ever transaction commits first will be get effected.
    if modification is committing first and then delete the row will be deleted last.but if first delete and then modify while commiting modifycation..
    you should get an error saying that particular row is missing from storage
    this how ejb container is manging the persistence
    in all cases even in case of synchronus acess
    i think u r cleard with this much

  • Database transaction throught pages

    Hello !
    I need to write web application that will use database transaction within different pages. Ie. the user changes the data in several pages, and after that clicks commit or rollback buttons.
    Is there any standart solution for my problem ?
    Is it good idea to store the database connection as the session attribute ? Can I get the connection from pool, or rather create my own connection ?
    Regards,
    Kamil

    Perhaps you can keep track of all the database edits/changes using objects stored in your session and then perform the update after the last page.
    or maybe you can use a temporary session table in your database and update that table as the user navigates bewteen your JSP pages, then when they get to your last page with the submit and rollback buttons if they choose submit you can update your main table with the data from the session table. If they choose rollback then you just clear or drop the temp table.
    Any any event transactions are handled in java by turning off autocommit and then calling commit on your connection object when you want to save the changes. And two, its a good idea to use connection pooling if you are going to opening and closing lots of connections. You can store your connection pool in the application scope or use JNDI. That will allow you to easily retrieve a connection from all your servlets or JSPs.

  • Progress Bar of a Database Transaction

    Hi,
    Is it possible to have a progress bar showing the progress a Database Transaction?
    I use MS Access and a PreparedStatement which I fill up with addBatch() and then I execute with executeBatch().
    Inserting in an Access Table 10.000 new entries takes about a minute...
    Instead of having the user wait with a message "Please wait..."
    can I track its progress somehow?
    Thanks!!!

    Unfortunately, I don't think that there's a standard way to get asynchronous responses back from the database on the status of your batches. You could fake it by figuring out the "standard" time it takes, but otherwise you're in the dark about your statement's status.

Maybe you are looking for

  • How to fix payment term in purchase order

    Hi: Everybody can you tell me how to fix value of payment term when creating or change purchase order? that means this field value just copy from vendor master data. and users can not change this value. I try to research screen field control in SPRO.

  • Do I need to keep old versions of CS on my PC in order to have the most recent work properly?

    I recently started a new position and plesently found my work station already set up with Creative Suite 5.5, but then saw CS 4 and CS 3 as well. When I asked IT why they were all there, the response was that upgrades build off of one another. If we

  • How to make some fields mandatory for a custom screen we have added

    Hi All, Please let me know how can I make some fields mandatory through coding in PBO for only some fields of a screen. Say if I have 4 fields in my screen(module pool not selection screen) i want to make mandatory 2 fields based on some conditions h

  • Urgent question: forum or newsgroup?

    I am trying to convince Spanish speaking users "from the other side" (ex MM forums in Spanish) to post here their opinions about the changes that are almost here, but have not been succesful. All of them do not use browsers as such to access the foru

  • Formatting a HD to NTFS?

    I am trying to format an external HD to NTFS format. I dont want it to be formatted to FAT for size limitations and dont want it to be limited to a Mac format as PCs wont be able to read the drive. Can someone please help me? Thanks