Commit behavior

Hi,
This is an academic question. Our group is trying to implement a prototype of transactions for web services, for a class on advanced databases.
As you know, one of the key issues of distributed transactions is implementing the 2-phase-commit (2PC) behavior. There is a point in the process where nodes have to promise the coordinator they will be able to commit.
Now, a transaction has sucessfully processed a batch of DML and is now ready to commit. Besides a system failure or network failure (cases in which the transaction would be automatically rolled back), what else can fail the moment it issues COMMIT?
As far as I know, problems such as exhausted resources (e.g. disk space) or application errors always appear when you post changes, not when they are committed. That's why I'm asking this question.
Thank you,
Ivan.

Hi Gregor,
Sorry i just noticed these points mentioned in your post now....so i have edited my answer as i dont feel that the info i provided earlier will help you.
<i>Ps. Please:
- do not point me to the help, i did my homework
- and writing a wrapped bapi is not an option for my either</i>
Regards,
abhy
Message was edited by: Abhy Thomas

Similar Messages

  • MDB (2-phase commit) behavior during abnormal JMS termination

    Hello to everyone!
    I plan to test the following scenario tomorrow (sort of a bug replication in our system).
    Anyway, wanted to know in advance the expected behavior (just in case one of you already know
    or have an experience related to this test). Thank you in advance.
    Scenario:
    I want to test/know the behavior of a 2-phase commit (2PC) MDB when JMS server abnormally exits
    (say the process was killed).
    Test flow:
    start app server --> deploy 2pc-mdb --> send dummy data --> kill jms process --> restart jms process
    1. will the connection be closed properly?
    2. when jms server restarts, will the value of active consumer(count) doubled?
    note: i think after mdb deployment, corresponding destination consumer count is 1.
    the problem that occurred in our system was that the consumer count doubled after server restarted.
    it seem like the previous connection was not closed when the jms server abnormally terminated.
    any inputs will be greatly appreciated.
    thanks and best regards.

    You have to use TxDataSource for container managed tx or if you are using JTA (in
    addition to ofcourse doing 2PC).
    S
    "Dale Olzer" <[email protected]> wrote:
    >
    Using weblogic 6.1 SP 4
    I have a simple container managed Message Driven Bean. Using a destination
    type
    javax.jms.Queue.
    When the onMessage method finishes the Message is still Pending on the
    queue.
    see the ejb-jar.xml below
    <ejb-jar>
    <enterprise-beans>
    <message-driven>
    <display-name>IvrMessageBean</display-name>
    <ejb-name>IvrMsgBean</ejb-name>
    <ejb-class>com.edocs.ps.ivr.IvrMsgBean</ejb-class>
    <transaction-type>Container</transaction-type>
    <acknowledge-mode>Auto-acknowledge</acknowledge-mode>
    <message-driven-destination>
    <destination-type>javax.jms.Queue</destination-type>
    </message-driven-destination>
    </message-driven>
    </enterprise-beans>
    </ejb-jar>
    I noticed when I set a JDBC TX DataSource to 2 Phase Commit, the JMS
    transaction
    started commitig and nothing was left pending in the Queue.
    Does 2PC have to be set in a DataSource for Container Managed MDB's to
    work?

  • Nested Application Module - commit behavior

    Guys,
    I have ADF BC in the following hierarchial manner.
    AM1
    -VO1
    -VO2
    -AM2 (nested AM)
    Assume that there are pending transactions on both AM1 and AM2.
    what is the behaviour for the follwing?
    Q1 . Issuing commit on AM1, will it commit AM2 also?
    Q2 . Issuing commit on AM2, will it alone commit?
    Edited by: Dev on Apr 19, 2011 12:00 PM

    ADF distinguish between root application module and nested application modules. A root app module has no parent whereas an nested app module has a parent. A root app module holds the transaction (and only the root app module). Nested app module share the transaction of the root app module (they are nested in).
    So Q1: yes and Q2: no.
    Read 9.4.2 here http://download.oracle.com/docs/cd/E17904_01/web.1111/b31974/bcservices.htm#sm0229 fro more info.
    Timo

  • RFC Adapter Commit Behavior

    Hi,
    to enable the commit for BAPI calls (for me it was BAPI_SALESORDER_CREATEFROMDAT2), on the corresponding RFC adapter, i
    - checked the checkboxes: Advanced Mode and Commit Handling for Single BAPI call
    - saved and activated everything
    - called again my bapi and got S and W messages and the document no
    but at the SAP GUI, it appears, the sales order was not committed.
    Any helpful advise is appreciated.
    Regards
    Gregor
    Ps. Please:
    - do not point me to the help, i did my homework
    - and writing a wrapped bapi is not an option for my either

    Hi Gregor,
    Sorry i just noticed these points mentioned in your post now....so i have edited my answer as i dont feel that the info i provided earlier will help you.
    <i>Ps. Please:
    - do not point me to the help, i did my homework
    - and writing a wrapped bapi is not an option for my either</i>
    Regards,
    abhy
    Message was edited by: Abhy Thomas

  • Autocommit and Cursor commit Behaviour

    Hi,
    I need help to set and get the Autocommit and Cursor commit behavior attributes
    in Oracle.
    AUTOCOMMIT:
    For DDL Statement, this attribute is set while executing the OCIStmtExecute() api
    as below:-
    r = OCIStmtExecute(d->svc, d->sql, d->err, 1,0,
    (CONST OCISnapshot *) NULL,
    (OCISnapshot *) NULL,
    d->transaction ? OCI_DEFAULT :                                         OCI_COMMIT_ON_SUCCESS);
    For DML Statement, from the OCI documentation the database parameter attributes
    support OCI_ATTR_AUTOCOMMIT_DDL with the values OCI_AC_DDL and OCI_NO_AC_DDL.
    Since this is a parameter attribute, I couldn't set using OCIAttrSet() API.
    I need help in implementing AUTOCOMMIT for both DDL / DML statements.
    CURSOR COMMIT BEHAVIOUR:
    Similarly, I have observed that Oracle support cursor commit behavior attributes
    using OCI_ATTR_CURSOR_COMMIT_BEHAVIOR and the attribute values are OCI_CURSOR_OPEN and OCI_CURSOR_CLOSED.
    I have tried setting this attribute as below:-
    ub1 nCommitType = OCI_CURSOR_OPEN;
    oraRC = OCIAttrSet((dvoid *)d->svc, (ub4)OCI_HTYPE_SVCCTX,
         (dvoid *)&nCommitType,
         (ub4)sizeof(nCommitType),
         OCI_ATTR_CURSOR_COMMIT_BEHAVIOR, d->err);
    This always fails with the error ORA-24315: illegal attribute type.
    I need help in setting this attribute using OCI.
    Another approach to set Autocommit / Close Cursor attributes:-
    Oracle support SET commands for autocommit and closecursor, I have prepared
    and executed these set commands using OCIStmtPrepare and OCIStmtExecute api. The OCIStmtExecute() API fails to execute the below command texts.
    SET AUTOCOMMIT ON/OFF
    SET CLOSECURSOR ON/OFF
    Is it the right method of setting these attributes?
    Thanks,
    Sankar.P.

    Hi.
    You are trying to commit "child" information before your Parent information is commited.
    Can you describe how you dragged & droped your views?.
    Dragged relationship views or single views?.
    Can you put output log with jbo with FINEST level?.
    To find a solution try next solutions:
    1) Disable "strong" association between your parent-child entities. To achieve it follow next steps:
    - Go to your "Assoc" that describes your foreign key.
    - In "Realtionship" tab, "Behaviour" disable "Composition Association".
    Image: http://1.bp.blogspot.com/-Em8NZvjOUzo/T_NQbJTcLjI/AAAAAAAAAm4/hPsDwtEhJQ4/s1600/4.png
    2) Drag and Drop correct views as a Master-Detail (cascading views in your Data Control).
    http://2.bp.blogspot.com/-1By5vNNGMFQ/T_NQdYzexKI/AAAAAAAAAnE/DGn7Gr0RSDw/s1600/6.png (in spanish).
    In the image, drag & drop PortalwebView2 is the correct way for Master-Details tables. Probably you dragged PortalwebView1 that have dependecy to master table.
    Steps that you have followed:
    - Drag & Drop dependen View Object as a Master-Detail with two tables.
    - Add Create operations from these views to create Rows.
    - Add Commit general operation from Data Control.
    Try to drag & drop Master-Detail views correctly before disable association.
    PD: To try your model faster run Model project instead of your application.
    Regards.
    Edited by: Daniel Merchán on 30-jul-2012 12:05

  • Question about sort after commit

    Hello!
    I have a view object. I put in "order by clause" some sort(In query tab of this view object). I created jsf page and dropped this view object like table. I also dropped a Commit operation as button. When I change some value in row and press Commit button, my "order by clause" on view object doesn't perform and I get unsorted data. When I press Commit second time, "order by clause" perform. Can you suggest how to workaround this "Commit" behavior?
    JDeveloper version 11.1.2.2.0
    Thank's for answers.
    Regards, Stanislav

    Hi,
    Perform Execute after the commit. You can do this by executing both the actions in the actionListener of the commit button. Search in this forum for how to execute the action binding from backing bean.
    -Arun

  • OWB and COMMIT

    OWB version: 9.0.2.
    I realized that OWB puts several COMMIT statement in the generated PL/SQL packages code.
    I need to execute the COMMIT statement only after the end of the PL/SQL procedure, or when I decided,or make a ROLLBACK if some error occurs, and so my question is:
    Is it possible to configure an OWB mapping in order to completely remove the COMMIT statement from the generated code?
    I remove COMMIT sentences manually, but it seems that some part of the generated code makes a COMMIT, because when the transaction finishes, I make a rollback, but all inserts remains in tables.
    TIA

    Javier,
    OWB indeed always includes commit statements in its code. However, even if you would remove all commits (assuming you run 904 or 92 version of OWB) you will end up with commits after every execution, because every execution runs in a separate session. When a session is exited cleanly the database will implicitly commit.
    In OWB92 we introduced a feature correlated commit (configuration parameter on a mapping) that helps you control commits in a multi-target mapping. With that feature you can control commits to only happen at the end of the mapping in set-based mode. In row-based mode or row-based bulk mode, the behavior is that rows from a PL/SQL cursor are being applied to all targets rather than just at the time.
    The commit behavior is following:
    - in set-based mode, there is one commit per statement and with correlated commit set to true, it will be once at the end of the mapping.
    - in row-based bulk mode, the commit frequency is the bulk size. To force row-based mode, set the bulk size to 1.
    - in row-based mode, the commit frequency can be configured by the commit frequency configuration parameter.
    So, if possible, run in set-based mode (this is fastest anyway) and set correlated commit to true. This will commit the mapping at the end. In case of any error, the entire mapping will rollback.
    Hope this helps,
    Mark.

  • Log4cplus integration issue

    Hi
    When I compile BDB XML sample code with log4cplus library, the executable gives segmentation fault...
    The same code works fine if i compile the same code without linking log4cplus library.
    Do we have any known dependency issue with log4cplus tool?
    Thanks,
    Santhosh

    Hi George,
    There are a couple of suspicious things in the code
    you've posted.
    1. you are using DB_CXX_NO_EXCEPTIONS
    If you use this flag you must check all return
    values from DB calls and an obvious missing one is
    the return from DbEnv->open(). I'm guessing that
    this call is failing for some reason (does the
    environment directory exist?)[Santhosh] open() call returns the value 0. I have environment directory, i am using the same environment directory & same code snip with my BDB sample code it works fine (creates container), this exception occurs only while creating XmlManager object from my application.
    Why are you using DB_CXX_NO_EXCEPTIONS? There's
    little point that I can think of.[Santhosh] Initially I used DbEnv *clEnv = new DbEnv(0);, since it was throwing the exception, i thought of using NO EXCEPTION option...
    You are setting DB_AUTO_COMMIT on your DbEnv
    flags. Are you using Berkeley DB along with BDB XML?
    If so you'll get auto-commit behavior by simply
    opening transactional databases the same as you do
    in BDB XML.[Santhosh] I am directly using BDB XML (not linking Berkeley DB library to my application).
    All that said it doesn't explain the SEGV with
    log4cplus. There are no known issues. You'll have to
    debug this yourself to figure out what specifically
    is going on. The stack at the time of the SEGV
    should be illuminating.[Santhosh] We have isolated that SEGV issue, it is not because of log4cplus/bdb xml library. Also in my current application setup, we are not gettting any SEGV.
    I am creating Env to specify cacheSize and storageType for my container. Can I set directly page/cacheSize and storageType to the XmlManager? Since the sequence of API (which i have given in the code snip) giving exception, is there any other way (set of APIs other than DbEnv->open()) through which I can create container by giving cacheSize and add my XML documents?
    Thanks,
    Santhosh

  • Intermittent Commits and What is the Default Autocommit setting??

    I get intermittent commits during the BC4J application processing. Is there a way to enforce explicit commits and rollbacks while users are filling the JSP form?
    Is this a bug?
    Thanks,
    Arnold

    For Oracle database, I'm sure that by default we set auto-commit off.
    Can you reproduce your problem in a simple client program like this:
    package test;
    import oracle.jbo.client.Configuration;
    import oracle.jbo.*;
    public class Test {
      public static void main(String[] args)  {
        String _am = "yourpackage.YourModule", _cf = "YourModuleLocal";
        ApplicationModule am = Configuration.createRootApplicationModule(_am,_cf);
        // Do some things here with the VO's in your AppModule that
        // illustrate the inadvertent commit behavior...
        Configuration.releaseRootApplicationModule(am,true);
    }

  • Create, commit, rollback button behavior

    I have a view object dropped as a form. It has the default create, commit and rollback buttons.
    On initial display, only the create button is enabled, and the form is read-only.
    I click create button, which then it allows me to enter input.
    Upon clicking create button again, the form saves the input, clears itself, awaiting next input, and both commit and rollback buttons become enabled. I can continue to add more rows using create button.
    When I click either commit or rollback, the form becomes read-only again, and only the create button is enabled.
    This is the JDev standard form behavior which I want.
    Now, I add just 2 more enhancement, and this behavior gets broken.
    First, I drop the same view object as a table underneath the form, so that as records are added, the table will reflect it.
    Secondly, the form has two selectOneChoice components whereby upon valuechange on the first selectOneChoice, the second
    selectOnechoice items are dynamically populated via bean method and partial trigger.
    With these 2 changes, the entire page behaves like following:
    Upon create click, it gives me the form, but subsequent click on create does not clear the fields.
    If I click the create again, it then clears the fields. So, it takes 2 clicks on create to get a cleared form.
    But, it adds the row because I see it in the table below, but only one column displays the value in the newly added row.
    Upon commit, the row displays all values.
    Another thing is it fails to save the value from the second selectOneChoice field.
    Could you please point out what I am not doing right here?
    I would appreciate your insight.
    Thanks.
    Edited by: paikyunki on Oct 23, 2008 6:31 PM

    Chris,
    I might post the code tomorrow in my office - I am home now. Thanks for your offer.
    I gave some thoughts to my problem later, and it seems like one easy way out would be to create a form using ADF Faces components, then write a service method to insert a new row
    from the data gleaned through this form.
    I am new to JDev, and this approach of not utilizing the built-in functions of JDev may seem like defeating the very purpose of JDev.
    I find Oracle's Business Component's non-gui model very understandable and a strong alternative to Hibernate/Spring.
    However, it seems like sometimes it just may be easier, such as in this case, to resort to programmatic way.
    What is your view on this? I have used JDev less than 3 wks and would like to hear from experts.
    Yunki

  • How to Capture Commit Point in Forms

    Dear Members,
    We are on E-Business Suite 11.5.10.2.
    We are trying to change the behavior of AP Invoice Work Bench form through CUSTOM.pll.
    When you try to reverse an existing distribution line, then oracle does a lot of validations and many triggers are fired until commit occurs.
    I turned on custom events and found WHEN-VALIDATE-RECORD trigger fires 14 times until commit occurs at the end.
    MY question is how can we know the commit occurred. I mean in custom.pll i need to write some logic where i need to take some field values in a block at the very end when commit occurs. The field values that i am talking about keep changing from the start to the end and i want to capture the values at the point commit occurs,
    Is there any means to know that commit occurred; so that i can retrieve values at that moment.
    Thanks
    Sandeep

    Try to debug the Block_status for line.I will regularly change from change mode to some mode for commit.

  • Insert without commit (implicit and explicit) stores data.

    Hi all:
    I have this piece of code:
    REPORT  ztest.
    DATA: wa_zsic_abonos_chk TYPE zsic_abonos_chk. "Is a transparent table
    START-OF-SELECTION.
       wa_zsic_abonos_chk-bukrs = 'MU01'.
       wa_zsic_abonos_chk-belnr = '99999'.
       wa_zsic_abonos_chk-gjahr = '2008'.
      INSERT into zsic_abonos_chk values wa_zsic_abonos_chk.
      IF sy-subrc <> 0.
        WRITE:/ 'register NOT inserted'.
      ELSE
        WRITE:/ 'register inserted'.
      ENDIF.
      SELECT SINGLE *
        INTO   wa_zsic_abonos_chk
      FROM zsic_abonos_chk
      WHERE bukrs = 'MU01'
        AND belnr = '99999'
        AND gjahr = '2008'.
      IF sy-subrc = 0.
        WRITE:/ 'register found!.'.
      ELSE.
        WRITE:/ 'register NOT found.'.
      ENDIF.
    When I run this code I get this results:
    register inserted
    register found!
    This is surprising to me, because I did not write the COMMIT WORK after the Insert.
    What I expected to have was:
    register inserted
    register NOT found
    zsic_abonos_chk is a transparent table without buffering, and the register does not exists before the Insert.
    The Database system is running below SAP is DB2.
    Can someone explain this behavior?
    Thanks in advance
    Jordi

    Today I spent some time to close this thread.
    I made this test:
    REPORT  ZTEST.
    DATA: wa_zsic_abonos_chk TYPE zsic_abonos_chk. "Is a transparent table
    START-OF-SELECTION.
       wa_zsic_abonos_chk-bukrs = 'MU01'.
       wa_zsic_abonos_chk-belnr = '999949'.
       wa_zsic_abonos_chk-gjahr = '2008'.
      INSERT into zsic_abonos_chk values wa_zsic_abonos_chk.
      IF sy-subrc <> 0.
        WRITE:/ 'register NOT inserted'.
      ELSE.
        WRITE:/ 'register inserted'.
      ENDIF.
      SELECT SINGLE *
        INTO   wa_zsic_abonos_chk
      FROM zsic_abonos_chk
      WHERE bukrs = wa_zsic_abonos_chk-bukrs
        AND belnr = wa_zsic_abonos_chk-belnr
        AND gjahr = wa_zsic_abonos_chk-gjahr.
      IF sy-subrc = 0.
        WRITE:/ 'register found!.'.
      ELSE.
        WRITE:/ 'register NOT found.'.
      ENDIF.
      ROLLBACK WORK.
      SELECT SINGLE *
        INTO   wa_zsic_abonos_chk
      FROM zsic_abonos_chk
      WHERE bukrs = wa_zsic_abonos_chk-bukrs
        AND belnr = wa_zsic_abonos_chk-belnr
        AND gjahr = wa_zsic_abonos_chk-gjahr.
      IF sy-subrc = 0.
        WRITE:/ 'register found!.'.
      ELSE.
        WRITE:/ 'register NOT found.'.
      ENDIF.
    The result is:
    register inserted 
    register found!.  
    register NOT found.
    This clarifies the matter.

  • Can Disk Utility warnings and odd behavior be ignored safely?

    I have  a late 2012 Mac mini with a fusion drive. which will not repair using Disk Utility. In addition, I have been unable to partition it. When I try to verify the disk I get: Unable to bootstrap transaction group 461088: invalid field value
    No valid commit checkpoint found
    The volume CEF34A3F-08C3-45A5-9A87-C383B300541E was found corrupt and needs to be repaired.
    Error: This disk needs to be repaired using the Recovery HD. Restart your computer, holding down the Command key and the R key until you see the Apple logo. When the OS X Utilities window appears, choose Disk Utility.
    If I run disk repair it goes into a loop saying that the disk needs to be repaired.
        I took it to the Apple store where they were also unable to partition it, but they did say that there is nothing wrong with the disk. Can the above  warning and behavior be safely ignored? Oh yes, I forgot to mention that the mini often hangs when I restart from the Apple menu.

    The problem is solved,
       I took the Mac mini to the
    Apple store again and this time they rebuilt the fusion drive and installed a fresh copy of OSX. After copying my stuff over from a Time Machine backup and running Disk Utility again a get a nice reassuring green text saying that; 'the volume appears to be o.k.'
       Thanks to all.

  • The subtle use of task flow "No Controller Transaction" behavior

    I'm trying to tease out some subtle points about the Task Flow transactional behavior option "<No Controller Transaction>".
    OTN members familiar with task flows in JDev 11g and on wards would know that task flows support options for transactions and data control scope. Some scenarios based on these options:
    a) When we pick options such as "Use Existing Transaction" and shared data control scope, the called Bounded Task Flow (BTF) will join the Data Control Frame of its caller. A commit by the child does essentially nothing, a rollback of the child rolls any data changes back to when the child BTF was called (i.e. an implicit save point), while a commit of the parent commits any changes in both the child and parent, and a rollback of a parent loses changes to the child and parent.
    A key point to realize about this scenario is the shared data control scope gives both the caller and called BTF the possibility to share a db connection from the connection pool. However this is dependent on the configuration of the underlying services layer. If ADF BC Application Modules (AMs) are used, and they use separate JNDI datasources this wont happen.
    b) When we pick options such as "Always Begin New Transaction" and isolated data control scope, the called BTF essentially has its own Data Control Frame separate to that of the caller. A commit or rollback in either the parent/caller or child/called BTF are essentially isolated, or in other words separate transactions.
    Similar to the last point but the exact opposite, regardless how the underlying business services are configured, even if ADF BC AMs are used with the same JNDI data source, essentially separate database connections will be taken out assisting the isolated transactional behavior with the database.
    This brings me back to my question, of the subtle behavior of the <No Controller Transaction> option. Section 16.4.1 of the Fusion Guide (http://download.oracle.com/docs/cd/E17904_01/web.1111/b31974/taskflows_parameters.htm#CIHIDJBJ) says that when this option is set that "A new data control frame is created without an open transaction." So you could argue this mode is the same as isolated data control scope, and by implication, separate connections will be taken out by the caller/called BTF. Is this correct?
    Doesn't this in turn have implications about database read consistency? If we have one BTF participating in a transaction with the database, reading then writing data, and a separate BTF with the <No Controller Transaction> option set, it's possible it wont see the data of the first BTF unless committed before the No Controller Transaction BTF is called and queries it's own dataset correct?
    An alternative question which takes a different point of view, is why would you ever want this option, don't the other options cover all the scenarios you could possibly want to use a BTF?
    Finally as a separate question based around the same option, presumably an attempt to commit/rollback the Data Control Frame of the associated No Controller Transaction BTF will fail. However what happens if the said BTF attempts to call the Data Control's (not the Data Control Frame's) commit & rollback options? Presumably this will succeed?
    Your thoughts and assistance appreciated.
    Regards,
    CM.

    For other readers this reply is a continuation of this thread and another thread: Re: Clarification?: Frank & Lynn's book - task flow "shared" data control scope
    Hi Frank
    Thanks for your reply. Okay I get the idea that were setting the ADFc options here, that can be overridden by the implementation of data control, and in my specific case that's the ADF BC AM implementation. I've always known that, but the issue became complicated because it didn't make sense what "No Controller Transaction" actually did and when you should use it, and in turn data control frames and their implementation aren't well documented.
    I think a key point from your summation is that "No Controller Transaction" in context of ADF BC, with either data control scope option selected, is effectively (as far as we can tell) already covered by the other options. So if our understanding is correct, the recommendation for ADF BC programmers is I think, don't use this option as future programmers/maintainers wont understand the subtlety.
    However as you say for users of other data controls, such as those using web services, then it makes sense and possibly should be the only option?
    Also regarding your code harvest pg 14 entry on task flow transactions: http://www.oracle.com/technetwork/developer-tools/adf/learnmore/march2011-otn-harvest-351896.pdf
    ....and the following quote in context of setting the transaction option to Begin New Transaction:
    >
    When a bounded task flow creates a new transaction, does it also mean it creates a new database connection? No.
    >
    ....I think you need to be a little more careful in this answer, as again it depends on the underlying data control implementation as you point out in this thread. In considering ADF BC, this is correct if you assume only one root AM. However if the BTFs have separate root AMs, this should result in 2 connections and transactions..... well at least I assume it does, though I wonder what will happen if both AMs share the same JNDI data source.... is the framework smart enough to join the connections/transactions in this case?
    Also in one of your other code harvests (apologies I can't find which one at the moment) you point out sharing data control scopes is only possible if the BTF data controls have the same name. In context of an ADF BC application, with only one root AM used by multiple BTFs, this of course would be the case. Yet, the obvious implication to your summary of transaction outcomes in this thread, if the developers for whatever reason change the DC name across DataBindings.cpx files sourced from ADF Libraries containing the BTFs, then no, it wont.
    Overall the number of variables in this gets really complicated, creating multiple dimensions to the matrix.
    Going to your last point, how can the documentation be improved? I think as you say the documentation is right in context of the options for ADFc, but, as the same documentation is included in the Fusion Dev Guide which assumes ADF BC is being used, then it isn't clear enough and can be misleading. It would seem to me, that depending on the underlying data control technology used, then there needs to be documentation that talks about the effect of ADFc task flow behavior options in the context of each technology. And God knows how you describe a scenario where BTFs use DCs that span technologies.
    From context of ADF BC, one thing that I've found hard in analyzing all of this is there doesn't seem to be an easy way from the middletier to check how many connections are being taken out from a data source. The FMW Control unfortunately when sampling db connections taken out from a JNDI data source pool, doesn't sample quickly enough to see how many were consumed. Are you aware of some easy method to check the number of the db connections opened/closed?
    Finally in considering an Unbounded Task Flow as separate to BTFs, do you have any conclusions about how it participates in the transactions? From what I can determine the UTF lies in it's own data control frame, and is effectively isolated from the BTF transactions, unless, the BTF calls commit/rollback at the ADF BC data control level (as separate to commit/rollback at the data control frame level), and the data control is used both by the UTF and BTF.
    As always thanks for your time and assistance.
    CM.

  • Unexpected Transaction Behavior

    Its been a while since I've had the pleasure of doing serious work in Java, but I'm seeing something odd, and not sure how to work around it.
    I'm using:
    Oracle 10 Express
    Websphere Community Ed
    Oracle 10 thin drivers
    I've got a routine inserting into a table. There is a trigger and a sequence used to generate an autoincrement field for the table's primary key.
    The code performs an insert into a table, then tries to fetch back the current value of the sequence in order to return it to the caller.
    CREATE_NEW_MENU_ITEM = "INSERT INTO MENUITEMS (TITLE,PARENTID,URL,ENABLED) values (?,?,?,?)";
    GET_LAST_INSERTED_MENU_ID = "XSELECT MENUITEM_ID_SEQ.CURRVAL from DUAL";
    try {
    conn = DatabaseConnector.getConnection();
    conn.setAutoCommit(false);
    pstmt = conn.prepareStatement(CREATE_NEW_MENU_ITEM);
    pstmt.setString(1, item.getItemTitle());
    pstmt.setInt(2, item.getParentID());
    pstmt.setString(3, item.getURL());
    pstmt.setString(4, item.getEnabled());
    pstmt.executeUpdate();
    pstmt2 = conn.prepareStatement(GET_LAST_INSERTED_MENU_ID);
    rs = pstmt2.executeQuery();
    rs.next();
    uniqueId = rs.getInt(1);
    conn.commit();
    } catch (SQLException e) {
    conn.rollback();
    throw e;
    I purposefully typo'ed GET_LAST_INSERTED_MENU_ID in order to throw an SQLException, which it does.
    However, I find that the insert statement CREATE_NEW_MENU_ITEM still ends up being committed.
    Help? What am I missing?

    Here is a link showing code on how to get the newly generated key.
    It uses a Statement, but you should be able to use the same code with a PreparedStatement. (substitute PreparedStatement for Statement):
    http://developers.sun.com/docs/javadb/10.2.2/ref/crefjavstateautogen.html
    I suspect because you are using another preparedStatement to get a generated key that hasn't yet been committed, java commits it in order to return the key. Something odd like that. I personnally wouldn't spend too much time worrying about this odd behavior and just code per the link provided.
    I know the example code you provided is just a fragment is probably not complete, but here's a slightly cleaned up version of it for your own use of closing connection, finally block, dealing with autoCommit, etc.
    Connection conn=null;
    PreparedStatement pstmt=null;
    ResultSet rs=null;
    try {
    conn = DatabaseConnector.getConnection();
    conn.setAutoCommit(false);
    pstmt = conn.prepareStatement(CREATE_NEW_MENU_ITEM);
    pstmt..clearParameters();
    pstmt.setString(1, item.getItemTitle());
    pstmt.setInt(2, item.getParentID());
    pstmt.setString(3, item.getURL());
    pstmt.setString(4, item.getEnabled());
    pstmt.executeUpdate();
    conn.commit();
    } catch (SQLException e) {
    conn.rollback();
    throw e;
    } finally {
    if(conn!=null)
    conn.setAutoCommit(true);// must ensure this occurs even if the
    // remaiing functions fail
    if(rs!=null)
    rs.close();
    if(pstmt !=null)
    pstmt.close();
    if(conn!=null)
    conn.close();
    }

Maybe you are looking for

  • An error occured while generating SSRS report.Please advice.

    unable to connect to the remote server a connection attempt failed because the connected party dd not properly respond after a period of time, or established connection failed because connected host has failed to respond 69.172.201.134:8080

  • Adobe Photoshop Lightroom 5.7 error this message when I import a picture for editing

    Dear Friend I am writing on this forum to asking you for help. a few day a go I am headache with my Lightroom 5.7 software. when I import a picture for editing it alert the message above. So I can not do anything with any picture for my work it so bo

  • Help! I created a form using Adobe Acrobat X Pro

    I created a form with fields, then closed it for editing.  However, one of the fields is in the wrong font and I need to change it, as well as the order in which the fields are tabbed, but I cannot get Adobe to allow me to edit the form again.  I've

  • Faxing a Crystal Report that has been exported to a PDF

    Hi. I am having a problem trying to fax a Crystal Report that has been exported to a PDF. I am using Windows XP Pro SP3, VB.Net 2008 and the Crystal Reports that came with it. The report exports to a PDF with no problem.  Generally, I can fax a docum

  • Preview does not support RAW

    I just bought a Canon SX60 HS. I was shooting in RAW format. Does anyone know when Preview or IPhoto will be able to support this camera in RAW format? Is there a work around? It supports the Canon SX50 HS.