Externally commit session

Hi all,
I have a problem with one software (no Oracle software), and sometimes happens that after a long time query it go to idle state, but that query ends OK. The only commit waiting for execute. But that software when does not responds.
Is there any way to commit some session from another session, or to connect to session and then do the commit.
Thanks a lot for your help.
Ales
Sorry for my poor English I hope that someone will understand my question.

Ok I hoped that there is any way, but anyway Thank you for your answer.
This is the first time that on any forum somebody answer so early.
Thanks Ales

Similar Messages

  • BAPI_PROJETC_MAINTAIN - External Commit

    Hi All,
      I have created a custom function module using the SAP Standard Function module BAPI_PROJECT_MAINTAIN. This Custom Function module will be called from VB Interface. The while creating the Custom FM, I have commented the COMMIT WORK Statement which was the part of BAPI_PROJECT_MAINTAIN. I have done this because of the requirement of Commit to be called from the VB Interface.
      I am calling the BAPI_TRANSACTION_COMMIT from my VB Code after I made a Call to my Custom FM and the Return Code of this Custom FM is a success.
      The Return Code of this BAPI_TRANSACTION_COMMIT is also success, but the commit is not happenning, because when I go and check the PROJ Table, it has not created the Project.
      Can soneone tell me why an external commit from another application  is not working for this custom FM(Which is based on BAPI_PROJECT_MAINTAIN).
      Thanks in Advance.

    Hi Sunil,
    The first thing to do would be to create a test sequence in SE37, of first your custom function and then the BAPI_TRANSACTION_COMMIT.  This executes the two functions one after the other in a single sequence. If this works, then you have a problem with your VB application. 
    In the VB application you should be calling your function and the commit within the one thread.  So you should open a connection, call the function, and then call the commit bapi, before closing your connection.  If you close the connection first, or call the commit in another thread, then the update wont occur.
    You may find the following thread useful: Sales Order Create BAPI
    Cheers,
    Brad

  • Commit session

    Hi
    I have some requirement such that i have to fill a table thru DBlink and number of records are too high...
    Is there any way i can Commit the session after regular intervals say after every 1 million recrds or so.
    Thanks in advance.

    > Is there any way i can Commit the session after regular intervals say after every 1 million
    recrds or so
    I can not understand where people get the idea that commits make things go faster. A COMMIT does work. It is not NOOP (No Operation) statement. It does processing.. it does some kind of work and stuff in the database.
    Can you perhaps explain to me how you are intending to make things faster by doing more work (using COMMITs) for that process?
    I'm sure I must be missing something as it seems every second poster here is of the opinion that if they can do more COMMITs, more work, their processes will be faster.
    Are you guys running Oracle Socialist Database 10G with Communist Extensions or something? You know.. some weird database extension and enhancement whose sensibility (more work is faster comrades!) those of us in the real world cannot ever hope to grasp?

  • FM: VHURM_HUBACKFLUSH_POST - External Commit

    Dear all,
    I use the FM VHURM_HUBACKFLUSH_POST in a program for production reporting. I want to backflush a bunch of HU´s corresponding to transaction MFHU (the import parameter P_SHOW_PROTOCOL is initial).
    Furthermore I want to check if the backflush of all HU´s at once has been posted succesfully after the processing of the FM.
    If the the backflush of all HU´s was successful make a commit if the backflush of at least one HU failed make a rollback for all HU´s to be backflushed and give the user an error message.
    The issue is that the FM itself already triggers a commit internally.
    Within the FM VHURM_HUBACKFLUSH_POST the FM RM_BACKFLUSH_GO is called which includes the subroutine backflush_end. This routine has the parameter am61b_ext_commit which controls if the commit should be triggered outwith the fm or not. I set this parameter in the debug mode and it worked. No backflush was executed until the commit was triggered by the calling program.
    My question is now: Is it somehow possible to set this parameter outwith the FM VHURM_HUBACKFLUSH_POST already in the calling program? Any other ideas are also welcome.

    Hi,
    After calling the FM, try putting code like below.
    IF sy-subrc = 0.
              SUBMIT rsconn01  WITH mode = 'INT'
                               WITH output = space
                               AND RETURN.
    ENDIF.

  • Toplink Sessions and Caching

    Hi
    I've got a external import on my DB, which updates the database without toplink. => cache is after update not uptodate.
    So I've tried to run after every update of the DB:
    getClientSession().getIdentityMapAccessor().initializeAllIdentityMaps();
    (running on a oracle.toplink.sessions.Session - Object)
    How can i refresh the cache for all Sessions, not only the actual ClientSession? Or is ther just one session (the actual ClientSession) for Toplink? The application is a webbased application with more then one user....
    getClientSession is implemented as follow:
    public Session getClientSession() {
    try {
         mySessionBroker = (SessionBroker) SessionManager.getManager().getSession(TOPLINK_SESSION_NAME, AbstractService.class.getClassLoader());
         Session clientSession = (Session) mySessionBroker.acquireClientSessionBroker();
    clientSession.setSessionLog( new Log4jSessionLog() );
         clientSession.setLogLevel(ClientSession.LOG_DEBUG);
    //clientSession.logMessages();
         return clientSession;
    catch (Exception e) {
    throw new RuntimeException(new ClicToplinkException(e));
    }

    I realize this is an old thread so I apologize for dragging it back up.
    I am trying to get a handle on the cache invalidation methods. We need to invalidate the cache based on sporadic manual updates and I would like to figure out the best methodology for doing this. I believe that the IdentityMapAccessor.invalidateAll() method is the one I need to use but can't get it to work. What follows is my test case. this.manager is an entity manager created in a setup method:
    this.manager.getTransaction().begin();
    this.user = new FormularyUser();
    this.user.setSecurityUserID(12345L);
    this.manager.persist(this.user);
    this.manager.getTransaction().commit();
    Session session = ((EntityManagerImpl)this.manager.getDelegate()).getServerSession();
    session.getIdentityMapAccessor().invalidateAll();
    // this should lookup from DB
    FormularyUser copy2 = this.manager.find(FormularyUser.class,this.user.getUserPK());
    assertTrue(copy2 != null);
    assertTrue(copy2 != this.user);
    It would be my assumption that the invalidated cache result would not be returned but as I traced through the code I noticed this comment:
    'Override the getFromIdentityMapWithDeferredLock method on the session to ensure that invalidated objects are always returned since this is a UnitOfWork'
    Does this mean because I'm still in the same unit of work that I will get invalid objects back? I would assume that because I had committed the transaction that I would be in a new UnitOfWork. Can someone point out where I'm making the wrong assumptions or what I'm doing wrong?
    Thanks,
    Drew

  • How do you harness URL external application in a JSP?

    I have successfully deployed the Yahoo Finance sample URL External Application. However, I do not understand how to utilize the URL classes (in the pdkjava.jar) to harness the external application information once a user has authenticated. I am building a JSP portlet that displays and applet, however the applet requires a username and password. I need to get the Username and Password from external application, which it gets from the user via External Application. How do I get these values in my JSP (that is defined in my provider.xml)? I keep seeing documentation regarding the ExternalPrincipal object however I don't understand how to utilize this object in my JSP. I beleive the ExternalPrincipal object is what I need in my JSP, seeing that it has the methods for getting the user and password. Unless is there a better way of achieving this, can anyone shed some light on getting the ExternalPrincipal object for an External Application session?
    Thanks,
    Laith E.H.

    Thanks for the example. I have a better understanding now, however I'm still having trying to comprehend the flow of executing in this portal model.
    I have a problem with:
    PortletRenderRequest pr = (PortletRenderRequest) request.getAttribute("oracle.portal.PortletRenderRequest");
    ProviderUser prUser = pr.getUser();
    ProviderSession pSession = prUser.getSession(true);
    I get a NullPointerException on the second line when trying to getUser(). I'm not sure where the problem could be. In the provider.xml, my ExternalProviderInstance, or the JSP itself? I have another JSP portlet on the same page that calls the same method with success.
    Thanks,
    Laith E.H.
    provider.xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <?providerDefinition version="3.1"?>
    <provider class="oracle.portal.provider.v2.http.URLProviderDefinition">
         <providerInstanceClass>com.cox.portal.provider.ExternalProviderInstance</providerInstanceClass>
         <session>true</session>
         <authentication class="oracle.portal.provider.v2.security.Authentication">
              <authType>ExternalApp</authType>
              <userFieldName>Username</userFieldName>
              <userPwdName>Password</userPwdName>
              <errorPageMessages>Invalid ID,Invalid Password</errorPageMessages>
         </authentication>
         <portlet class="oracle.portal.provider.v2.http.URLPortletDefinition">
         <id>1</id>
         <name>ExternalAnalyzer</name>
         <title>Main Analyzer</title>
         <description>This portlet logs into analyzer</description>
         <timeout>100</timeout>
         <timeoutMessage>analyzer timed out</timeoutMessage>
              <showEdit>false</showEdit>
              <showEditDefault>false</showEditDefault>
              <showPreview>false</showPreview>
              <showDetails>false</showDetails>
              <hasHelp>false</hasHelp>
              <hasAbout>false</hasAbout>
              <acceptContentType>text/html</acceptContentType>
              <registrationPortlet>false</registrationPortlet>
              <accessControl>registered</accessControl>
              <renderer class="oracle.portal.provider.v2.render.RenderManager">
                   <showPage class="oracle.portal.provider.v2.render.http.URLRenderer">
                        <pageUrl>http://catl0dv31.corp.cox.com/bic/analyzerIFrame.jsp?ap_doc=analyzer&amp;ap_id=105</pageUrl>
                        <contentType>text/html</contentType>
                   </showPage>
              </renderer>
              <securityManager class="oracle.portal.provider.v2.security.URLSecurityManager">
                   <authorizType>registered</authorizType>
              </securityManager>
         </portlet>
    </provider>
    ExternalProviderInstance:
    package com.cox.portal.provider;
    import oracle.portal.provider.v2.*;
    import oracle.portal.provider.v2.http.*;
    import oracle.portal.provider.v2.externalApp.*;
    public class ExternalProviderInstance extends URLProviderInstance
    public static final String EXTERNAL_APP = "externalapp.object.key";
    ProviderSession pSession = null;
    public Object[] initSession(ProviderUser user, ExternalPrincipal externalApp)
    throws ProviderException {
    //UrlServicesUtils.logMessage("BasicURLProvider : Entering initSession.", getDebugLevel());
    //Create/Retrieve provider user session.
    if (mProviderDefinition.getHasSession()) {
    // Create the session if it doesn't already exist.
    pSession = user.getSession(true);
    // Store external app in provider session so that other modules
    // can extract it later.
    if (pSession != null) {
    pSession.setAttribute(EXTERNAL_APP, externalApp);
    // Get javax.servlet.http.Cookie[] from user
    javax.servlet.http.Cookie[] cookies = ((ServletProviderUser)user).getCookies();
    if(cookies != null)
    return cookies;
    else
    return null;

  • FM with code to send a simple text mail to external ID

    Hi All,
    I need a FM with code if possible to send a simple text mail to an external e-mail id or distribution list. I tried using the FM SO_NEW_DOCUMENT_ATT_SEND_API1 and was successfull in sending mail. But it requires attachment.
    I need help to send mail without attachment with code.
    All configurations done at my end.
    Thanks
    Anirban Bhattacharjee

    Hi Anirban,
    Please check this sample code.
    * Email ITAB structure
    DATA: BEGIN OF EMAIL_ITAB OCCURS 10.
            INCLUDE STRUCTURE SOLI.
    DATA: END OF EMAIL_ITAB.
    DATA: T_EMAIL LIKE SOOS1-RECEXTNAM.  "EMail distribution list
    CONSTANTS: C_EMAIL_DISTRIBUTION LIKE SOOS1-RECEXTNAM VALUE
               ‘[email protected],[email protected]’.
    * Initialization
    REFRESH EMAIL_ITAB.
    * Populate data
    EMAIL_ITAB-LINE = ‘Email body text 1’.
    APPEND EMAIL_ITAB.
    EMAIL_ITAB-LINE = ‘Email body text 2’.
    APPEND EMAIL_ITAB.
    T_EMAIL = C_EMAIL_DISTRIBUTION.
    * --- EMAIL FUNCTION ---------------------------------------------------
    * REQUIRMENTS:
    * 1) The user running the program needs a valid email address in their
    *    address portion of tx SU01 under external comms -> SMTP -> internet
    *    address.
    * 2) A job called SAP_EMAIL is running with the following parameters:
    *    Program: RSCONN01  Variant: INT   User: XXX
    *    This program moves mail from the outbox to the mail server using
    *    RFC destination: SAP_INTERNET_GATEWAY_SERVER
    * INTERFACE:
    * 1) APPLICATION: Anything
    * 2) EMAILTITLE:  EMail subject
    * 3) RECEXTNAM:   EMail distribution lists separated by commas
    * 4) TEXTTAB:     Internal table for lines of the email message
    * EXCEPTIONS:
    * Send OK = 0 otherwise there was a problem with the send.
        CALL FUNCTION 'Z_SEND_EMAIL_ITAB'
             EXPORTING
                  APPLICATION = 'EMAIL'
                  EMAILTITLE  = 'Email Subject'
                  RECEXTNAM   = T_EMAIL
             TABLES
                  TEXTTAB     = EMAIL_ITAB
             EXCEPTIONS
                  OTHERS      = 1.
    Function Z_SEND_EMAIL_ITAB
    *"*"Local interface:
    *"       IMPORTING
    *"             VALUE(APPLICATION) LIKE  SOOD1-OBJNAM
    *"             VALUE(EMAILTITLE) LIKE  SOOD1-OBJDES
    *"             VALUE(RECEXTNAM) LIKE  SOOS1-RECEXTNAM
    *"       TABLES
    *"              TEXTTAB STRUCTURE  SOLI
    *- local data declaration
      DATA: OHD    LIKE SOOD1,
            OID    LIKE SOODK,
            TO_ALL LIKE SONV-FLAG,
            OKEY   LIKE SWOTOBJID-OBJKEY.
      DATA: BEGIN OF RECEIVERS OCCURS 0.
              INCLUDE STRUCTURE SOOS1.
      DATA: END OF RECEIVERS.
    *- fill odh
      CLEAR OHD.
      OHD-OBJLA    = SY-LANGU.
      OHD-OBJNAM   = APPLICATION.
      OHD-OBJDES   = EMAILTITLE.
      OHD-OBJPRI   = 3.
      OHD-OBJSNS   = 'F'.
      OHD-OWNNAM   = SY-UNAME.
    *- send Email
      CONDENSE RECEXTNAM NO-GAPS.
      CHECK RECEXTNAM <> SPACE AND RECEXTNAM CS '@'.
    *- for every individual recipient send an Email
    * (see OSS message 0120050409/0000362105/1999)
      WHILE RECEXTNAM CS ','.
        PERFORM INIT_REC TABLES RECEIVERS.
        READ TABLE RECEIVERS INDEX 1.
        RECEIVERS-RECEXTNAM = RECEXTNAM+0(SY-FDPOS).
        ADD 1 TO SY-FDPOS.
        SHIFT RECEXTNAM LEFT BY SY-FDPOS PLACES.
        MODIFY RECEIVERS INDEX 1.
        PERFORM SO_OBJECT_SEND_REC
         TABLES TEXTTAB RECEIVERS
          USING OHD.
      ENDWHILE.
    *- check last recipient in recipient list
      IF RECEXTNAM <> SPACE.
        PERFORM INIT_REC TABLES RECEIVERS.
        READ TABLE RECEIVERS INDEX 1.
        RECEIVERS-RECEXTNAM = RECEXTNAM.
        MODIFY RECEIVERS INDEX 1.
        PERFORM SO_OBJECT_SEND_REC
         TABLES TEXTTAB RECEIVERS
          USING OHD.
      ENDIF.
    ENDFUNCTION.
    *       FORM SO_OBJECT_SEND_REC                                       *
    FORM  SO_OBJECT_SEND_REC
    TABLES  OBJCONT      STRUCTURE SOLI
            RECEIVERS    STRUCTURE SOOS1
    USING   OBJECT_HD    STRUCTURE SOOD1.
      DATA:   OID     LIKE SOODK,
              TO_ALL  LIKE SONV-FLAG,
              OKEY    LIKE SWOTOBJID-OBJKEY.
      CALL FUNCTION 'SO_OBJECT_SEND'
           EXPORTING
                EXTERN_ADDRESS             = 'X'
                OBJECT_HD_CHANGE           = OBJECT_HD
                OBJECT_TYPE                = 'RAW'
                OUTBOX_FLAG                = 'X'
                SENDER                     = SY-UNAME
           IMPORTING
                OBJECT_ID_NEW              = OID
                SENT_TO_ALL                = TO_ALL
                OFFICE_OBJECT_KEY          = OKEY
           TABLES
                OBJCONT                    = OBJCONT
                RECEIVERS                  = RECEIVERS
           EXCEPTIONS
                ACTIVE_USER_NOT_EXIST      = 1
                COMMUNICATION_FAILURE      = 2
                COMPONENT_NOT_AVAILABLE    = 3
                FOLDER_NOT_EXIST           = 4
                FOLDER_NO_AUTHORIZATION    = 5
                FORWARDER_NOT_EXIST        = 6
                NOTE_NOT_EXIST             = 7
                OBJECT_NOT_EXIST           = 8
                OBJECT_NOT_SENT            = 9
                OBJECT_NO_AUTHORIZATION    = 10
                OBJECT_TYPE_NOT_EXIST      = 11
                OPERATION_NO_AUTHORIZATION = 12
                OWNER_NOT_EXIST            = 13
                PARAMETER_ERROR            = 14
                SUBSTITUTE_NOT_ACTIVE      = 15
                SUBSTITUTE_NOT_DEFINED     = 16
                SYSTEM_FAILURE             = 17
                TOO_MUCH_RECEIVERS         = 18
                USER_NOT_EXIST             = 19
                X_ERROR                    = 20
                OTHERS                     = 21.
      IF SY-SUBRC <> 0.
        RAISE OTHERS.
      ENDIF.
    ENDFORM.
    *       FORM INIT_REC                                                 *
    FORM INIT_REC TABLES RECEIVERS STRUCTURE SOOS1.
      CLEAR RECEIVERS.
      REFRESH RECEIVERS.
      MOVE SY-DATUM  TO RECEIVERS-RCDAT .
      MOVE SY-UZEIT  TO RECEIVERS-RCTIM.
      MOVE '1'       TO RECEIVERS-SNDPRI.
      MOVE 'X'       TO RECEIVERS-SNDEX.
      MOVE 'U-'      TO RECEIVERS-RECNAM.
      MOVE 'U'       TO RECEIVERS-RECESC.
      MOVE 'INT'     TO RECEIVERS-SNDART.
      MOVE '5'       TO RECEIVERS-SORTCLASS.
      APPEND RECEIVERS.
    ENDFORM.
    Hope this will help.
    Regards,
    Ferry Lianto

  • Session Sharing between Portal and Baja servlet(UIX)

    Hi guys,
    I'm having real trouble trying to share a portal session with an external servlet session, in order to enable some file upload functionality. I found an older post (Re: cannot do a select on a table which mentioned a couple of pre-reqs for doing this, but they don't seem to work. I've enabled the the "Same Cookie Domain" checkbox. On checking the cookie values generated by portal, i noticed that none of them have a domain value:
    Cookie name :ORA_DG2 cookie//domain : null//cooki val :mrlMP%2F8%2FMP%2F8
    Cookie name :ORA_UCM_VER//cookie domain : null//cookie val :%2FMP%2F8pgqfg%2Cl_w_p%3Emp_ajc%2CamkMP%2F8neode*j%5Du%5Dn%3Ckn%5D_ha*_kiMP%2F80.3%2C005%2C21%2C%2F1MP%2F8.%2C1*..3*0%2F*-%2F
    I tried setting my own cookie, but when I forward the request from portal to my (external) UIX servlet, a new session is created and all cookies are lost.
    Dev env: ias102222, Jserv, with Portal 3.0.9.8
    Any help will be much appreciated, I'm pretty much stuck on this one. The old post also mentioned a document to read (" See documents on session handling and Integrating Password Protected Applications into Oracle Portal - downloadable from portalstudio.oracle.com. "), but I've spent quite some time looking around on portalstudio, and haven't found it.
    thanks,
    rishi

    Hi,
    As you suggested, I took the issue up with the Cabo team, and the conclusion seems to be that either it may be a jserv bug, or something to do with JPDK. the UIX redirection code simply uses HttpServletResponse.sendRedirectURL()) for doing its work.
    Sorry about the long post, thought I'd give some more info about what i'm seeing. I hope I'm doing everythng that is needed for session mgmt in PDK. I've got the "Once Per Session" box and "Same Cookie Domain" boxes checked. This is what the jserv.log looks like :
    [01/05/2002 15:59:36:093 PDT] oracle.osf.UixServlet/Event = null
    [01/05/2002 15:59:36:093 PDT] oracle.osf.UixServlet/Parameter portalid=24935
    [01/05/2002 15:59:36:109 PDT] oracle.osf.UixServlet/Parameter [email protected]
    I assume that the 'oracle.osf.UixServlet' above indicates the servlet zone, in which case the portlet UIX and the second UIX are both in the same zone. One thing i notice is that the domain cookie is always null. do it need to be explicitly set in order to have the correct value?
    Here's the log from the time the first page is accessed, to the stuff printed out during the redirect. Note that 'sessid' changes after the redirect(revelent lines below are marked between '------'):
    [02/05/2002 13:06:08:062 PDT] oracle.osf.UixServlet/Prov Msg : PortletPageBroker: ***********************************************************
    [02/05/2002 13:06:14:250 PDT] oracle.osf.UixServlet/Requested page = Page[name=selfserv/reqUpload]
    [02/05/2002 13:06:14:250 PDT] oracle.osf.UixServlet/Event = reqUpload.upload
    [02/05/2002 13:06:14:250 PDT] oracle.osf.UixServlet/Parameter rendermode=6
    [02/05/2002 13:06:14:250 PDT] oracle.osf.UixServlet/Parameter _portletid=20
    [02/05/2002 13:06:14:250 PDT] oracle.osf.UixServlet/Parameter _border=0
    [02/05/2002 13:06:14:250 PDT] oracle.osf.UixServlet/Parameter _action=showPortlet
    [02/05/2002 13:06:14:250 PDT] oracle.osf.UixServlet/Parameter [email protected]
    [02/05/2002 13:06:14:250 PDT] oracle.osf.UixServlet/Parameter authlevel=10
    [02/05/2002 13:06:14:250 PDT] oracle.osf.UixServlet/Parameter providerid=249353600001
    [02/05/2002 13:06:14:250 PDT] oracle.osf.UixServlet/Parameter backurl=http://dragon2-nt.us.oracle.com/servlet/page?pageid=553,555&_dad=portal30&_schema=PORTAL30
    [02/05/2002 13:06:14:250 PDT] oracle.osf.UixServlet/Parameter backurl=http://dragon2-nt.us.oracle.com/servlet/page?_pageid=553,555&_dad=portal30&_schema=PORTAL30
    26_portletid%3D20%26_referencepath%3D938_PROCESS_2493536%26_backurl%3Dhttp%253A%252F%252Fdragon2-nt.us.oracle.com%252Fservlet%252Fpage%253F_pageid%253D553%252C555%2526_dad%253Dportal30%2526_schema%253DPORTAL30%26_mode%3D6%26_title%3DProcess%2524bjSt%253Dadb2b61d
    [02/05/2002 13:06:14:250 PDT] oracle.osf.UixServlet/Parameter 249353600001.20.938_PROCESS_2493536.next_page=reqUpload
    [02/05/2002 13:06:14:250 PDT] oracle.osf.UixServlet/Parameter [email protected]
    [02/05/2002 13:06:14:250 PDT] oracle.osf.UixServlet/Parameter portletid=20
    [02/05/2002 13:06:14:250 PDT] oracle.osf.UixServlet/Parameter _title=Process$bjSt=adb2b61d
    [02/05/2002 13:06:14:250 PDT] oracle.osf.UixServlet/Parameter [email protected]
    [02/05/2002 13:06:14:250 PDT] oracle.osf.UixServlet/Parameter _providerid=2493536
    [02/05/2002 13:06:14:250 PDT] oracle.osf.UixServlet/Parameter _logintime=2002-05-02-12:47:04
    [02/05/2002 13:06:14:250 PDT] oracle.osf.UixServlet/Parameter pageurl=http://dragon2-nt.us.oracle.com/servlet/page?_dad=portal30&_schema=PORTAL30&_type=portlet&_providerid=2493536&_portletid=20&_referencepath=938_PROCESS_2493536&_backurl=http%3A%2F%2Fdragon2-nt.us.oracle.com%2Fservlet%2Fpage%3F_pageid%3D553%2C555%26_dad%3Dportal30%26_schema%3DPORTAL30&_mode=6&_title=Process%24bjSt%3Dadb2b61d
    [02/05/2002 13:06:14:250 PDT] oracle.osf.UixServlet/Parameter portalid=24935
    [02/05/2002 13:06:14:250 PDT] oracle.osf.UixServlet/Parameter loginurl=https://dragon2-nt.us.oracle.com/pls/portal30_sso/portal30_sso.wwsso_app_admin.fapp_process_login?p_app_id=
    [02/05/2002 13:06:14:250 PDT] oracle.osf.UixServlet/Parameter _type=portlet
    [02/05/2002 13:06:14:250 PDT] oracle.osf.UixServlet/Parameter instancename=938_PROCESS_2493536
    [02/05/2002 13:06:14:250 PDT] oracle.osf.UixServlet/Parameter referencepath=938PROCESS_2493536
    [02/05/2002 13:06:14:265 PDT] oracle.osf.UixServlet/Parameter hastitle=0
    [02/05/2002 13:06:14:265 PDT] oracle.osf.UixServlet/Prov Msg : SelfServPageFlowEngine: SourcePage: selfserv/reqUpload
    [02/05/2002 13:06:14:265 PDT] oracle.osf.UixServlet/Prov Msg : SelfServPageFlowEngine: getPage: redirectURL
    [02/05/2002 13:06:14:265 PDT] oracle.osf.UixServlet/Prov Msg : SelfServPageFlowEngine: getPage sessid =7t9gjv18w1.qQvvsA5H/BjN/AXMmkbGngTxpQOUp6XxmkLCpRbOcxeRc3y-
    [02/05/2002 13:06:14:265 PDT] oracle.osf.UixServlet/Rendering page = Page[name=redirectURL,state=cf6605c5,url=http://shazam.us.oracle.com:7778/servlet/oracle.osf.UixServlet/selfserv/requploadFile?accountId=9&sesid=7t9gjv18w1.qQvvsA5H/BjN/AXMmkbGngTxpQOUp6XxmkLCpRbOcxeRc3y-,islog=event=reqUpload.upload&_render_mode=6&_portletid=20&_border=0&_action=showPortlet&[email protected]&_auth_level=10&_provider_id=249353600001&_backurl=http://dragon2-nt.us.oracle.com/servlet/page?_pageid=553,555&_dad=portal30&_schema=PORTAL30&_back_url=http://dragon2-nt.us.oracle.com/servlet/page?_pageid=553,555&_dad=portal30&_schema=PORTAL30&_design_url=http://dragon2-nt.us.oracle.com/servlet/page?_dad=portal30&_schema=PORTAL30&_type=portlet&_providerid=2493536&_portletid=20&_referencepath=938_PROCESS_2493536&_backurl=http%3A%2F%2Fdragon2-nt.us.oracle.com%2Fservlet%2Fpage%3F_dad%3Dportal30%26_schema%3DPORTAL30%26_type%3Dportlet%26_providerid%3D2493536%26_portletid%3D20%26_referencepath%3D938_PROCESS_2493536%26_backurl%3Dhttp%253A%252F%252Fdragon2-nt.us.oracle.com%252Fservlet%252Fpage%253F_pageid%253D553%252C555%2526_dad%253Dportal30%2526_schema%253DPORTAL30%26_mode%3D6%26_title%3DProcess%2524bjSt%253Dadb2b61d&249353600001.20.938_PROCESS_2493536.next_page=reqUpload&[email protected]&_portlet_id=20&_title=Process$bjSt=adb2b61d&[email protected]&_providerid=2493536&_logintime=2002-05-02-12:47:04&_page_url=http://dragon2-nt.us.oracle.com/servlet/page?_dad=portal30&_schema=PORTAL30&_type=portlet&_providerid=2493536&_portletid=20&_referencepath=938_PROCESS_2493536&_backurl=http%3A%2F%2Fdragon2-nt.us.oracle.com%2Fservlet%2Fpage%3F_pageid%3D553%2C555%26_dad%3Dportal30%26_schema%3DPORTAL30&_mode=6&_title=Process%24bjSt%3Dadb2b61d&_portal_id=24935&_login_url=https://dragon2-nt.us.oracle.com/pls/portal30_sso/portal30_sso.wwsso_app_admin.fapp_process_login?p_app_id=&_type=portlet&_instance_name=938_PROCESS_2493536&_referencepath=938_PROCESS_2493536&_has_title=0,islogged=true]
    [02/05/2002 13:06:14:281 PDT] oracle.osf.UixServlet/Prov Msg : PortletPageBroker: PageName=redirectURL
    [02/05/2002 13:06:14:281 PDT] oracle.osf.UixServlet/Prov Msg : PortletPageBroker: ***********************************************************
    [02/05/2002 13:06:23:031 PDT] oracle.osf.UixServlet/Requested page = Page[name=selfserv/requploadFile]
    [02/05/2002 13:06:23:031 PDT] oracle.osf.UixServlet/Event = null
    [02/05/2002 13:06:23:031 PDT] oracle.osf.UixServlet/Parameter accountId=9
    [02/05/2002 13:06:23:031 PDT] oracle.osf.UixServlet/Parameter sesid=7t9gjv18w1.qQvvsA5H/BjN/AXMmkbGngTxpQOUp6XxmkLCpRbOcxeRc3y-
    [02/05/2002 13:06:23:078 PDT] oracle.osf.UixServlet/Prov Msg : SelfServPageFlowEngine: SourcePage: selfserv/requploadFile
    getPage: selfserv/Login
    [02/05/2002 13:06:23:078 PDT] oracle.osf.UixServlet/Prov Msg : SelfServPageFlowEngine: bc is oracle.cabo.servlet.BaseBajaContext@e1381b00
    [02/05/2002 13:06:23:078 PDT] oracle.osf.UixServlet/Prov Msg : SelfServPageFlowEngine: getPage sessid =8cuavt19b1.qQvvsA5H/BjN/AXMmkbGngTxpQOUp6XxmkLCpRbOcxeRc3y-
    Again, i don't know how helpful this log is, but any pointers would be much appreciated.
    rishi

  • Parallel Sessions on Datapump Export  (10.2.0.4)

    Hi,
    We are using Oracle 10.2.0.4 on Solaris and I'm exporting a table using Datapump export.
    The export includes a query which selects from three tables based on relevant conditions. The parfile specifies 'parallel=4' and the dumpfile setting uses %U so that it creates an appropriate number of files.
    When I run the export using my own (DBA) account (i.e. expdp mr_dba parfile=exp_xyz.par) the export completes in 15 minutes and creates four dumpfiles. When I run the export as the schema owner using the exact same parfile (i.e. expdp schema_own parfile=exp_xyz.par) the export takes over two hours and only creates two dumpfiles.
    Could anyone suggest things that I could look at to find out why there is such a difference in the elapsed time? The exports have been run a number of times as both users with the box having similar loads and the results are fairly consistent i.e. 15 mins for my user and two hours for the schema owner.
    The schema owner does have a different profile and a different Resource Consumer Group but both my profile and the schema owners profile have 'sessions_per_user' set to Unlimited. In Resource Manager the Parallel_Degree_Limit_P1 value is set to 16 for my consumer group and is not set at all for the schema owners consumer group.
    I have observed that when exporting under the schema owner the DBA_DATAPUMP_SESSIONS showed a DBMS_DATAPUMP session, a MASTER session and two WORKER sessions. When I run it under my user id it shows these four sessions but also shows three EXTERNAL TABLE sessions. This suggests that it is using a different approach but I'm not sure what would cause this.
    Any advice would be very welcome. I haven't posted any specific information about the parameter file or the tables as I'm not sure what info people might require - so if you need specific details of anything please let me know.
    Many thanks.

    Sorry for the delay in responding - it took a couple of days for our security people to give me the go-ahead to make the changes (red tape is ridiculous here!)
    The tweak to the consumer groups in Resource Manager didn't seem to make much difference and it continued to use the same plan (but it was worth trying it). I then granted the EXP_FULL_DATABASE role and it did indeed result in much better performance (and it created the four dumpfiles instead of two).
    I'm still not sure why it makes such a difference - the export is only exporting a table from the users schema but it does query a table in someone else's schema to identify appropriate candidates. You would assume that providing it can access all the necessary information it would run at the optimum speed but obviously the EXP_FULL_DATABASE role makes a considerable difference.
    Thanks again for both replies, much appreciated. Well done Dean for identifying the solution - great call.
    Edited by: user2480656 on 21-Aug-2012 08:35

  • JTA Transaction and CUrrent Session

    We have the following problem. We configured hibernate with
    jta and when we execute a simple code that performs some hibernate
    queries we get the following error:
    "org.hibernate.LazyInitializationException: could not
    initialize proxy - the owning Session was closed"
    We discovered that if we leave the session opened the error
    disapears, but on the long run this crashes the server throwing a
    JDBC connection error.
    We tried to use getCurrentSession() instead of opening the
    session manualy but in this case we get the following error:
    "org.hibernate.HibernateException : Unable to locate current
    UserTransaction"
    This its quite strange because the current session should be
    bound to the current user transaction and its seems to us that our
    hibernate cfg file its ok.
    I´am posting part of my hibernate cfg file and the code
    that I execute.
    hibernate.cfg.xml
    <hibernate-configuration>
    <session-factory name="java:/hibernate/SessionFactory">
    <property
    name="hibernate.connection.datasource">java:fiap</property>
    <property
    name="hibernate.dialect">org.hibernate.dialect.PostgreSQLDialect</property>
    <!-- Enable Hibernate's automatic session context
    management -->
    <property
    name="hibernate.current_session_context_class">jta</property>
    <property
    name="hibernate.transaction.factory_class">org.hibernate.transaction.JTATransactionFactor y</property>
    <property
    name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.JBossTransact ionManagerLookup</property>
    <property
    name="jta.UserTransaction">java:comp/UserTransaction</property>
    <!-- <property
    name="connection.release_mode">after_statement</property>
    -->
    <!-- <property
    name="hibernate.transaction.flush_before_completion">true</property>-->
    <property
    name="hibernate.transaction.auto_close_session">true</property>
    and my java Code:
    try {
    tx = HUtil.getTx(); //JNDI lookup
    tx.begin();
    session = HUtil.getSessionFactory().getCurrentSession();
    //JNDI Lookup
    //session = HUtil.getSessionFactory().openSession();
    Query query = session.createQuery("from Persona where
    username = ?");
    query.setString(0, userName);
    persona = (Persona) query.uniqueResult();
    query = session.createQuery("from Festival where id = ?");
    query.setInteger(0, idFestival);
    festival = (Festival) query.uniqueResult();
    if (persona != null && festival != null) {
    query = session.createQuery("from Inscripcion where
    inscribeA = :persona " +
    "AND inscriptosEn = :festival");
    query.setParameter("persona", persona);
    query.setParameter("festival", festival);
    inscripcion = (Inscripcion) query.uniqueResult();
    return inscripcion;
    } catch (Exception e) {
    e.printStackTrace();
    throw e;
    } finally {
    tx.commit();
    //session.close();
    thanks

    The scenario you described is typical ... "If a client calls m1" ... there are 2 cases:
    (1) the client is already in a trans
    (2) not (1)
    Let (1). This is the case of a Client Controlled Transaction ... etc ... when s1 is called it begins a transaction in the client transactional context ... hence s1 can't call a kind of roolback but can force the rollback of the global transaction marking EJBContext.setRollbackOnly() ... s2 uses the same transactional context ... anayway the client is the only one that can commit. This happens because of "transaction required" as the transaction attribute, that in this case forces a flat transaction model. Different is the case if you uses "requiredNew" --> nested trans model ...
    (2) is the same of (1) except that the trans starts at application tier.
    "I still have one doubt. Wouldn't the stateless session bean loose the transaction context once I exit the second stateles session bean's method? Isn't that what stateless means? "
    No:
    stateless doesn't stay for the transaction context but for the conversational state with the client ... that is serializable ... it makes the beans more poolable ... that the stateful session bean has
    bye

  • Commit of Unit of Work

    public static ToplinkTrattative1 doProvaUpdate(Double idTrattativa) {
    ConversionManager.getDefaultManager().setShouldUseClassLoaderFromCurrentThread(true);
    oracle.toplink.sessions.Project project = XMLProjectReader.read("/C:/Documents and Settings/Cheru.CHERUBBOLO/Desktop/tirocinio/jdev9052new/jdev/mywork/tirocinio/Model/src/META-INF/Model/toplink-deployment-descriptor.xml");
    DatabaseSession session = project.createDatabaseSession();
    session.login();
    Expression exp = new ExpressionBuilder().get("idTrattativa").equal(idTrattativa);
    ToplinkTrattative1 tc = (ToplinkTrattative1)session.readObject(model.ToplinkTrattative1.class, exp);
    session.beginTransaction();
    UnitOfWork uow=session.acquireUnitOfWork();
    tc.setNote("prova");
    tc.setStato(new Character('A'));
    ToplinkTrattative1 v=(ToplinkTrattative1)uow.registerObject(tc);
    uow.mergeClone(tc);
    uow.commit();
    session.commitTransaction();
    return v;
    and in session the transaction is commited but not in DB.
    I use toplink for model and Stuts/JSP for View.
    Thx for all

    A few issues with this,
    First,
    session.beginTransaction();
    UnitOfWork uow=session.acquireUnitOfWork();...
    uow.commit();
    session.commitTransaction();When using the UnitOfWork the DatabaseSession beginTransaction/commitTransaction API should not be used. The UnitOfWork manages the transaction. DatabaseSession beginTransaction/commitTransaction are only provided for use with the basic writeObject API.
    Second,
    ToplinkTrattative1 tc = (ToplinkTrattative1)session.readObject(model.ToplinkTrattative1.class, exp);
    UnitOfWork uow=session.acquireUnitOfWork();
    tc.setNote("prova");
    tc.setStato(new Character('A'));
    ToplinkTrattative1 v=(ToplinkTrattative1)uow.registerObject(tc);
    uow.mergeClone(tc);You cannot modify objects read from the Session, you can only modify the returned clones of objects that have been register in a UnitOfWork. You must first register the object, and then make your changes. By changing the object before registering it the UnitOfWork will not detect any changes, and will not commit anything to the database.
    It should be,
    UnitOfWork uow=session.acquireUnitOfWork();
    ToplinkTrattative1 v =(ToplinkTrattative1)uow.registerObject(tc);
    v.setNote("prova");
    v.setStato(new Character('A'));
    uow.commit();

  • Why we cannot commit inside BAPI and what if we call workflow inside BAPI?

    hi,
    can anyone tell me why we cannot use Commit statement inside BAPI ?
    Also what if in my BAPI ,i have triggered my workflow and through that can i commit??
    Regards,
    Mayank

    Hi,
    it is a part of the BAPI programming model that BAPIs use a certain transaction model. This transaction model says that one BAPI has to follow the so called ACID (atomar, consistent, isolated, durable) principle. To ensure that a BAPI is atomar you cannot put a commit work just anywhere in mid of a BAPI as this would violate the modell. Furthermore BAPIs shall allow external commit handling that means it has to be possible to include several BAPI calls in one LUW. For this there are BAPIs which are only for committing or rolling back a transaction. For more detailed information you can check as usual the SAP help [click me|http://help.sap.com/saphelp_nw04/helpdata/EN/a5/3ec8654ac011d1894e0000e829fbbd/frameset.htm]
    If would suppose that when you throw a workflow event it is triggered once the LUW is closed. At least SAP should work that way. But I have to admit in newer ABAP OO developments SAP often just calls the Event raising function module with the option to not wait for the DB commit. Seems there are some problems with the newer LUW concepts / OO and the old workflow technology. This can lead in worst case to events raised for objects which were rolled back later but SAP seems to accept that so it is in my oppinion an acceptable solution.
    Hope that helps a bit
    Roman

  • Help me with my session.update() please....

    Hi there again...
    I want to ask something very annoying for me.
    Here i have some code to update my data. It would be like this:
         public void updateTopicReply(Integer id,Integer reply) {
              Topic topic = null;
              Session session = null;
              Transaction tx = null;
              session = HibernateSessionFactory.currentSession();
              reply=reply+1;
              topic = (Topic) session.get(Topic.class, id);
              topic.setReply(reply);
              tx = session.beginTransaction();
              session.update(topic);
              tx.commit();
         session.close();
    when i saw it again in my jsp, no its not changed. But when I press F5, yeaaaa, it's been updated.
    But when i press F5 again, it changed back again. And I keep press F5, it's just like the lamp of christmas tree...
    So i read some more and I try to add this flush() and refresh()
              tx = session.beginTransaction();
              session.update(topic);
              session.flush();
              session.refresh(topic);
              tx.commit();
    But, man.It's still the same.
    Anyone know what is the problem?
    Any idea or solution u can share?
    Or any other method to give?

    It all depends on the number of beeps.  Please count the beeps and post the amount. Put in the original ram.
    Reslot your ram if you truly believe it is that.

  • Effect of Multiversion Concurrency Control on Isolation

    Suppose I have a table defined as follows:
    create table duty
    (person char(30),
    status char(3)
    And it has the following contents:
    select * from duty;
    PERSON STATUS
    Greg on
    Heping on
    If I do the following in two sessions as outlined:
    *** Session 1 ***
    set transaction isolation level serializable;
    *** Session 2 ***
    set transaction isolation level serializable;
    *** Session 1 ***
    select * from duty where person = 'Greg';
    PERSON STATUS
    Greg on
    -- Since Greg is 'on' we'll set Heping 'off'.
    *** Session 2 ***
    select * from duty where person = 'Heping';
    PERSON STATUS
    Heping on
    -- Since Heping is 'on' we'll set Greg 'off'.
    *** Session 1 ***
    update duty set status = 'off' where person = 'Heping';
    *** Session 2 ***
    update duty set status = 'off' where person = 'Greg';
    *** Session 1 ***
    commit;
    *** Session 2 ***
    commit;
    Then, my table contains
    select * from duty;
    PERSON STATUS
    Greg off
    Heping off
    If these two transactions had been executed according to the SQL92 standard for transaction isolation level serializable, that is in one order or the other, then the status of these two rows would not both be 'off' (because I would not have executed the update if I saw the status off).
    I note that Sybase seems to correctly handle these transactions in serializable mode if I execute them just as show above in that it identifies a deadlock between the two and forces one to rollback.
    Does Oracle not implement the SQL92 Standard with respect to transaction isolation levels? Is this behavior due to Multi-Version Concurrency Control?
    Thanks,
    G.Carter

    The couple of responses are very much appreciated. I especially found the link to Tom Kyte's article, "On Transaction Isolation Levels" (http://www.oracle.com/technology/oramag/oracle/05-nov/o65asktom.html) enlightening.
    My conclusion is that different SQL database vendors may claim compliance with the SQL-92 standard despite the fact that their databases exhibit different behaviors and yield different answers under like circumstances because the SQL-92 standard is self inconsistent. In particular, on the one hand, the standard states that:
    [1]A serializable execution is defined to be an execution of the operations of
    concurrently executing SQL-transactions that produces the same effect as
    some serial execution of those same SQL-transactions.
    And on the other hand (in fact, in the very next paragraph), the standard states that:
    [2]The isolation level specifies the kind of phenomena ["Dirty read", "Non-repeatable read", "Phantom"]
    that can occur during the execution of concurrent SQL-transactions.
    Whereas Sybase can emphasize [1] as a justification for its behavior, Oracle can emphasize [2] to justify its behavior, and under like circumstances, those behaviors yield different results.
    Unfortunately, I (and I've got to believe that many others as well) do not have the luxury of building an application that will work with only one vendor's database.
    Thanks,
    G.Carter

  • Problem with store procedures and Hibernate

    I got some problem when I am trying to override INSERT, and UPDATE operations in Hibernate. My delete functions works fine, and everything works when i´m not override with my stored procedure, and I have no idea why. When I am trying to make an INSERT, everything seems to be fine but no data is being insert and no excpetion throws.
    When I am trying to make an UPDATE following excpetion throws:
    Could not synchronize database state with session
    org.hibernate.exception.GenericJDBCException: could not update: [labb6Hibernate.bil#18]
    Here is my hbm.xml file:
    <hibernate-mapping>
    <class catalog="Cars" name="labb6Hibernate.bil" table="Bil">
    <id name="idNum" type="java.lang.Integer">
    <column name="idNum"/>
    <generator class="identity"/>
    </id>
    <property name="marke" type="string">
    <column length="10" name="Marke" not-null="true"/>
    </property>
    <property name="modell" type="string">
    <column length="10" name="Modell" not-null="true"/>
    </property>
    <property name="arsmodell" type="string">
    <column length="4" name="Arsmodell" not-null="true"/>
    </property>
    <sql-insert callable="true"> { call insertCars(?,?,?) } </sql-insert>
    <sql-update callable="true"> { call updateCars(?,?,?) </sql-update>
    <sql-delete callable="true"> { call deleteCars(?) } </sql-delete>
    </class>
    Here is my UPDATE code:
    Session session = MyHibernateUtil.getSessionFactory().openSession();
    session.beginTransaction();
    int s = Integer.parseInt(idTxt.getText());
    bil Bil = (bil) session.get(bil.class, s);
    Bil.setIdNum(s);
    Bil.setMarke(markeTxt.getText());
    Bil.setModell(modellTxt.getText());
    Bil.setArsmodell(arsmodellTxt.getText());
    session.update(Bil);
    session.getTransaction().commit();
    session.close();
    Here is my INSERT code:
    Session session = MyHibernateUtil.getSessionFactory().openSession();
    session.beginTransaction();
    bil Bil = new bil();
    Bil.setMarke(markeTxt.getText());
    Bil.setModell(modellTxt.getText());
    Bil.setArsmodell(arsmodellTxt.getText());
    session.save(Bil);
    session.getTransaction().commit();
    session.close();
    Does anyone have an idea what is wrong in my code?

    I got some problem when I am trying to override INSERT, and UPDATE operations in Hibernate. My delete functions works fine, and everything works when i´m not override with my stored procedure, and I have no idea why. When I am trying to make an INSERT, everything seems to be fine but no data is being insert and no excpetion throws.
    When I am trying to make an UPDATE following excpetion throws:
    Could not synchronize database state with session
    org.hibernate.exception.GenericJDBCException: could not update: [labb6Hibernate.bil#18]
    Here is my hbm.xml file:
    <hibernate-mapping>
    <class catalog="Cars" name="labb6Hibernate.bil" table="Bil">
    <id name="idNum" type="java.lang.Integer">
    <column name="idNum"/>
    <generator class="identity"/>
    </id>
    <property name="marke" type="string">
    <column length="10" name="Marke" not-null="true"/>
    </property>
    <property name="modell" type="string">
    <column length="10" name="Modell" not-null="true"/>
    </property>
    <property name="arsmodell" type="string">
    <column length="4" name="Arsmodell" not-null="true"/>
    </property>
    <sql-insert callable="true"> { call insertCars(?,?,?) } </sql-insert>
    <sql-update callable="true"> { call updateCars(?,?,?) </sql-update>
    <sql-delete callable="true"> { call deleteCars(?) } </sql-delete>
    </class>
    Here is my UPDATE code:
    Session session = MyHibernateUtil.getSessionFactory().openSession();
    session.beginTransaction();
    int s = Integer.parseInt(idTxt.getText());
    bil Bil = (bil) session.get(bil.class, s);
    Bil.setIdNum(s);
    Bil.setMarke(markeTxt.getText());
    Bil.setModell(modellTxt.getText());
    Bil.setArsmodell(arsmodellTxt.getText());
    session.update(Bil);
    session.getTransaction().commit();
    session.close();
    Here is my INSERT code:
    Session session = MyHibernateUtil.getSessionFactory().openSession();
    session.beginTransaction();
    bil Bil = new bil();
    Bil.setMarke(markeTxt.getText());
    Bil.setModell(modellTxt.getText());
    Bil.setArsmodell(arsmodellTxt.getText());
    session.save(Bil);
    session.getTransaction().commit();
    session.close();
    Does anyone have an idea what is wrong in my code?

Maybe you are looking for