CMT transaction does not end

Hi!
I just began trying to add transactions to my project.
I use jboss and stateless session bean.
All my transaction attributes were set to "supports", and all was ok.
Now I try to put the transaction attribute of one method in one bean to "required" or "requireNew", and I have a problem:
The transaction began well at the call of the method, but it is never commited after the end of the method. (nor rollbacked). So all the followwing calls to my other beans just add commands in the transaction.
My question is: do I have to do something at the end of the method (that I put to "required") to commit the transaction?
Did I miss something?
Thanks
Michel

Info:
I tried the "required" attribute. And it works as expected. In fact, I have to correct my first statement: when I said that the transaction was never committed, I was wrong. The transaction was in fact committed, but the system was left in "autocommit false" state, and even after the end of the first transaction, another was started even if it wasn't necessary (as attribute was set to "support").
Now the problem is: there are other beans that are deployed on the same server. Not all are written by me, but they share the same connection pool. So they receive the connections that my beans left in "autocommit false" state. Even if all my beans are with the "required" attribute, I can't assume that all the other beans are deployed with this same attribute.
Now the question is: is there a way to avoid creating a new transaction after the first one has ended?
It will maybe clearer If I describe what I observe:
b1 was set to "required", b2 was set to "supports".
client calls b2: there are no transaction started (expected)
client calls b1: the transaction is started (expected)
b1 calls b2: the sql statements from b2 adds to the transaction (expected)
b1 ends: transaction is commited (expected)
client calls b2: a new transaction seems to implicitly exist, and sql statements adds to this transaction, and will be only committed when the client calls another bean with the "required" attribute.
The problem is: there are maybe b3, b4...bn written by other people that also inherit the transaction that is pending. And that may lead to a big deadlock situation...
I will try to solve the problem by using Bean Managed Transaction, starting a new transaction at the start of the method and commiting it at the end, then setting the autocommit of the connection to false myself. More info later.

Similar Messages

  • SM04 Session does not end.

    Hi all,
    I noted that SAP R/3 session does not automatically ended after a user logs off from the ESS Frontend. This will result in a increase in session in SM04 eventhough the users had logout from the portal.
    I have adjusted some timeout parameter in transaction RZ10 in R/3 including rdisp/plugin_auto_logout and restarted the services. To test, i accessed the ESS Portal and access some IAC IVIEW. Thereafter, i logged off the portal and observed the session created in R/3 (SM04) and noted that the session including the RFC connections are not released at all.
    Anyone face this issue before? How can i control so that after the user logoff from the portal, the session in SM04 is end.
    Thanks in advance

    Hi Sean,
    I found some note on the session which i attached below. However in my EP server have dozens of web.xml. Which one should i configure? Would you able to help me on this? Some of my IAC view does not end while some do. Any idea on that?
    Specifying HTTP Session Timeout
    Use
    You can specify a timeout period for HTTP sessions created in your Web application. If the session is inactive for this timeout period, it is invalidated by the Web container.
    If you do not specify such a timeout explicitly, a default one of 30 minutes is assumed.
    You can configure the HTTP session timeout using the web.xml descriptor.
    Procedure
    On the web.xml screen, proceed as follows:
    1. Open the General screen.
    2. To specify the timeout period, enter a value in the Session configuration – Session timeout field.
    The value is specified in minutes. If you enter a negative value in this field, HTTP sessions are never terminated because of a timeout. Instead, only an explicit logout by the user will terminate the corresponding session.

  • "An autonomous transaction does not see any changes made by main transact"

    Hi,
    I'm trying to reproduce the "An autonomous transaction does not see any changes made by main transaction" reffered on :
    Oracle® Database Application Developer's Guide - Fundamentals
    10g Release 2 (10.2)
    Part Number B14251-01
    chapter 2 SQL Processing for Application Developers
    Paragraph : Autonomous TransactionsI set up a simple case...
    create table emp_ as select * from emp
    begin
      update emp_ set hiredate=hiredate+100 where empno=7934;
    end;
    create or replace trigger trg_emp_
    after insert or update on emp_
    for each row
    declare
        pragma autonomous_transaction;
        emp_var emp.hiredate%type;
      begin
        select hiredate
          into emp_var
          from emp_
        where empno=:new.empno;
        dbms_output.put_line('empno: '||:new.empno);
        dbms_output.put_line('old hiredate: '||:old.hiredate);
        dbms_output.put_line('new hiredate: '||:new.hiredate);
      end;Prior to any change...
    SQL> select empno,hiredate from emp_;
    EMPNO HIREDATE
    5498 21/4/1982
    5499 11/10/1981
    5411 10/10/1981
    5410 10/10/1982
    7369 17/12/1980
    7499 20/2/1981
    7521 22/2/1981
    7566 2/4/1981
    7654 28/9/1981
    7698 1/5/1981
    7782 9/6/1981
    7788 19/4/1987
    7839 17/11/1981
    7844 8/9/1981
    7876 23/5/1987
    7900 3/12/1981
    7902 3/12/1981
    7934 23/1/1982After the change...
    SQL> begin
      2    update emp_ set hiredate=hiredate+100 where empno=7934;
      3  end;
      4  /
    empno: 7934
    old hiredate: 23/01/82
    new hiredate: 03/05/82
    PL/SQL procedure successfully completedAccording to the Oracle doc the select of the autonomous transaction should not see the change made to the hiredate column of the table in the main transaction(in the anonymous block)....
    What may i do wrong..????
    Thank you,
    Sim

    Simon:
    As Tubby pointed out, your dbms_output commands do not display the value you selected in the trigger. Your trigger based demonstration needs to be more like:
    SQL> SELECT * FROM t;
            ID DT
             1 05-SEP-2009
             2 17-JUL-2009
    SQL> CREATE TRIGGER t_ai
      2     AFTER INSERT OR UPDATE ON t
      3     FOR EACH ROW
      4  DECLARE
      5     PRAGMA AUTONOMOUS_TRANSACTION;
      6     l_dt t.dt%TYPE;
      7  BEGIN
      8     SELECT dt INTO l_dt
      9     FROM t
    10     WHERE id = :new.id;
    11     DBMS_OUTPUT.Put_Line ('ID: '||:new.id);
    12     DBMS_OUTPUT.Put_Line ('Old dt: '||:old.dt);
    13     DBMS_OUTPUT.Put_Line ('New dt: '||:new.dt);
    14     DBMS_OUTPUT.Put_Line ('Aut dt: '||l_dt);
    15  END;
    16  /
    Trigger created.
    SQL> UPDATE t SET dt = sysdate WHERE id = 2;
    ID: 2
    Old dt: 17-JUL-2009
    New dt: 25-OCT-2009
    Aut dt: 17-JUL-2009
    1 row updated.So, the automomous transaction select did not see the changed value of dt.
    I know you are just trying to understand automomous transactions here and would never do sometihg like this in production right? :-)
    Your trigger, as written, has some interesting side effects because of the automomous transaction. For example:
    SQL> INSERT INTO t VALUES(3, sysdate - 25);
    INSERT INTO t VALUES(3, sysdate - 25)
    ERROR at line 1:
    ORA-01403: no data found
    ORA-06512: at "OPS$ORACLE.T_AI", line 5
    ORA-04088: error during execution of trigger 'OPS$ORACLE.T_AI'
    SQL> UPDATE t SET id = 3 where trunc(dt) = TO_DATE('05-Sep-2009', 'dd-mon-yyyy');
    UPDATE t SET id = 3 where trunc(dt) = TO_DATE('05-Sep-2009', 'dd-mon-yyyy')
    ERROR at line 1:
    ORA-01403: no data found
    ORA-06512: at "OPS$ORACLE.T_AI", line 5
    ORA-04088: error during execution of trigger 'OPS$ORACLE.T_AI'John

  • Execution does not end even after all records updated..

    Hi,
    I have plsql code like :
    declare
    begin
    for x in ( select .......) loop -- about 4000 times
    for y in ( select ............) loop -- about 50 times
    end loop;
    -- some code goes here to manipulate clob data
    -- like creating free temp clobs - use - then free them
    -- Update statement that update some table using clob values.
    insert into tablex values(sysdate);
    commit;
    end loop;
    end;
    Here I can monitor from other window howmany records are inserted into tablex and howmany updated in update statement by...
    select count(1) from tablex;
    After 50 mins i can see that all records are updated but...
    plsql code does not end its execution it continues even after all records are updated..untill i have to kill the session or let be run for long time.. :(
    I can not understand why this it is not ending execution..
    What could be the problem ...

    Hi,
    Here it is.....
    declare
    v_text_data TableA.text_data%type;
    v_clob clob;
    type dummyclob_t is table of clob index by binary_integer;
    dummyclob dummyclob_t;
    v_str varchar2(255) := 'ddfsajfdkeiueimnrmrrttrtr;trtkltwjkltjiu4i5u43iou43i5u4io54urnmlqwmreqwnrewmnrewmreqwnm,rewqnrewqrewqljlkj';
    begin
    select data bulk collect into dummyclob from sfdl_clob; -- five rows containing clob data upto 1MB
    for x in (select object_id
    from TableA
    where object_type = 'STDTEXT' ) loop
    dbms_lob.createtemporary(v_text_data,TRUE);
    for y in (select '<IMG "MFI_7579(@CONTROL=' || ref_id || ',REF_ID=' || ref_id || ').@UDV">' temp_data
    from TableB
    where object_id = x.object_id) loop
    v_text_data := v_text_data ||
    case
    when trunc(dbms_random.value(0,7)) = 0
    then chr(10)
    else v_str
    end ||
    y.temp_data;
    end loop;
    select text_data into v_clob from TableA where object_id = x.object_id for update;
    if v_text_data is not null then
    dbms_lob.append(v_clob,v_text_data);
    end if;
    dbms_lob.append(v_clob,dummyclob(trunc(dbms_random.value(1, 6))));
    dbms_lob.freetemporary(v_text_data);
    insert into xyz values (sysdate);
    commit;
    end loop;
    end;
    Thanks for your time..:)
    Rushang.

  • How to remove records in itab where its HKONT does not end in '0'...

    Hello Experts,
    I am getting records from BSIS and BSAS and I want to remove those records with
    their HKONT(GL account) does not end in '0'(zero). I do now want to do it via a loop.
    I tried using DELETE FROM ITAB statement but it seems it does not work.
    Here is what I did:
    IF NOT gt_bsis_bsas[] IS INITIAL.
       DELETE gt_bsis_bsas WHERE hkont+10(0) <> '0'.
    ENDIF.
    Hope you can help me guys. Thank you and take care!

    Hi Viray,
    '+' is a wildcard char which is used to represent one char
    where as '*' represents any number of char's.
    In this case  +++++++++0
    <b>means that the length of the field is 10 chars and first 9 can be anything</b>
    he didn't use '*0' since it could mean that the length of the data entered can be anything .
    Hope this clarifies
    Regards
    Nishant

  • Excel process does not end properly

    Hello All.
    I am using excel in my program writing data into it an excel workbook and then later on reading data from it. I have written down the code of closing excel worlkbook and shutting down excel application hence releasing the handles for it. But when i do that i.e. when the code containing excel workbook closing and excel application shutting down executes, excel workbook is closed but excel process does not end properly and can be seen in the task manager. And when i repeatedly open the excel file through my front end interface and close the file, another excel process is added in the task manager which does not end and so on. What can be the problem and solution. Thanks in advance.
    Best Regards.
    Moshi.

    Interfacing to Excel via ActiveX may be tricky, ending in situations like the one you are facing now.
    The basic principle is that every single handle opened to an Excel object (workbook, worksheet, range, variant and so on) must be closed properly for the entire process to terminate gracefully. If a reference remains unhandled at program end you will find an instance of Excel remaining in the task list and you may suffer erratic behaviour in subsequent accesses to the product.
    You must double check all references and add approporiate dispose/close commands for every one of them.
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

  • Process does not end when binding a object to registry

    I am writing a Unit Test case in which i need to create a datasource and bind it to RMI registry so that the methods i need to test can get a database connection . The problem is that after the test cases have finished running the process does not end and i have to shut it down manually . When i do not bind the datasource , the process ends put with errors because the methods do not get a connection. Even unbinding it after running the test cases does not help.
    Edited by: gurpreetbhalla on Jun 25, 2009 11:56 AM

    public void testIntraDayForClient() throws Exception
              ConstantConfig.JNDI_FACTORY = "com.sun.jndi.rmi.registry.RegistryContextFactory";
              Hashtable env = new Hashtable();
              env.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.rmi.registry.RegistryContextFactory");
              env.put(Context.PROVIDER_URL, "rmi:");
    InitialContext ic = new InitialContext(env);
    // Construct DataSource
    SQLServerConnectionPoolDataSource ds = new SQLServerConnectionPoolDataSource();
    ds.setURL("jdbc:sqlserver://10.200.41.201:1433;databaseName=TradeportTC");
    ds.setUser("sa");
    ds.setPassword("superuser");
    DataSource d = ds;
         ic.unbind("TCDB_JNDI");
    ic.bind("TCDB_JNDI", ds);
              HttpServletRequest req = new MockHttpRequest();
              HttpServletResponse resp = EasyMock.createMock(HttpServletResponse.class);
              ActionContext context = EasyMock.createMock(ActionContext.class);
              HttpSession session = EasyMock.createMock(HttpSession.class);
              EasyMock.expect(session.getAttribute("ZephyrUserName")).andReturn("sclient90");
              EasyMock.expect(session.getAttribute("ZephyrDomainId")).andReturn("8a48a9cb1860e2a4011860e2c64d003a");
              EasyMock.expect(session.getAttribute("isTrader")).andReturn(false);
              EasyMock.expect(session.getAttribute("accountsDataDB")).andReturn(null);
              EasyMock.expect(context.getSession()).andReturn(session).times(12);
              session.setAttribute("vawTrades", null);
              session.setAttribute("noOfDays", null);
              session.setAttribute("accountNo", null);
              session.setAttribute("exchange", null);
              session.setAttribute("symbolName", null);
              session.setAttribute("trCode", null);
              session.setAttribute("status", null);
              session.setAttribute("accountsDataDB", null);
              EasyMock.replay(session);
              EasyMock.replay(context);
              MyOrdersAction action = new MyOrdersAction();
              action.execute(req, resp, context);
    This is the unit test case which does not exit , if i skip this binding ic.bind("TCDB_JNDI", ds);
    then it exits normally with a failure,

  • ST06N transaction does not exist

    Hi
       We have upgraded the SAP NetWeaver 2004s support package stack level from 23 to 26, after that when we are executing the transaction ST06N - we are getting error message below the screen "ST06N transaction does not exist"
    for that the program name we can able to execute in T code SA38 Program name RSHOST1N
    thru the T code its showing the Message ST06N transaction does not exist,
    Could pls guide us
    Regards
    Sriram

    Hi Rupali
    Thanks for your support as per your advice we can do that with help of Abaper
    As of now we have upgraded the Support package 26 in Dev & QA. in the Production still i can able to execute the T code ST06N, My query's are Is this any bug or ST06N Tcode obsolete?
    is this any one face the same issue ?
    Regards
    Sriram

  • Intercompany transaction does not exists

    Hi,
    I am have posted entry in F-02 and also i have asigned a new company code to the transaction and also document got created.
    now i need to reverse the document for the reversal reason 1 in T.Code FBU8.
    I am getting error message " Intercompany Transaction does not exists".
    Please help me with this issue.

    dear
    check settings in OBYA. is clearing account configured for intercompany postings
    and check that in OBA7 for the document type you using allow intercompany postings.
    regards
    rohit
    Edited by: ROHITBALI on Nov 19, 2011 7:28 AM

  • Firefox sometimes does not end

    14.7.2014
    Firefox 30.0 (German version) under Win 8.1
    Hello,
    Sometimes Firefox does not end properly. When Firefox is re-started I get a message saying Firefox
    is still running although about 10 minutes has passed between end and the re-start.
    Only by killing Firefox in the Task Manager can cure this problem. I use firefox a lot and this occurs about 5 times a day.

    Firefox Keep running in background, that's why your getting this error
    *http://kb.mozillazine.org/Firefox.exe_always_open
    Sometimes a problem with Firefox may be a result of malware installed on your computer, that you may not be aware of.
    You can try these free programs to scan for malware, which work with your existing antivirus software:
    * [http://www.microsoft.com/security/scanner/default.aspx Microsoft Safety Scanner]
    * [http://www.malwarebytes.org/products/malwarebytes_free/ MalwareBytes' Anti-Malware]
    * [http://support.kaspersky.com/viruses/disinfection/5350 Anti-Rootkit Utility - TDSSKiller]
    * [http://general-changelog-team.fr/en/downloads/viewdownload/20-outils-de-xplode/2-adwcleaner AdwCleaner] (for more info, see this [http://www.bleepingcomputer.com/download/adwcleaner/ alternate AdwCleaner download page])
    * [http://www.surfright.nl/en/hitmanpro/ Hitman Pro]
    * [http://www.eset.com/us/online-scanner/ ESET Online Scanner]
    [http://windows.microsoft.com/MSE Microsoft Security Essentials] is a good permanent antivirus for Windows 7/Vista/XP if you don't already have one.
    Further information can be found in the [[Troubleshoot Firefox issues caused by malware]] article.
    Did this fix your problems? Please report back to us!

  • PekWM Does not end XSession

    When using the "exit" from pekwm's menu, it does not end my Xsession...and gets stuck. Until I know how to get around that, I'm going to be sampling Openbox more.

    Welcome to Apple Discussions.
    If a program is not responding and you cannot "force quit" then you can launch Activity Monitor in Utilities. Under "my processes" you can choose that program and use the red "Quit process" icon at the upper left. That should do it rather than a restart.
    But if many applications aren't responding both Apple and non-Apple there is a problem that should be sorted.
    A good start would be to create a new account, name it "test" and see how your apps work in that User acct? (That will tell if your problem is systemwide or limited to your User acct.) This account is just for test, do nothing further with it.
    Open System Preferences >> Accounts >> "+" make it an admin account.
    Let us know and we'll troubleshoot this further.
    -mj
    [email protected]

  • Installing patch 5217019 takes long time and does not end

    Hi,
    I try to install patch 5217109 to my TEST instance.While installing patch the 8 workers are selected default.7 of workers are in statu of completed but 1 worker is waiting for long times and does not end.
    What can be my problem?

    Start time for file is: Mon Aug 10 2009 11:45:01
    sqlplus -s APPS/***** @/oracle/TEST/testappl/ad/11.5.0/admin/sql/adpcpcmp.pls APPLSYS &pw_fnd APPS &pw_apps &systempwd 8 1 NONE FALSE
    Arguments are:
    AOL_schema = APPLSYS, AOL_password = *****,
    Schema_to_compile = APPS, Schema_to_compile_pw = *****,
    SYSTEM_password = *****, Total_workers = 8, Logical_worker_num = 1
    Object_type_to_not_compile = NONE
    Use_stored_dependencies = FALSE
    Connected.
    Checking for previously-invalid objects which are now valid...
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:00.03
    Commit complete.
    Elapsed: 00:00:00.00
    Deleting any errors from previous run of this logical worker
    0 rows deleted.
    Elapsed: 00:00:00.00
    Commit complete.
    Elapsed: 00:00:00.00
    Compiling invalid objects...

  • Keynote on ipad stay updating presentations does not end

    I am running keynote , the upatde of presentations does not end, if tray upload 15 mb presentation show error can not completed

    This is the discussion for Mac, you should post your issue in the iOS forum where users of the iPad can help:
    Keynote for iOS

  • Statement in Transaction Does Not Roll Back

    I have a group of MySQL statements in a method of a Java application.
    I include an SQL error in the last statement to test the rollback of the transaction.
    All the statements roll back, EXCEPT for the one detailed below.
    The MySQL table:
         CREATE TABLE Counter (
              number INT( 4 ) NOT NULL DEFAULT 0,
              account_id VARCHAR( 12 ) NOT NULL PRIMARY KEY
         ) ENGINE = InnoDB;I have run the staement as a PreparedStatement and a Statement:
    PreparedStatement:
         String updateCounterStr =
              " UPDATE Counter " +
                   " SET number = number + 1 " +
                   " WHERE account_id = ? "
         updateCounter = con.prepareStatement ( updateCounterStr );
              updateCounter.setString( 1, accountID );
              int uc = updateCounter.executeUpdate();     Statement:               
         Statement updateCounterStatement = con.createStatement();
              int updatecounter = updateCounterStatement.executeUpdate(
                   "UPDATE Counter SET number = number + 1 " +
                   "WHERE account_id = \'" + accountID + "\'"
              con.setAutoCommit( true );     //     ------------------------------------ Transaction ENDS
              updateCounterStatement.close();
    //               updateCounter.close();
              ... several more
              con.close();
         } catch(SQLException ex) {
              System.err.println("SQLException: " + ex.getMessage());
              if (con != null) {
                   try {
                        System.err.print("Transaction is being ");
                        System.err.println("rolled back");
                        con.rollback();     //     < ------------------------------------ con.rollback() HERE
                   } catch(SQLException excep) {
                        System.err.print("SQLException: ");
                        System.err.println(excep.getMessage());
    }     //     ---------------------------------------- END the methodIn both cases Counter is incremented, but does NOT roll back.
    The other statements in the transaction do roll back,
    I am using:
    mysql Ver 14.12 Distrib 5.0.18, for apple-darwin8.2.0 (powerpc) using readline 5.0
    on Mac OS X 10.4.x
    I would greatly appreciate a solution to this problem.
    Many thanks in advance

    I think autocommit is true by default. Also, it looks like your'e setting it to true, and then executing more SQL.
    Explicitly set it to false, and DON'T set it back to trueif there's any chance you're going to want to rollback after that.

  • SM04 Session does not end..Any Idea?

    Hi all,
    I noted that SAP R/3 session does not automatically ended after a user logs off from the ESS Frontend. This will result in a increase in session in SM04 eventhough the users had logout from the portal.
    I have adjusted some timeout parameter in transaction RZ10 in R/3 including rdisp/plugin_auto_logout and restarted the services. To test, i accessed the ESS Portal and access some IAC IVIEW. Thereafter, i logged off the portal and observed the session created in R/3 (SM04) and noted that the session including the RFC connections are not released at all.
    Anyone face this issue before? How can i control so that after the user logoff from the portal, the session in SM04 is end.
    Thanks in advance

    Hi Sukanta,
    I found some note on the session which i attached below. However in my EP server have dozens of web.xml. Which one should i configure? Would you able to help me on this?
    Specifying HTTP Session Timeout
    Use
    You can specify a timeout period for HTTP sessions created in your Web application. If the session is inactive for this timeout period, it is invalidated by the Web container.
    If you do not specify such a timeout explicitly, a default one of 30 minutes is assumed.
    You can configure the HTTP session timeout using the web.xml descriptor.
    Procedure
    On the web.xml screen, proceed as follows:
           1.      Open the General screen.
           2.      To specify the timeout period, enter a value in the Session configuration – Session timeout field.
    The value is specified in minutes. If you enter a negative value in this field, HTTP sessions are never terminated because of a timeout. Instead, only an explicit logout by the user will terminate the corresponding session.

Maybe you are looking for

  • Multiple cursors and xmlforest

    This is my first time working with XML in PLSQL. I'm trying to parse values from a plsql procedure into a Word document using XML. My procedure looks something like: CREATE OR REPLACE PROCEDURE GET_XML_FA (PP_ID IN VARCHAR2, PP_PERIOD IN VARCHAR2 IS

  • Proto won't let me e-mail wireframes to myself.

    Is this a bug or am I doing something wrong? I am logged into My Account, yet the Email/Share button pops up a window that says "Email wireframe(s) as Zipped HTML files through your native e-mail application" and gives me two options 'Cancel' or 'Ema

  • How to use RIDC to query WebCenter Content Tables

    Hi all Can we use RIDC API to query WebCenter Content 11g Tables.if yes then How can I achieve this? i am newbie

  • Desktop software 6

    does anyone have desktop software version 6? my older blackberries will not connect to version 7 or greater.

  • Updating Ipod Mini... Wont work!

    I got a new computer and transfered my songs into the library. I have been unable to get the new purchased songs to update. When I connect it says "updating ipod, do not disconnect" but the songs never end up on the ipod. The computer is authorized a