Executing subroutine after commit work, not on commit work

Hi All,
I want to execute my sub-routine after commit work, not on commit work.
If any one have answer please mail me at  [email protected]

Not sure if this helps you but this event is fired, when commit work is fired.
Christian
report test.
class lcl_event_handler definition.
public section.
    class-methods: on_commit_finished
         for event COMMIT_FINISHED
           of CL_OS_TRANSACTION_END_NOTIFIER.
endclass.
set handler lcl_event_handler=>on_commit_finished.
commit work.
class lcl_event_handler implementation.
method on_commit_finished.
  break-point.
endmethod.
endclass.
But check also oss note 704577

Similar Messages

  • Premiere Pro cc 2014 do not import After Effects composition. Inside Premiere Pro CC 2014 is not possible call back After Effects, is not possible to work with After Effects. Thank you

    Premiere Pro cc 2014 do not import After Effects composition. Inside Premiere Pro CC 2014 is not possible call back After Effects, is not possible to work with After Effects. Thank you

    You haven't given us much to go on here.  What exactly are you doing and what exactly happens when you try?  Which specific version of each program are you using?  (Go to Help>About...)
    On a side note, a simple, brief thread title is all that's needed.  Something like "After Effects Issue" would be fine.  You don't need the full question there.

  • After current updates, not all peripherals work.

    I currently have a 320 GB external hard drive connected via USB, a Mackie Onyx Sattelite Firewire recording interface, and a wireless printer running off of it. After the recent updates, the hard-drive works fine, but the recording interface no longer shows up as an audio input, and the printer no longer prints. Both are visible as connected peripherals in system profiler, but neither are working.
    I originally scrapped my hard drive and reinstalled Mac OSX, and the recording interface worked again. However, after updatring the software yet again, both the printer and interface stopped working. Any thoughts?

    When attempting to install the normal way is exactly when I was getting the error messages I mentioned in the first post.
    Anyway, I left out what I believe now is the critical detail: that the profile was moved from a partition that had to be rescued. It initially looked like all the data was saved but I've since discovered that a small percentage of the files on the disk were corrupted.
    The corrupted files must have included those for Session Manager and Pocket as I've been able to reinstall them by manually "save link as" downloading the xpis and then renaming or unpacking the files. It still remains to be seen whether or not I can do a normal install with an addon I didn't already have.

  • After moving profile, not all addons work -- can't reinstall

    I moved my FF profile from old computer running ubuntu to new one with opensuse. I used directions at https://support.mozilla.org/en-US/kb/back-and-restore-information-firefox-profiles
    Seems that most eveything transferred correctly except two addons: Session Manager & Pocket. Removed them both with intention to reinstall. I am unable to do so and am presented with the same error for both:
    ... could not be installed becaue Firefox cannot modify the needed file
    There is more detail in the Error console (also same for both):
    Warning: WARN addons.xpi: Failed to install: [Exception... "Component returned failure code: 0x80520005 (NS_ERROR_FILE_DESTINATION_NOT_DIR) [nsIFile.create]" nsresult: "0x80520005 (NS_ERROR_FILE_DESTINATION_NOT_DIR)" location: "JS frame :: resource://gre/modules/XPIProvider.jsm :: AI_startInstall :: line 5046" data: no]
    Source File: resource://gre/modules/XPIProvider.jsm
    Line: 5046

    When attempting to install the normal way is exactly when I was getting the error messages I mentioned in the first post.
    Anyway, I left out what I believe now is the critical detail: that the profile was moved from a partition that had to be rescued. It initially looked like all the data was saved but I've since discovered that a small percentage of the files on the disk were corrupted.
    The corrupted files must have included those for Session Manager and Pocket as I've been able to reinstall them by manually "save link as" downloading the xpis and then renaming or unpacking the files. It still remains to be seen whether or not I can do a normal install with an addon I didn't already have.

  • Subroutine should execute just after Commit

    Hi All,
    I am working on user exit. I am writing the subroutine in the user exit. This user exit is in SAP Standard program and this sap standard program have the commit statement. My requirment is that subroutine should execute just after the commit statement, not before.
    What can I do for that. I tried with perform on commit and in update task but both execute just before Commit. Pls help me out.
    Thanks,
    Rakesh

    Hi,
    Check the below link for documentation.
    Hope it would be of some help to you.
    http://help.sap.com/saphelp_47x200/helpdata/en/41/7af4e3a79e11d1950f0000e82de14a/content.htm
    Regards,
    Vara

  • Commit work not working in Routine for Transaction because of LUW

    Hi all,
    i have req to send adobe PDF as attachement by email.
    Basically i am calling adobe from output type of VL02n .
    Inside this i can not use commit work because of LUW.Please suggest what should i do.
    so not able to send email in green status.
    i am using below code
    TRY.
          zlcl_send_request->set_document( zlcl_document ).
        CATCH cx_send_req_bcs INTO zicl_oref_cast.
          CLEAR gv_text_cast .
          gv_text_cast = zicl_oref_cast->get_text( ).
      ENDTRY.
    Email sender
      TRY.
          zlcl_sender =  cl_sapuser_bcs=>create( sy-uname ).
        CATCH cx_address_bcs INTO zicl_oref_cast.
          CLEAR gv_text_cast .
          gv_text_cast = zicl_oref_cast->get_text( ).
      ENDTRY.
      TRY.
          CALL METHOD zlcl_send_request->set_sender
            EXPORTING
              i_sender = zlcl_sender.
        CATCH cx_send_req_bcs INTO zicl_oref_cast.
          CLEAR gv_text_cast .
          gv_text_cast = zicl_oref_cast->get_text( ).
      ENDTRY.
    Create the Reciever address
      TRY.
          zlcl_recipient = cl_cam_address_bcs=>create_internet_address(
                                             gv_email ).
        CATCH cx_address_bcs INTO zicl_oref_cast.
          CLEAR gv_text_cast .
          gv_text_cast = zicl_oref_cast->get_text( ).
      ENDTRY.
      TRY.
          zlcl_send_request->add_recipient( EXPORTING i_recipient =
          zlcl_recipient ).
        CATCH cx_send_req_bcs INTO zicl_oref_cast.
          CLEAR gv_text_cast .
          gv_text_cast = zicl_oref_cast->get_text( ).
      ENDTRY.
      TRY.
          zlcl_send_request->set_send_immediately( gc_x ).
        CATCH cx_send_req_bcs INTO zicl_oref_cast.
          CLEAR gv_text_cast .
          gv_text_cast = zicl_oref_cast->get_text( ).
      ENDTRY.
    Send the mail
      TRY.
          zlcl_send_request->send( ).
        CATCH cx_send_req_bcs INTO zicl_oref_cast.
          CLEAR gv_text_cast .
          gv_text_cast = zicl_oref_cast->get_text( ).
      ENDTRY.

    Hi
    From abap help:
    SY-ONCOM
    On Commit flag. This system field is set to different values depending on the call status of an ABAP program. Of these, only the value of u2018Pu2019 is guaranteed. If at all, SY-ONCOM must only be queried for u2018Pu2019.
    The value 'P' means that the program is already executing a subroutine started using PERFORM u2026 ON COMMIT and therefore a
    further subroutine call using PERFORM ... ON COMMIT would cause a runtime error.
    That means the variable SY-ONCOM has the information if a process "ON COMMIT" is working and so it determines if a dump has to be raised.
    Now it's clear the meaning of that correction: if before calling a new commit the value of SY-ONCOM is changed the dump will be avoided.
    I've done the following texts:
    REPORT  ZCOMMIT.
    WRITE: 'Calling routine on commit'.
    PERFORM DO_SOMETHING ON COMMIT.
    COMMIT WORK.
    FORM DO_SOMETHING.
      DATA: ONCOM TYPE SY-UCOMM.
      MOVE SY-ONCOM TO ONCOM.
      SY-ONCOM = 'S'.
      COMMIT WORK.
      MOVE ONCOM TO SY-ONCOM.
    ENDFORM.
    The code above is very dangerous, because it triggeres a ricorsive loop: no dump, but the form is continuously called, just as help says SY-ONCOM is equal to P
    REPORT  ZCOMMIT.
    WRITE: 'Calling routine on commit'.
    CALL FUNCTION 'Z_MAX_COMMIT' IN UPDATE TASK.
    COMMIT WORK.
    FUNCTION Z_MAX_COMMIT.
      DATA: ONCOM TYPE SY-UCOMM.
      MOVE SY-ONCOM TO ONCOM.
      SY-ONCOM = 'S'.
      COMMIT WORK.
      MOVE ONCOM TO SY-ONCOM.
    ENDFUNCTION.
    I expected the same behavior as above, but here no dump and no infinite loop, SY-ONCOM = V
    Now your process working in update task, but probably many function are called, I mean the system creates a queue of functions to be run in update task, so what happens here?
    I've tried this:
    FUNCTION Z_MAX_COMMIT.
    *"*"Function module di reg.:
    *"*"Interfaccia locale:
    *"  IMPORTING
    *"     VALUE(NO_COMMIT) TYPE  FLAG DEFAULT SPACE
      CHECK NO_COMMIT IS INITIAL.
      DATA: ONCOM TYPE SY-UCOMM.
      MOVE SY-ONCOM TO ONCOM.
      SY-ONCOM = 'S'.
      COMMIT WORK.
      MOVE ONCOM TO SY-ONCOM.
    ENDFUNCTION.
    REPORT  ZCOMMIT.
    WRITE: 'Calling routine on commit'.
    CALL FUNCTION 'Z_MAX_COMMIT' IN UPDATE TASK
      EXPORTING
        NO_COMMIT = 'X'.
    CALL FUNCTION 'Z_MAX_COMMIT' IN UPDATE TASK.
    CALL FUNCTION 'Z_MAX_COMMIT' IN UPDATE TASK
      EXPORTING
        NO_COMMIT = 'X'.
    COMMIT WORK.
    Here no dump and no infinite loop too, but also no impact on the rest of the functions,
    I can suppose the impact will be on the saving of data on database only, because your COMMIT ends the LUW, so it's very important the routine for printing is called at the end, after all saving routines.
    Max

  • Commit operation not enabled after createinsert in detail table

    Hi Everybody,
    After clicking createinsert operation for detail table in master detail, i got unique contraint error from db.after rectifiying the data for newly created row..commit operation not enabled to save the data.
    Please find the code i used in my jsf.
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
              xmlns:f="http://java.sun.com/jsf/core"
              xmlns:h="http://java.sun.com/jsf/html"
              xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
      <jsp:directive.page contentType="text/html;charset=UTF-8"/>
      <f:view>
        <af:document id="d1">
          <af:messages id="m1"/>
          <af:form id="f1">
            <af:panelBox text="PanelBox2" id="pb2">
              <f:facet name="toolbar">
                <af:group id="g2">
                  <af:commandButton actionListener="#{bindings.Delete1.execute}"
                                    text="Delete1"
                                    disabled="#{!bindings.Delete1.enabled}"
                                    id="cb4"/>
                  <af:commandButton
                                    text="CreateInsert1"
                                    disabled="#{!bindings.CreateInsert1.enabled}"
                                    id="cb3"
                                    action="#{backingBeanScope.MyIndustryBean.cb3_action}"/>
                  <af:commandButton actionListener="#{bindings.Commit.execute}"
                                    text="Commit"
                                    disabled="#{!bindings.Commit.enabled}"
                                    id="cb5"/>
                  <af:commandButton actionListener="#{bindings.Rollback.execute}"
                                    text="Rollback"
                                    disabled="#{!bindings.Rollback.enabled}"
                                    immediate="true" id="cb6">
                    <af:resetActionListener/>
                  </af:commandButton>
                </af:group>
              </f:facet>
              <af:table value="#{bindings.IndustryEOView1.collectionModel}"
                        var="row" rows="#{bindings.IndustryEOView1.rangeSize}"
                        emptyText="#{bindings.IndustryEOView1.viewable ? 'No data to display.' : 'Access Denied.'}"
                        fetchSize="#{bindings.IndustryEOView1.rangeSize}"
                        rowBandingInterval="0"
                        filterModel="#{bindings.IndustryEOView1Query.queryDescriptor}"
                        queryListener="#{bindings.IndustryEOView1Query.processQuery}"
                        filterVisible="true" varStatus="vs"
                        selectedRowKeys="#{bindings.IndustryEOView1.collectionModel.selectedRow}"
                        selectionListener="#{bindings.IndustryEOView1.collectionModel.makeCurrent}"
                        rowSelection="single" id="t1" width="448"
                        inlineStyle="height:193px;" partialTriggers="::cb3 ::cb4">
                <af:column sortProperty="IdDesc" filterable="true" sortable="true"
                           headerText="#{bindings.IndustryEOView1.hints.IdDesc.label}"
                           id="c2">
                  <af:inputText value="#{row.bindings.IdDesc.inputValue}"
                                label="#{bindings.IndustryEOView1.hints.IdDesc.label}"
                                required="#{bindings.IndustryEOView1.hints.IdDesc.mandatory}"
                                columns="#{bindings.IndustryEOView1.hints.IdDesc.displayWidth}"
                                maximumLength="#{bindings.IndustryEOView1.hints.IdDesc.precision}"
                                shortDesc="#{bindings.IndustryEOView1.hints.IdDesc.tooltip}"
                                id="it2">
                    <f:validator binding="#{row.bindings.IdDesc.validator}"/>
                  </af:inputText>
                </af:column>
                <af:column sortProperty="IdPlace" filterable="true" sortable="true"
                           headerText="#{bindings.IndustryEOView1.hints.IdPlace.label}"
                           id="c1">
                  <af:inputText value="#{row.bindings.IdPlace.inputValue}"
                                label="#{bindings.IndustryEOView1.hints.IdPlace.label}"
                                required="#{bindings.IndustryEOView1.hints.IdPlace.mandatory}"
                                columns="#{bindings.IndustryEOView1.hints.IdPlace.displayWidth}"
                                maximumLength="#{bindings.IndustryEOView1.hints.IdPlace.precision}"
                                shortDesc="#{bindings.IndustryEOView1.hints.IdPlace.tooltip}"
                                id="it1">
                    <f:validator binding="#{row.bindings.IdPlace.validator}"/>
                  </af:inputText>
                </af:column>
              </af:table>
            </af:panelBox>
            <af:panelBox text="PanelBox1" id="pb1">
              <f:facet name="toolbar">
                <af:group id="g1">
                  <af:commandButton actionListener="#{bindings.Delete.execute}"
                                    text="Delete"
                                    disabled="#{!bindings.Delete.enabled}"
                                    id="cb2"/>
                  <af:commandButton
                                    text="CreateInsert"
                                    disabled="#{!bindings.CreateInsert.enabled}"
                                    id="cb1"
                                    action="#{backingBeanScope.MyIndustryBean.cb1_action}"/>
                  <af:commandButton actionListener="#{bindings.Create.execute}"
                                    text="Create"
                                    disabled="#{!bindings.Create.enabled}"
                                    id="cb7"/>
                </af:group>
              </f:facet>
              <af:table value="#{bindings.IndustryRatinEOView1.collectionModel}"
                        var="row" rows="#{bindings.IndustryRatinEOView1.rangeSize}"
                        emptyText="#{bindings.IndustryRatinEOView1.viewable ? 'No data to display.' : 'Access Denied.'}"
                        fetchSize="#{bindings.IndustryRatinEOView1.rangeSize}"
                        rowBandingInterval="0"
                        filterModel="#{bindings.IndustryRatinEOView1Query.queryDescriptor}"
                        queryListener="#{bindings.IndustryRatinEOView1Query.processQuery}"
                        filterVisible="true" varStatus="vs"
                        selectedRowKeys="#{bindings.IndustryRatinEOView1.collectionModel.selectedRow}"
                        selectionListener="#{bindings.IndustryRatinEOView1.collectionModel.makeCurrent}"
                        rowSelection="single" id="t2"
                        partialTriggers="::t1 ::cb1 ::cb2 ::cb7">
                <af:column sortProperty="RatingId" filterable="true" sortable="true"
                           headerText="#{bindings.IndustryRatinEOView1.hints.RatingId.label}"
                           id="c5">
                  <af:selectOneChoice value="#{row.bindings.RatingId.inputValue}"
                                      label="#{row.bindings.RatingId.label}"
                                      required="#{bindings.IndustryRatinEOView1.hints.RatingId.mandatory}"
                                      shortDesc="#{bindings.IndustryRatinEOView1.hints.RatingId.tooltip}"
                                      id="soc2" autoSubmit="true">
                    <f:selectItems value="#{row.bindings.RatingId.items}" id="si2"/>
                  </af:selectOneChoice>
                </af:column>
                <af:column sortProperty="RatingSubId" filterable="true"
                           sortable="true"
                           headerText="#{bindings.IndustryRatinEOView1.hints.RatingSubId.label}"
                           id="c6" partialTriggers="soc2">
                  <af:selectOneChoice value="#{row.bindings.RatingSubId.inputValue}"
                                      label="#{row.bindings.RatingSubId.label}"
                                      required="#{bindings.IndustryRatinEOView1.hints.RatingSubId.mandatory}"
                                      shortDesc="#{bindings.IndustryRatinEOView1.hints.RatingSubId.tooltip}"
                                      id="soc1" partialTriggers="soc2">
                    <f:selectItems value="#{row.bindings.RatingSubId.items}"
                                   id="si1"/>
                  </af:selectOneChoice>
                </af:column>
                <af:column sortProperty="Place" filterable="true" sortable="true"
                           headerText="#{bindings.IndustryRatinEOView1.hints.Place.label}"
                           id="c4">
                  <af:inputText value="#{row.bindings.Place.inputValue}"
                                label="#{bindings.IndustryRatinEOView1.hints.Place.label}"
                                required="#{bindings.IndustryRatinEOView1.hints.Place.mandatory}"
                                columns="#{bindings.IndustryRatinEOView1.hints.Place.displayWidth}"
                                maximumLength="#{bindings.IndustryRatinEOView1.hints.Place.precision}"
                                shortDesc="#{bindings.IndustryRatinEOView1.hints.Place.tooltip}"
                                id="it3">
                    <f:validator binding="#{row.bindings.Place.validator}"/>
                  </af:inputText>
                </af:column>
                <af:column sortProperty="RatingDesc" filterable="true"
                           sortable="true"
                           headerText="#{bindings.IndustryRatinEOView1.hints.RatingDesc.label}"
                           id="c3">
                  <af:inputText value="#{row.bindings.RatingDesc.inputValue}"
                                label="#{bindings.IndustryRatinEOView1.hints.RatingDesc.label}"
                                required="#{bindings.IndustryRatinEOView1.hints.RatingDesc.mandatory}"
                                columns="#{bindings.IndustryRatinEOView1.hints.RatingDesc.displayWidth}"
                                maximumLength="#{bindings.IndustryRatinEOView1.hints.RatingDesc.precision}"
                                shortDesc="#{bindings.IndustryRatinEOView1.hints.RatingDesc.tooltip}"
                                id="it4">
                    <f:validator binding="#{row.bindings.RatingDesc.validator}"/>
                  </af:inputText>
                </af:column>
              </af:table>
            </af:panelBox>
          </af:form>
        </af:document>
      </f:view>
    </jsp:root>

    Hi,
    Need to set partialSubmit true for CreateInsert and partialTrigger attribute for Commit button(Select Createinsert button for partialTrigger )

  • Wired Keyboard - Comma Key not working

    I have the older model keyboard that came with my system and my comma key suddenly isn't working. Is there any fix to this? I've popped the key off - cleaned it - tested the little button inside using a pencil tip to press it down - restarted my computer - and nothing. Still doesn't work. All other keys work fine.
    Any thoughts on how I can fix this problem or do I have to purchase a whole new keyboard? BTW - there's no Apple Store within 100 miles to take it in and I can't ship it in for repair (have to have it for work). Any help or ideas??

    Keyboards as recent as yours tend to have a large rubber mat that provides the key "feel" and spring-back. The key "switches" are all printed on a circuit-board-like layer inside the keyboard, and there is no such thing as replacing a keyswitch.
    I think your most practical option is to obtain a spare keyboard and then send yours for repair. When it comes back, you will have a spare in case of emergency.
    Because new Macs come with a keyboard, and some users insist on a different keyboard, there is some traffic in new/lightly-used keyboards on eBay and similar venues. Really old keyboards (like ADB keyboards) go for US$10 plus about that much again for shipping. I have no idea what the market in recent keyboards is like.

  • Differences between Commit work, Logical Unit of Work and Roll back work

    Hi all,
    Can any one explain me in details what is the difference between Commit Work, Logical Unit of Work and Roll back work. Pls explain by providing some example.
    and also explain me where and when these are used and what are the importance of using these.
    Thanks in advance.
    Regards
    Ramana Prasad.T

    Hi Ramana Prasad,
    A Logical Unit of Work (LUW or database transaction) is an inseparable sequence of database operations which must be executed either in its entirety or not at all. For the database system, it thus constitutes a unit.
    LUWs help to guarantee database integrity. When an LUW has been successfully concluded, the database is once again in a correct state. If, however, an error occurs within an LUW, all database changes made since the beginning of the LUW are canceled and the database is then in the same state as before the LUW started.
    An LUW begins
    o each time you start a transaction
    o when the database changes of the previous LUW have been confirmed (database
    commit) or
    o when the database changes of the previous LUW have been cancelled (database rollback)
    An LUW ends
    o when the database changes have been confirmed (database commit) or
    o when the database changes have been canceled (database rollback)
    COMMIT WORK.
    Executes a database commit and thus closes a logical processing unit or Logical Unit of Work ( LUW ) (see also Transaction processing ). This means that
    all database changes are made irrevocable and cannot be reversed with ROLLBACK WORK and
    all database locks are released.
    COMMIT WORK also
    calls the subroutines specified by PERFORM ... ON COMMIT * executes asynchronously any update requests (see CALL FUNCTION ... IN UPDATE TASK ) specified in these subroutines or started just before,
    processes the function modules specified in CALL FUNCTION ... IN BACKGROUND TASK ,
    cancels all existing locks (see SAP locking concept ) if no update requests exist,
    closes all open database cursors (see OPEN CURSOR ) and
    resets the time slice counter to 0.
    COMMIT WORK belongs to the Open SQL command set.
    Return code value
    The SY-SUBRC is set to 0.
    ROLLBACK WORK.
    Closes a logical processing unit by reversing all database changes made since the last COMMIT .
    You use this statement if you cannot be certain that all the database changes have been executed correctly.
    The update routines are not performed.
    ROLLBACK WORK belongs to the Open SQL command set.
    Note
    If the ROLLBACK statement occurs within a SELECT loop, the processing cannot continue because the database cursor is invalid. After the ROLLBACK statement, you should therefore ensure that all SELECT processing has been explicitly terminated.
    <b>Plz. Avoid Duplicate Threads.</b>
    Hope this resolves your query.
    Reward all the helpful answers.
    Regards

  • "Build Application/settings/Advanced/Run after installation" is not working LV70

    Hi !
    Look at thread
    http://forums.ni.com/ni/board/message?board.id=170&message.id=129269
    Seems like "Run executable after installation" is not workin at all (LV70, W2K).
    I' been try all,
    - run directly *.BAT file
    - i great exe file what' s runn *.BAT file.
    If i run directly "CmdPrompt3.exe" (attachment , source) it's working but not
    with when i run "setup.exe" ?
    What is wrong ?
    What means "wait until done" ?
    BR
    -HeVi-
    Attachments:
    CommandPromt3.vi ‏23 KB

    Hi HeVi,
    I'm not sure that I completely understand what your issue is. Are you
    trying to launch a BAT-file after the installation of an application?
    In that case, I will recommend you to refer to the following
    KnowledgeBase:
    Running a Batch File Automatically After an Installation to Access Installed Files
    If the methods in this KB doesn't work, please let me know.
    Have fun!
    PS: I wish it was only 25 degrees celsius here - it's currently around the 40 degrees celsius in Austin...
    Message Edited by Philip C. on 07-08-2005 02:42 AM
    - Philip Courtois, Thinkbot Solutions

  • COMMIT is not allowed in a subordinate session

    In My Servlet, I am using JTA transaction which is not a CMT.
    I am running this on Oracle XADatasource.
    When I'm trying to perform the DB operation, I'm getting the
    Exception saying "COMMIT is not allowed in a subordinate session "
    My Servlet code is :
    public class BatchServlet extends javax.servlet.http.HttpServlet implements
              javax.servlet.Servlet {
         PrintWriter out = null;
         @PersistenceUnit(unitName="PERUNIT")
         EntityManagerFactory emf;
         EntityManager em;
         @Resource
         UserTransaction utx;
         protected void doGet(HttpServletRequest request,
                   HttpServletResponse response) throws ServletException, IOException {
              out = response.getWriter();
              try {
                   initEM();
                   utx.begin();
                   updateDB();
                   utx.commit();
              } catch (Exception ex) {
                   ex.printStackTrace(out);
                   utx.rollback();
              } finally {
                   closeEM();
         public void initEM() throws Exception {
              em = emf.createEntityManager();
         public void closeEM() {
              if (em != null) {
                   em.close();
         private void updateDB() throws Exception {
              Address address = em.find(Address.class, 50030L);
              out.println("County :: " + address.getCounty());
              address.setBuildingNumber("Building # ABC");
              em.persist(address);
              out.println("Before Flush");
              em.flush();
              out.println("After Flush");
         public BatchServlet() {
              super();
    }My Persistence.xml is
    <?xml version="1.0" encoding="UTF-8"?>
    <persistence version="1.0"
         xmlns="http://java.sun.com/xml/ns/persistence"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
         <persistence-unit name="PERUNIT" transaction-type="JTA">
                  <provider> org.eclipse.persistence.jpa.PersistenceProvider</provider>
                  <jta-data-source>MYXADS</jta-data-source>
                  <class> com.test.Address</class>
                <properties>
                     <property name="eclipselink.logging.level" value="CONFIG"/>
                     <property name="javax.persistence.jtaDataSource" value="jdbc/MYXADS"/>
                     <property name="eclipselink.logging.level" value="FINE"/>
                </properties>
         </persistence-unit>
    </persistence>

    What if, in stead of using the UserTransaction, you simply use em.getTransaction().begin() and em.getTransaction().commit() to start / end the transaction? It seems to me the UserTransaction object represents a completely different transaction environment than your entity manager wants to use.

  • Ora-02089-COMMIT is not allowed in a subordinate session - V'urgent pls

    All,
    BPEL version: 11.1.1
    I have to invoke a pl/sql procedure which inserts a data to a table. After insert, I used commit. When BPEL try to invoke this procedure, I got ora-02089-COMMIT is not allowed in a subordinate session+. I know without commit in pl/sql, BPEL does the commit. But for a requirement, I've to explicitly use COMMIT inside the procedure. How do I go about in this case?
    Please advise.
    Thanks,
    Sen

    IMHO.... I personally do not like using XA data sources most of the time. I can only think of a few scenarios in all my implementation where I had to undo all the 50 steps (in which case they should be a single call anyway). Mixing and matching "pragma autonomous transaction" calls with DBAdapter updates on a XA data source in a single process have gotten me into tremendous trouble and data corruption.
    Also if you really have a case where you dont want to commit, I believe you can use the idempotent flag on partnerlinks to avoid the commit. There also might be cases where the PL/SQL defined as "pragma.." might be used by other non-BPEL stuff and you are just opening DB connections even when you dont need to.

  • [svn] 4375: Previous commit did not fix whitespace issue for FxTextArea as advertised.

    Revision: 4375
    Author: [email protected]
    Date: 2008-12-22 09:24:42 -0800 (Mon, 22 Dec 2008)
    Log Message:
    Previous commit did not fix whitespace issue for FxTextArea as advertised. The [CollapseWhiteSpace] metadata has to be on the text getter for FxTextArea. It does not work on the getter for FxTextBase, although it does work for FxTextInput.
    QE Notes:
    Doc Notes: None
    Bugs: SDK-17683
    Ticket Links:
    http://bugs.adobe.com/jira/browse/SDK-17683
    Modified Paths:
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxTextArea.as

    Revision: 4375
    Author: [email protected]
    Date: 2008-12-22 09:24:42 -0800 (Mon, 22 Dec 2008)
    Log Message:
    Previous commit did not fix whitespace issue for FxTextArea as advertised. The [CollapseWhiteSpace] metadata has to be on the text getter for FxTextArea. It does not work on the getter for FxTextBase, although it does work for FxTextInput.
    QE Notes:
    Doc Notes: None
    Bugs: SDK-17683
    Ticket Links:
    http://bugs.adobe.com/jira/browse/SDK-17683
    Modified Paths:
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxTextArea.as

  • I bought the production premium , cs6 , and I download it and registered with out any problem , I formatted my computer then I downloaded the collection , now everything else working only after effect is not working , what shall i do

    I bought the production premium , cs6 , and I download it and registered with out any problem , I formatted my computer then I downloaded the collection , now everything else working only after effect is not working , what shall i do

    did ae install without problem? check the install logs to be sure (Troubleshoot with install logs | CS5, CS5.5, CS6, CC)
    if it did, what do you see when clicking the executable?

  • I have a VI A. I want A to call another VI B and execute. After B executes, I want it to close automatically and go back to A. Is this possible ? I tried using open reference and those methods, but I am not able to do it. Can someone help me ? Thanks !

    Thanks !
    Kudos always welcome for helpful posts

    Re: I have a VI A. I want A to call another VI B and execute. After B executes, I want it to close automatically and go back to A. Is this possible ? I tried using open reference and those methods, but I am not able to do it. Can someone help me ? Thanks !Hi Stephan ! Thanks ! I guess I explained my question not so right. I've created a customized menu and at the instance of me selecting a menu, a VI should load itself dynamically. I am using call by reference. Sometimes it works and sometimes it won't. In short, what I want to achieve is load VIs dynamically and close them dynamically once they finish executing. Thanks !
    Kudos always welcome for helpful posts

Maybe you are looking for

  • IPhoto 09 (Version 8.1.2) No longer exports after Mav Update

    Hi Ive just downloaded and installed the latest Maverick update 10.9.2, since then i can no longer export my pictures from iphoto, it just crashes with an error report. My Mac came with Snow Leopard pre-installed and included iPhoto - its a late 2009

  • Can I split a pdf file?

    I've looked through the documentation and searched the forums but I can't seem to find an answer to this anywhere. I have a 50mb pdf that I need to send someone but my server chokes on a file this size. Can I split this into 3 or 4 smaller files? Do

  • HT2534 "none" does not appear as a credit card option?

    I follow the instructions on setting up an iTunes account without a credit card (so I can download album art) but the "none" does not appear as a card option after following the instruction to first download a free app.

  • Changing Document Type for MIRO

    Hi When post transaction through MIRO, the financial entry is posted with document type RE. How to change the Document Type From RE to SE. Where is the configuration to be done for such changes. Cheers V.Krishnan (Points will be assigned)

  • Using JavaMail with ESMTP exchange server

    Hi all, I have been looking at the FAQ, the SSLNotes.txt as well as the posted codes here and on google, but I am still having problem with the following scenario: An exchange ESMTP server which gave me a "Unrecognized SSL message" exception when I e