Transient persestant memory-begin abort transaction-arraycopynonatomic

If array defined as transient, then abort doesnt make any sense, chages are not rolled back.(Both for arrayCopy and arraycopyNonAtomic functions)
     public void AtomicNonatomic()
byte hello[] = {'H','E','L','L','O'};
          byte[] key_buffer = JCSystem.makeTransientByteArray((byte)16, JCSystem.CLEAR_ON_RESET);
          //byte[] key_buffer = new byte[16];
          JCSystem.beginTransaction();
          //Util.arrayCopy(hello, (short)0, key_buffer, (short)0, (short)5);
          Util.arrayCopyNonAtomic(hello,(short)0, key_buffer, (short)0, (short)5);
          for(byte i =0; i<2; i++)
          key_buffer=0; //This types of assigning values are atomic operations, so can be thougth as arrayCopy
          JCSystem.abortTransaction();          
If array not defined as transient and if arrayCopy is used then abort works
If array not defined as transient and if arrayCopyNonatomic is used then abort not works
     public void AtomicNonatomic()
          //byte[] key_buffer = JCSystem.makeTransientByteArray((byte)16, JCSystem.CLEAR_ON_RESET);
          byte[] key_buffer = new byte[16];
          JCSystem.beginTransaction();
          //Util.arrayCopy(hello, (short)0, key_buffer, (short)0, (short)5);
          Util.arrayCopyNonAtomic(hello,(short)0, key_buffer, (short)0, (short)5);
          for(byte i =0; i<2; i++)
          key_buffer[i]=0;
          JCSystem.abortTransaction();          
As a result begin-abort-commit should be used with non-transient arrays and without arrayCopyNonatomic function.
Edited by: simeranya_00 on Aug 7, 2010 6:51 AM
Edited by: simeranya_00 on Aug 7, 2010 6:56 AM

Check out JCRE specification. Therein you will find what is (not) part of a transaction.
1. All global arrays are not part of a transaction
2. All transient fields/arrays/keys are not part of a transaction
3. OwnerPIN object is not part of a transaction
4. All Java Card API methods are transactional, except arrayCopyNonAtomic and arrayFillNonAtomic
Lifetime of a transaction
begin <--> commit
begin <--> abort < -- rollback
begin <--> JCRE context (process method exit) < -- abort transaction (done by JCRE) < -- rollback
begin <--> uncaught exception < -- abort < -- rollback
begin <--> tear/reset < -- rollback

Similar Messages

  • Begin-of-transaction in ABAP Objects

    Hi,
    I have a question regarding the (implicit or explicit) begin of a transaction (read: SAP LUW) in ABAP Objects. In this piece of code
    CREATE OBJECT mapping.
    TRY.
      mapping->delete_all_embraced_mappings( ).
      mapping->merge_with_begda_overlap( ).
      mapping->merge_with_endda_overlap( ).
      mapping->store( ).
      COMMIT WORK.
    CATCH /my/mapping_exception.
      ROLLBACK WORK.
    ENDTRY. 
    I need a all-or-nohting logic, i.e. I'd like all the methods <i>delete..(), merge..()</i> and <i>store()</i> to run in a single transaction. If any of the methods throws a <i>/my/mapping_exception</i> I want all DB changes (carried out in the methods) rolled back.
    Now, how can a mark the <b>begin-of-transaction</b> (the counterpart of the commit work)? I couldn't find information about this in the docu or in the SDN. To prevent misunderstandings: I am building a web application with ABAP Objects, so no dialog steps, PBO-PAIs, function modules, performs etc. are involved!
    Regards,
    Sebastian Kamp

    Maybe by using
    SET UPDATE TASK LOCAL
    I think this command acts as a BeginOfTransaction command, it especifies that, till the next CommitWork, all the process has to be done as part of a Transaction.
    You could try something like this:
      TRY
          SET UPDATE TASK LOCAL
          <YOUR_PROCESS_HERE>
          COMMIT WORK
       CATCH
       ENDTRY
    Hope it helps.

  • ORA-02041: client database did not begin a transaction

    Hello All,
    I am making calls from oracle 8i to oracle 9i.
    First i am inserting values from 8i into a table in 9i.
    secondly i am calling a procedure to send mail which again is in 9i database.
    If i run the query ..the mail is sent...
    if i run it for the second time i get this error
    ORA-00164: autonomous transaction disallowed within distributed transaction
    ORA-02041: client database did not begin a transaction
    If i run it again...The mail is sent...
    For every odd transaction the mail is sent and for every even transaction i get this error...Please advice me if you have any tips how i can resolve this..
    Thanks,
    AK

    It is maybe not exaclty the same situation but this thread may help you:
    http://asktom.oracle.com/pls/ask/f?p=4950:8:16455356983632477090::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:362818006460

  • LSMW VD51 , Validations in Begin of Transaction; how to Debug the code?

    Hi All,
    I have written code for validations i Begin of Transaction in the field mapping 5th step of LSMW for VD51.
    Now this code not getting triggered at the time of Conversion of Data. How to debug the code. I have put a static break point 'BREAK-POINT' still not getting triggered.
    Any suggestion / solution for this issue.
    Thanks and Regards,
    Narsimha Kulkarni

    Hi Narshimha,
    Make any mapping error during mapping and check the syntax of mapping it will drag you to the lsmw report there you can put your break point. You can check the report name from transaction code as well.
    Remember this mapping block will execute when you execute the step Convert Data in LSMW.
    Regards
    Dhirendra

  • Regarding passing memory variable to transaction

    Hi All,
      I have issue regarding passing memory variable to transaction CO02.
    Here i have to create a program in that i have to
    <b>1.</b> <b>Create a memory variable, ZPPI0601_SOL and set it to X</b>.
    2. <b>Then i need to call transaction CO02, here this transaction will hit one USER-EXIT. in that program
    i need to do following</b>
    3.<b>Activate the user exit for transaction CO01, CO07, CO10, CO40 and CO41 or if (memory variable, ZPPI0601_SOL = “X” and Transaction code  = CO02)</b>
    then some code will be there that will be processed.
    and then
    <b>4.If (memory variable, ZPPI0601_SOL = “X” and Transaction code  = CO02): SAP does not provide the values in the user-exit, so we need to get these from the tables:</b>
    <b>i)For RESB-RSNUM = HEADER_TABLE-RSNUM and RESB-XLOEK = “ “ and RESB-KZEAR = “ “ and RESB-BDMNG > 0, get RSPOS, MATNR and BDMNG (these are fields the user-exit gets which corresponds to C04 to C06 in the spreadsheet). Pass these fields thru the same routine as the user-exit (ex: to convert the MATNR to legacy part#).</b>
    Then after finishing USER-EXIT part as above i need to come back to my main program and do following.
    <b>5.After all records have been processed, set memory variable, ZPPI0601_SOL = “ “. Exit</b>
    Can any body tell me how can i do the above.
    Thanks in advance.
    Thanks & Regards,
    Rayeez.

    Hi Shaik,
    export Sy-TCODE TO MEMORY ID 'ZTCODE'.
    Then in use the following in the user exit.
    Data: ZTCODE type SY-TCODE.
    import ZTCODE  FROM MEMORY ID 'ZTCODE'.
    If you want to activate your user exit only in Change/Display mode.
    You can try
    IF T180-TRTYP <> 'H'.
    Endif.
    Lanka
    Message was edited by: Lanka Murthy

  • "Transaction Errors : Aborting transaction on session " while processing the cube

    HI Team,
    Currently i have developed a cube and successfully deployed it in to the SSAS server.
    But when i process the cube the measures in the cube got successfully processed. After that the process is still running and showing the status as "Transaction errors : aborting transaction on session XYZAB".
    can you please guide me in solving this issue. The cube takes more than 6 hrs to process.
    thanks in advance
    baskar k

    Hi,
    I have Similar issue with 2005 and in 2005 I can't execute select * from $system.discover_sessions.
    Do we have any other way to resolve it.
    If I restart SSAS Server, It starts working fine and I cant restart at day time.
    http://blogs.msdn.com/b/sql_pfe_blog/archive/2009/08/27/deadlock-troubleshooting-in-sql-server-analysis-services-ssas.aspx
    Thanks Shiven:) If Answer is Helpful, Please Vote

  • ORA-02048: attempt to begin distributed transaction without logging on

    Hello,
    I've got the error:
    ORA-02048: attempt to begin distributed transaction without logging on
    When calling OCITransStart
    (The XID of the transaction to start is:
    formatID = 11101, gtrid = 123, bqual = 1
    I've already run several queries before trying to call
    OCITransStart and the queries are successfull.
    Could anyone help please ?
    I'm running Oracle 10g on Linux.
    Thanks a lot
    Laurent Marzullo

    I believe this is the error you see if the client database name is not set prior to calling OCISessionBegin. To set the client database name, use OCIAttrSet on the server handle with the OCI_ATTR_EXTERNAL_NAME and OCI_ATTR_INTERNAL_NAME attributes.
    These attributes are discussed in chapter 8 of the OCI Programmer's Guide in the section "OCI Support for Transactions".

  • How to Commit and Restart 'Always begin new transaction' BTF ?

    Hi all,
    I have 'Always begin new transaction' BTF, which (at some button click) , should:
    1. commit the current T.F. transaction, AND, after that
    2. restart itself, so that it starts a new T.F. transaction again
    All this without using T.F. Return activity, because the user (after button clik) needs to continue working in this flow from beginning.
    In fact, it's a record entry, whereby the user on the Save button should have the ability to input a new record.
    Any advice ?

    Thanks for reply Navaneeth,
    but it is unclear for me, how to ensure that the return activity takes back to the same taskflow ?!?
    P.S. Always begin new transaction TF runs in the af:popup. So, popup should remains opened after Return activity.
    Hm... just wondering, instead of declarative use 'Always begin new transaction', whether this can be achieved with (default) method call activity which basically does
          DataControlFrame.beginTransaction();at t.f. beginning, and
          DataControlFrame.commit();at buton click, which navigates to default task flow activity (i.e beginTransaction()) ?
    Would this way be made the same effect?
    Navaneetha Krishnan Nataraj wrote:
    For your use-case, as you are using 'Always begin new transaction' - use task flow return activity to commit the transaction & exit the taskflow.
    But ensure that the return activity takes back to the same taskflow (which would be re-loaded).
    Thanks,
    NavaneethEdited by: Cvele_new_account on 07.07.2012. 13.47
    Edited by: Cvele_new_account on 07.07.2012. 13.54

  • /WS client & ABORTED transactions

    Hello all,
    I am bit confused with "Native client" concept.
    What is the diffrence between a native client & a remote (/WS ) client?
    As far as i know,remote clients are those which are connected to the front end application via workstations.
    I have a huge billing application residing over tux(7.1).
    what is diffrence between application client & remote tux client? is it the same?
    i use following command to check the users connected to tuxedo.
    echo 'pclt' | tmadmin -r 2>/dev/null | egrep -v '>|-------|tpsysadm|tmadmin|WSH|^$'|wc -l
    sometimes i see around 60 users connected...& i have configured only 50 WS clients in my ubb file.
    is there any way i can remove unwanted users ?
    also i need to clean up transactions which are in ABORTED state?
    Can't we control users & transactions via tux commands?
    regards
    abhijeet

    Workstation client is the client connected to Tuxedo with WSL/WSH. Native
    client accesses the IPC queue directly. The pclt of tmadmin is different for
    native client and workstation client. The later has a "/W" flag in the
    status cloumn.
    You can define the MAXACCESSERS in ubbconfig file to limit the users. For
    example,
    MAXACCESSERS = 100
    MAXSERVERS=20
    MAXWSCLIENTS=70
    Then you leave 10 slots for WSH and tmadmin etc.
    Wayne
    <Abhijeet K> wrote in message news:[email protected]..
    Hello all,
    I am bit confused with "Native client" concept.
    What is the diffrence between a native client & a remote (/WS ) client?
    As far as i know,remote clients are those which are connected to the frontend application via workstations.
    >
    I have a huge billing application residing over tux(7.1).
    what is diffrence between application client & remote tux client? is itthe same?
    >
    i use following command to check the users connected to tuxedo.
    echo 'pclt' | tmadmin -r 2>/dev/null | egrep -v'>|-------|tpsysadm|tmadmin|WSH|^$'|wc -l
    >
    sometimes i see around 60 users connected...& i have configured only 50 WSclients in my ubb file.
    >
    is there any way i can remove unwanted users ?
    also i need to clean up transactions which are in ABORTED state?
    Can't we control users & transactions via tux commands?
    regards
    abhijeet

  • Ssh to Mac: periodic "out of memory" errors abort connection at login

    I have a frequent, but not constant problem...
    when I ssh to my Mac at home, from Linux boxes from work, and/or from my PC laptop (using putty), I often have to attempt to connect several times. The failing attempts ask for my password and seem to complete the login process.
    But at the 1st command I enter at the shell prompt, I see the message
    tcsh: out of memory
    very briefly, and then the window closes itself, and poof no more ssh connection...
    This seems to go in spurts, then one of the windows will be fine.
    For a while, it seemed that doing a quick ls as my first command worked around the problem, but I'm finding that not to be the case while on this trip (with my laptop and putty).
    I've done a pretty wide search and am coming up with very little on this.
    Any ideas?
    Again, sometimes it works, and ssh operates as expected. other time I can get several OOM errors in a row, before finally getting a working session. This is a not a new problem, has happened for at least a year, but seems to be worse lately.
    Thanks,
    Mike
    Mini Duo   Mac OS X (10.4.7)  

    Thanks, I'll give this a shot when I back in town this weekend...
    in the meantime, I've played around some more.. commented out most of my .login/.cshrc etc, to see if there were any culprits..
    over the ssh connection, if I try to change shells I can see the out of memory error sometimes, there, and the shell launch fails kicking back into the parent shell. When there is no "parent" shell, (original ssh login), the failure has no where to fall back to and the session terminates.
    I do not recall ever seeing this from Terminal (at my mac itself).
    So I guess that begs the question.. what is different about getting to a shell prompt from a remote ssh session vs. being there in person with Terminal?
    Mike

  • Transaction aborts after installing ODAC 12c Release 3

    I have .net code that used a transaction scope which works fine using ODAC 11g Release 4, but fails with "Unable to enlist in a distributed transaction" using ODAC 12c Release 1,2, or 3.  The transaction to a single database.  I am at a loss for what could be the issue.
    This issue occurs on both Windows 7 and Windows Server 2008 R2.
    I have reviewed the trace logs for both the Microsoft Distributed Transaction Server, and the Oracle Services for Microsoft Transactions Services.  The MSDTC trace logs indicate that the transaction abort was request was received from the calling application ("RECEIVED_ABORT_REQUEST_FROM_BEGINNER").  The ORAMTS trace logs indicate an OCI error and that there was an attempt to begin a distributed transaction with out logging on ("OCI_ERROR - 2048." ,  "ORA-02048: attempt to begin distributed transaction without logging on")
    I can reproduce this error with a simple code example with just tried to insert records into a table.  If I change the data provider to "System.Data.OracleClient", or uninstall 12c and install 11g this code works fine.
    DataSet1TableAdapters.DataTable1TableAdapter da = new DataSet1TableAdapters.DataTable1TableAdapter();
                using (TransactionScope scope = new TransactionScope())
                    Transaction txn = Transaction.Current;
                    try
                       da.Insert(0, "This ia a title");
                        scope.Complete();
                        lblmessage.Text = "Transaction Succeeded.";
                    catch (Exception ex)
                        txn.Rollback();
                        lblmessage.Text = "Transaction Failed.";
    Can anyone provide any ideas what is happening?  I really would like to use ODAC 12c.
    Thanks.

    Moving to the ODP.NET forum to get a wider audience.

  • Abort processing when error encountered in CALL TRANSACTION

    Is there a way to abort transaction in CALL TRANSACTION <tcode> USING <bdcdata> when an error has encountered?
    If there is, what should it be?

    In CALL TRANSACTION the standard behavior of the called transaction will be replicated. So if in VA01 the billing plan population is aborted if an error is encountered your CALL TRANSACTION will behave the same way.
    BR,
    Suhas

  • NPE on Transaction.abort()

    Hello. I am using the latest version of je 3.3.75.
    I am getting a NPE when I believe abort() is called twice:
    Caused by: java.lang.NullPointerException
         at com.sleepycat.je.Transaction.abort(Transaction.java:90)
    In the code, here's where I believe this is coming from:
    90:      txn.abort(false); // no sync required
    This seems like a really small issue. It would be nice to be able to tell the state of a transaction. At the very least, an error besides NPE would be necessary.
    Where is the issue tracker for sleepycat?
    Cheers,
    -Adrian

    I'm sorry Adrian, I didn't answer your question earlier.
    While BDB is available under an open-source license, we don't make public some of the facilities that other projects do. All of the following are private to Oracle and will remain so for the foreseeable future:
    - Issue tracking system
    - Source control system
    - Road map and other internal documentation
    The ticket number for this fix is #16214, and you'll see that in the change log when the release with the fix comes out.
    Thanks,
    --mark                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Aborted multi-machine transaction stays in BB

    I have a distributed transaction going across 2 machines. I'm testing
    out what happens when I abort the transaction. If I go into tmadmin,
    and do a pt, I get the following printout. The problem is the
    OK_ORATMSGRP in the first machine is specified being remote and as the
    coord group and has a status of TMGACTIVE. The same group on the other
    machine (where the group is local) has a status of TMGABORTED. Now this
    is exactly the same group, but one machine thinks it is TMGACTIVE and
    the other machine thinks it's TMGABORTED (this is the correct status).
    The transaction will remain in the bulletin board until the timeout
    value expires. This shouldn't happen. I thought as soon as I called
    tx_rollback the whole transaction should be aborted. What is going on?
    This is causing a problem because before we didn't specify a transaction
    timeout and the BB was being filled with Aborted transactions that had
    that one group marked as TMGACTIVE when it shouldn't have been.
    Subsequently the BB became full and new transactions couldn't be
    started.
    index=2 gtrid=x0 x3d25495d xa61
    : Machine id: IRGVELOCITY, Transaction status: TMGABORTED
    Group count: 2, timeout: 30, transaction timed out
    Known participants:
    group: OK_ORATMSGRP, status: TMGACTIVE, remote, coord
    group: OK_FXNTGRP, status: TMGABORTED, local
    Machine id: CDDEV, Transaction status: TMGABORTED
    Group count: 4, timeout: 30, transaction timed out
    Known participants:
    group: OK_ORATMSGRP, status: TMGABORTED, local, coord
    group: OK_MQTMSGRP, status: TMGABORTED, local
    group: OK_TUXTMSGRP, status: TMGABORTED, local
    group: OK_FXNTGRP, status: TMGABORTED, remote

    So it would be fair to say that as a rule, you should always specify a reasonably
    low transaction timeout so the BB doesn't become full of aborted transactions? I
    still think that an aborted transaction should be removed from the BB at some point
    (especially for aborted transactions with no timeout value). Maybe there should
    be a different timeout value, separate from the transaction timeout value that determines
    how long an aborted transaction should remain in the bulletin board.
    Peter Holditch <[email protected]> wrote:
    Frank,
    The timeout is in there to prevent the scenario where a transaction aborts
    and
    is deleted, and then another message on behalf of the same transaction arrives.
    With the records having been deleted, the system has no option but to
    create a
    new GTT entry for the apparently new transaction and then wait for it to
    time out.
    I know that this timeout is also in the WLS implementation. I do not believe
    that it is infinite!
    Note also that the only trandactions that will ever hit the TLOG are ones
    that
    have decided to commit, by which time this timeout is not relevant any more.
    That's my recollection of the reasoning, I hope it sheds some light...
    Regards,
    Peter.
    Frank Clarijs wrote:
    Failed (rolled back) distributed transactions remain in the BB until
    timeout, by design. I'm not sure why, but this behaviour is the one BEA
    (or its predecessors) explicitely implemented.
    This has of course strange consequences: if your application aborts
    transactions quite often, either you need a big TLOG and even higher
    setting of "maximum global transactions" in the UBB (or you can't
    restart your application after a crash), or you need to set the timeout
    quite low, with all risks from that...
    Don't worry, it's even worse in Weblogic, where the bean for an aborted
    transaction never disappears, by design.
    Frank
    Anthony Fryer wrote:
    I have a distributed transaction going across 2 machines. I'm testing
    out what happens when I abort the transaction. If I go into tmadmin,
    and do a pt, I get the following printout. The problem is the
    OK_ORATMSGRP in the first machine is specified being remote and as the
    coord group and has a status of TMGACTIVE. The same group on the other
    machine (where the group is local) has a status of TMGABORTED. Now
    this is exactly the same group, but one machine thinks it is TMGACTIVE
    and the other machine thinks it's TMGABORTED (this is the correct
    status). The transaction will remain in the bulletin board until the
    timeout value expires. This shouldn't happen. I thought as soon as I
    called tx_rollback the whole transaction should be aborted. What is
    going on? This is causing a problem because before we didn't specifya
    transaction timeout and the BB was being filled with Aborted
    transactions that had that one group marked as TMGACTIVE when it
    shouldn't have been. Subsequently the BB became full and new
    transactions couldn't be started.
    index=2 gtrid=x0 x3d25495d xa61
    : Machine id: IRGVELOCITY, Transaction status: TMGABORTED
    Group count: 2, timeout: 30, transaction timed out
    Known participants:
    group: OK_ORATMSGRP, status: TMGACTIVE, remote, coord
    group: OK_FXNTGRP, status: TMGABORTED, local
    Machine id: CDDEV, Transaction status: TMGABORTED
    Group count: 4, timeout: 30, transaction timed out
    Known participants:
    group: OK_ORATMSGRP, status: TMGABORTED, local, coord
    group: OK_MQTMSGRP, status: TMGABORTED, local
    group: OK_TUXTMSGRP, status: TMGABORTED, local
    group: OK_FXNTGRP, status: TMGABORTED, remote

  • Ftp transaction beginning and beginning and beginning

    I'm trying to download something via someone else's ftp server. I have no problem on my pc at the office, but i really need to download it onto the mac. I'm using Firefox and it just spins and spins - i have a blank page that says "beginning ftp transaction" on the bottom - yet nothing happens. I've tried using it via safari, but once i put the info in the address bar, it automatically jumps to Firefox and the same thing happens. Any advice?
    p.s. when i saved the file onto CD (from the PC) to then transfer to the mac, i get a msg that booting the file failed.
    Thanks!

    I have run into a similar problem using the command-line ftp. Basically, the program seems to start, and I can sign on to an FTP server and execute a simple command like 'pwd', but 'dir' or 'get' or 'mget' hang. I could post the debug output if anyone is interested, or file a bug report, but I don't know where. I vastly prefer command-line stuff to windowed environments for tasks like this, so the suggested solution is not the happiest for me. I suspect the problem has something to do with my being behind a 'firewall' in the sense of a DSL router/modem. Note, however, that I can run ftp from my Linux and Windows XP machines through the same modem/router to the same server with no trouble. This does look like a bug to me. Possibly Firefox was trying to use the same software to accomplish FTP transfers.

Maybe you are looking for

  • Displaying Session Variable on Dashboard & creating presentation variable

    Hi. I read a bit more on mysupport and it seems that :xdo_user_roles somehow displayes all kind of roles not the ones that the user acutally belongs to. Now I wonder if I can use NQ_SESSION.GROUP in the BI Publisher data model. (A)I figured that I ca

  • W500 w/ Windows 7 64-Bit Ultimate fails to recognize some audio CDs

    My DVD/CD drive (a HL-DT-ST_DVDRAM_GSA-U20N) in my Lenovo W500 laptop (running Windows 7 64-Bit Ultimate) fails to recognize some audio CDs. It recognizes most audio CDs, but a few are not recognized by Windows 7 itself, or by any other program on m

  • Problem with inputstreams from socket

    Hi This is probably a stupid question, but I really don't know much about server-client programming, and I'm a bit stuck when it comes to helping a friend (who is even more lost than me :p). In the code, there is a socket, mySocket. For some reason,

  • Here Drive + Beta (Navigation region issue)

    Hi all. Well, long story short , i had a Lumia 800 until march and recently bought a Lumia 920, so i gave the 800 to my sister, till now all is good except for the shocking news i discovered yesterday when tried to navigate to a destination and here

  • Presentation Variables Date Format

    Hi, I have a direct sql request that uses date presentation variables via a dashboard prompt: Direct SQL: select id, customer from test where date between @startdate and @enddate If I enter startdate '31/03/2013 00:00:00' in the dashboard prompt sele