Session Replication and Session Timeout -- Urgent

WLS -4.5.1 SP 11
          OS - both NT and Sol
          HI All
          The session does not seems to timeout when running the Weblogic servers in
          clustered mode with in-memory session replication on.
          This problem seems to be there in version5.1 too , as per another post , it
          seems to be solved in WLS5.1 sp 8
          Could anyone pls confirm in which patch in WLS 4.5.1 is the problem
          addressed . I'm using patch 11 and am getting the problem.
          Thanks in advance..
          -Surya
          

Try SP13 and if the problem persists, contact [email protected]
          -K
          Surya B Maithani wrote:
          > WLS -4.5.1 SP 11
          > OS - both NT and Sol
          >
          > HI All
          >
          > The session does not seems to timeout when running the Weblogic servers in
          > clustered mode with in-memory session replication on.
          > This problem seems to be there in version5.1 too , as per another post , it
          > seems to be solved in WLS5.1 sp 8
          >
          > Could anyone pls confirm in which patch in WLS 4.5.1 is the problem
          > addressed . I'm using patch 11 and am getting the problem.
          >
          > Thanks in advance..
          >
          > -Surya
          

Similar Messages

  • Session.putValue() and session.setAttribute

    do I have to use session.putValue() before using session.setAttribute() and session.getAttribute() ?
    becuase I have one JSP page include one form (action=TheSameJspFile.JSP) several Submit bottuns each Bottun has its Value.
    in the JSP I request the submit value and depends on it doing stuff ...
    each Value I have to get and to set a session Attribute, if I want to putValue it will delete the old value.
    how can I solve this?

    You need to store something in the session before you can retrieve it.
    So, you need to do a setAttribute() to place something in the session. Then you use getAttribute() to retrieve it. DO NOT use putValue as it is deprecated and has been replaced by setAttribute(). DO NOT use getValue() as it is deprecated and has been replaced by getAttribute().

  • Stateless session beans and idle timeouts (weblogic 10.3.1)

    Need clarification about stateless session beans and the idle-timeout-seconds setting.
    Situation is this – we have a process that is timing out due to an API call to a very slow Authentication server.
    I am trying to resolve this with a code change, but need to further other understand what the server is actually doing.
    We have a session bean which calls another which is calling a util class that does all the work and returns the results back up to the initial session bean. I have left out the ejbName in these examples (it’s irrelevant here).
    Example:
    SessionBean1 // basically called just once a day
    @Session(defaultTransaction = Constants.TransactionAttribute.SUPPORTS,
    enableCallByReference = Constants.Bool.TRUE,
    type = Session.SessionType.STATELESS,
    transTimeoutSeconds = "0",
    initialBeansInFreePool = "0",
    maxBeansInFreePool = "20")
    Methods
    @RemoteMethod() public boolean getUserList(String adminGroup) {
    Map usrList = getUserList(adminGroup);
    Private Map getUserList(String adminGroup) {
         return SessionBean2.getUsers(adminGroup);
    SessonBean2
    @Session(defaultTransaction = Constants.TransactionAttribute.SUPPORTS,
    enableCallByReference = Constants.Bool.TRUE,
    type = Session.SessionType.STATELESS,
    transTimeoutSeconds = "0",
    initialBeansInFreePool = "3",
    maxBeansInFreePool = "20")
    Method
    @RemoteMethod() public Map getUsers(String adminGroup) throws RemoteException {
    return javaUtilClass.getUsers(adminGroup);
    JavaUtilClass
    Method
    public Map getUsers(String adminGroup) throws RemoteException {
         // This is where the work happens, calling the Authentication server to get a complete
         // list of users for an admin group. When the user list is around 1500 entries, this can
         // take an hour. Did I mention this server is very slow? It’s about this threshold of 1500
         // that causes the timeout.
         return Map of users
    First thought, just bump the idle-timeout-seconds setting for the session beans (from the default 600), but that would be a temporary solution until the user list grew larger.
    Second thought, refactor the call to the Authentication Server API to get the user list in blocks of data (say 400 at a time) and decreasing the call/response time between the method getUsers and the API call. This would still occur in the JavaUtilClass, so I am unsure this would make a difference. The session beans would still be idle and subject to timeout, correct?
    Would setting initialBeansInFreePool to 1 in SessionBean1 make any difference?
    Or should I be looking at replicating the re-factored method from the JavaUtilClass in SessionBean1 where the user list is being used so that the API calls come back to it and keep it 'active'?
    Thanks for any advice you could give me on this.

    Hi
    regarding timeouts, there are two ways:
    1.- Changing the settings in the JTA WebLogic domain , called "Timeout Seconds". This will affect globally to all EJB deployed in the domain.
    or
    2.- Specified directly in the bean with a weblogic annotation, like this:
    @TransactionTimeoutSeconds(value = 300)I hope this will help you.
    Regards.
    Felipe

  • Session Id, Unified Session ID and session shadowing

    Hi,
    It looks like we've got a problem with session shadowing in our 2012R2 deployment. Trying to shadow a session from server manager returns an error "the session identification does not specify a valid session", but running a command "Mstsc.exe
    /v:RDS2012 /shadow:2 /noConsentPrompt" and using SessionID opens correct session without a problem. I noticed that there are two different ID's for each session, SessionID and UnifiedSessionID which are different. When I'm trying to shadow a Uinified
    one I'm receiving an error, but with SessionID it opens it. I can see that server manager is using UnifiedSessionID and that's why I can't open a shadowing session with GUI.
    Is there a way to sort it out so we will be able to shadow a session from Server Manager?
    Best,
    Marcin

    Hi,
    It looks like we've got a problem with session shadowing in our 2012R2 deployment. Trying to shadow a session from server manager returns an error "the session identification does not specify a valid session", but running a command "Mstsc.exe
    /v:RDS2012 /shadow:2 /noConsentPrompt" and using SessionID opens correct session without a problem. I noticed that there are two different ID's for each session, SessionID and UnifiedSessionID which are different. When I'm trying to shadow a Uinified
    one I'm receiving an error, but with SessionID it opens it. I can see that server manager is using UnifiedSessionID and that's why I can't open a shadowing session with GUI.
    Is there a way to sort it out so we will be able to shadow a session from Server Manager?
    Best,
    Marcin

  • Upload file with iframe loos session user and session id in wwv_flow_files

    Hello every one, hope someone could help us with this problem.
    What we are trying to do is to upload a file from a jquery dialog in a appex page by redirecting the POST action of the wwvFlowForm to the iframe.
    *1. In the javascript there is the function call to open my modal window with the input*
    function add_fichier_form(numeroProjet,idCat){
         $("#div_upload_fichier").dialog(
                    modal : true ,
                    autoOpen : false ,
                    resizable: false ,
                    width: 700         
           $('#div_upload_fichier').parent().appendTo('#div_base');
          $('#upload_button').unbind('click').click(function(){           
              if ($('#P4010_FILE_FICHIER').val() != '') {
                   $('#upload_iframe_v2').unbind('load').load(function () {
                        $('#upload_status').html(' déplacement du fichier...');
                        // move the file
                        $('#upload_status').html('Fichier transféré avec succès');
                        //file transfer ok
                        //calling the javascript function to add everything in my own table;
                                     //we see the file in the  wwv_flow_file_objects$ without
                         add_fichier_form_db();
                   // set the form target to the iframe, submit, then remove the target
                   $('#wwvFlowForm').attr('target','upload_iframe_v2').submit().removeAttr('target');
                   $('#upload_status').html(' Téléchargement du fichier...');
              }else {
                   alert('Veuillez sélectionner un fichier');
         $("#div_upload_fichier").dialog("option", "title", "Ajout d'un fichier");
            $("#div_upload_fichier").dialog("open");
           }*2. At this point we see the file in the table but without the user and session credential*
    select *
        from wwv_flow_file_objects$
    The result is that the field security_group_id is assign to 0 AND created_by = APEX_PUBLIC_USER
    *3. add_fichier_form_db(); the javascript function making the ajax call to a procedure plsql*
    function add_fichier_form_db(){
             //alert ('Dasn fichier form db');
         vNumeroProjet = document.getElementById('P4010_CAT_NUMERO_PROJET').value;
         vIdCat = document.getElementById('P4010_CAT_ID').value;
         vFichierNom = document.getElementById('P4010_NOM_FICHIER').value;
         vFichierDesc = document.getElementById('P4010_DESC_FICHIER').value;
         vFichierFile = document.getElementById('P4010_FILE_FICHIER_NAME').value;
         var ajaxRequest = new htmldb_Get(null , 300, 'APPLICATION_PROCESS=ADD_FICHIER_FORM_DB', 4010);
         ajaxRequest.add( "P4010_CAT_NUMERO_PROJET", vNumeroProjet);
         ajaxRequest.add( "P4010_F_CAT_ID", vIdCat);
         ajaxRequest.add( "P4010_FICHIER_NOM", vFichierNom);
         ajaxRequest.add( "P4010_FICHIER_DESC", vFichierDesc);
         ajaxRequest.add( "P4010_FILE_FICHIER_NAME", vFichierFile);
          var gReturn = ajaxRequest.get();
         if (gReturn){
              $x("getlistfichier").innerHTML = gReturn;
              closeForm();
         }else{
              alert ('Problèmes dans le call Ajax ADD_REPERTOIRE_FORM_DB \n La valeur retournée est: \n' + gReturn);
    }*4. PLSQL PROCEDURE *
    h1. WHEN the query is executing it's return ORA-01403: no data found. WHY ????
    PROCEDURE P_ADD_FICHIER_FORM_DB(
                P_NUMERO_PROJET number,
                P_CAT_ID number,
                P_FICHIER_NOM varchar2,
                P_FICHIER_DESC varchar2,
                P_FILE_FICHIER_NAME in varchar2)
    AS
      vNumeroProjet number;
      vFichierNom varchar(255);
      vFichierDesc varchar(2000);
      vCatId number;
      vActif number;
      vDocSize number;
      vNomUsager varchar(10);
      vDateCreation date;
      vFichierTypeId number;
      vNomReel varchar2(1000);
      vNomReel2 varchar2(1000);
      vCurVal number;
      BEGIN
        SELECT FILENAME,DOC_SIZE,CREATED_ON
        INTO
        vNomReel,vDocSize,vDateCreation
        FROM WWV_FLOW_FILES
        WHERE FILENAME = P_FILE_FICHIER_NAME;
    /*GET ERROR sqlerrm:ORA-01403: no data found */
      END P_ADD_FICHIER_FORM_DB;h4. hope someone help us soon
    Thanks in advance
    jocelyn

    Finally we find what was wrong so i give you the solution.
    In the javascript on the function add_fichier_form
    We need to append the div of the form to the default form of apex wwvFlowForm
    so the line*
    $('#div_upload_fichier').parent().appendTo('#div_base');
    should be change to*
    $('#div_upload_fichier').parent().appendTo('#wwvFlowForm');Edited by: jocbed on 2012-01-26 11:08

  • Session.removeAttribute and session.invalidate

    I pass a scoped object from one JSP #1 to JSP #2 in a session.
    In JSP #1, I did:
           <c:set var="cr" value="${articleForm.creator}" scope="session"/>In JSP #2, I did:
          <bean:define id="author" name="cr" scope="session" type="java.lang.String"/>
          <html:text property="receiver" value="<%=author%>" size="82" maxlength="25" tabindex="1"/>Immediately after I output the value, I want to remove the object from the session. I have two questions:
    1. which one of the following should I do:
           session.removeAttribute( "cr" );or
           session.removerAttribute( "author" );or
           session.removeAttribute( "receiver" );2. Do I have to invalidate the session; i.e. session.invalidate(); after all the objects in the session are removed?

    I pass a scoped object from one JSP #1 to JSP #2 in a session.
    In JSP #1, I did:
           <c:set var="cr" value="${articleForm.creator}" scope="session"/>In JSP #2, I did:
          <bean:define id="author" name="cr" scope="session" type="java.lang.String"/>      <html:text property="receiver" value="<%=author%>" size="82" maxlength="25" tabindex="1"/>Immediately after I output the value, I want to remove the object from the session. Which one of the following should I do:
           session.removeAttribute( "cr" );or
           session.removerAttribute( "author" );or
           session.removeAttribute( "receiver" );

  • HTTP Session Replication

    Hi!
    I'm trying to setup a cluster between two managed servers located on the same server. The following configuration is about my cluster. I just removed the secutiry element:
    *<?xml version='1.0' encoding='UTF-8'?>*
    *<domain xmlns="http://xmlns.oracle.com/weblogic/domain" xmlns:sec="http://xmlns.oracle.com/weblogic/security" xmlns:wls="http://xmlns.oracle.com/weblogic/security/wls" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.oracle.com/weblogic/security/xacml http://xmlns.oracle.com/weblogic/security/xacml/1.0/xacml.xsd http://xmlns.oracle.com/weblogic/security/providers/passwordvalidator http://xmlns.oracle.com/weblogic/security/providers/passwordvalidator/1.0/passwordvalidator.xsd http://xmlns.oracle.com/weblogic/domain http://xmlns.oracle.com/weblogic/1.0/domain.xsd http://xmlns.oracle.com/weblogic/security http://xmlns.oracle.com/weblogic/1.0/security.xsd http://xmlns.oracle.com/weblogic/security/wls http://xmlns.oracle.com/weblogic/security/wls/1.0/wls.xsd">*
    *<name>caim</name>*
    *<domain-version>10.3.2.0</domain-version>*
    *<server>*
    *<name>AdminServer</name>*
    *<machine></machine>*
    *<listen-address></listen-address>*
    *</server>*
    *<server>*
    *<name>ManagedServer_1</name>*
    *<machine></machine>*
    *<listen-port>7003</listen-port>*
    *<cluster>Cluster_1</cluster>*
    *<listen-address></listen-address>*
    *<server-start>*
    *<arguments>-Djava.endorsed.dirs=C:\endorsed</arguments>*
    *<password-encrypted>{AES}7iyQ50j7+efCMMUTHrSPcELzY9wjcge0W0Gp/HH3j9E=</password-encrypted>*
    *</server-start>*
    *<jta-migratable-target>*
    *<name>ManagedServer_1</name>*
    *<user-preferred-server>ManagedServer_1</user-preferred-server>*
    *<cluster>Cluster_1</cluster>*
    *</jta-migratable-target>*
    *</server>*
    *<server>*
    *<name>ManagedServer_2</name>*
    *<machine></machine>*
    *<listen-port>7004</listen-port>*
    *<cluster>Cluster_1</cluster>*
    *<listen-address></listen-address>*
    *<server-start>*
    *<arguments>-Djava.endorsed.dirs=C:\endorsed</arguments>*
    *<password-encrypted>{AES}PC7yN6hCVA3N6lMn2AyZgJu0pGcv4K5XUDUMmWMNE5Q=</password-encrypted>*
    *</server-start>*
    *<jta-migratable-target>*
    *<name>ManagedServer_2</name>*
    *<user-preferred-server>ManagedServer_2</user-preferred-server>*
    *<cluster>Cluster_1</cluster>*
    *</jta-migratable-target>*
    *</server>*
    *<cluster>*
    *<name>Cluster_1</name>*
    *<cluster-messaging-mode>unicast</cluster-messaging-mode>*
    *</cluster>*
    *<production-mode-enabled>true</production-mode-enabled>*
    *<embedded-ldap>*
    *<name>caim</name>*
    *<credential-encrypted>{AES}BQResE+Zs6gOOTGLqF3T70xcLs3AVw2F7+7sNKLdb2T+QE3cx+zHFlO0RQyBAZy1</credential-encrypted>*
    *</embedded-ldap>*
    *<configuration-version>10.3.2.0</configuration-version>*
    *<app-deployment>*
    *<name>app</name>*
    *<target>ManagedServer_1</target>*
    *<module-type>war</module-type>*
    *<source-path>C:\WebLogic\app</source-path>*
    *<deployment-order>100</deployment-order>*
    *<security-dd-model>DDOnly</security-dd-model>*
    *</app-deployment>*
    *<app-deployment>*
    *<name>app2</name>*
    *<target>ManagedServer_2</target>*
    *<module-type>war</module-type>*
    *<source-path>C:\WebLogic\app2</source-path>*
    *<security-dd-model>DDOnly</security-dd-model>*
    *</app-deployment>*
    *<machine>*
    *<name></name>*
    *<node-manager>*
    *<name></name>*
    *<listen-address></listen-address>*
    *</node-manager>*
    *</machine>*
    *<migratable-target>*
    *<name>ManagedServer_1 (migratable)</name>*
    *<notes>This is a system generated default migratable target for a server. Do not delete manually.</notes>*
    *<user-preferred-server>ManagedServer_1</user-preferred-server>*
    *<cluster>Cluster_1</cluster>*
    *</migratable-target>*
    *<migratable-target>*
    *<name>ManagedServer_2 (migratable)</name>*
    *<notes>This is a system generated default migratable target for a server. Do not delete manually.</notes>*
    *<user-preferred-server>ManagedServer_2</user-preferred-server>*
    *<cluster>Cluster_1</cluster>*
    *</migratable-target>*
    *<admin-server-name>AdminServer</admin-server-name>*
    *</domain>*
    I do not see any log about http session replication and when I stop the managed server that is handling the requests, the application is redirected to the login page, i.e., there's no session replication.
    Need I to do something more than create the cluster and add the managed servers to the cluster?
    Is it possible to enable the logging to the session replication?
    Best Regards,
    A.

    Please refer to : http://jaysensharma.wordpress.com/2009/12/08/session-replication-issues/
    To identify Session Replication requirements ...and Causes...
    Like *"weblogic.xml"* should contain:
    <persistance-type> Tag... Like following:
    <font color=maroon>
    <session-descriptor>
    <persistent-store-type>replicated</persistent-store-type>
    </session-descriptor>
    </font>
    Can you please enable SessionReplication related Debug Flags from AdminConsole....?
    Are you using any kind of Proxy/LoadBalancer in front of your Cluster?
    Have you ever tried changing default HttpSession Cookie Name from "*JSESSIONID"* to something else?
    Thanks
    Jay SenSharma

  • WS7 cluster session replication

    Now that my WS7 cluster is up and running, I'm attempting to deploy a simple JSF webapp that incorporates session replication between the nodes in my cluster.
    I've followed the instructions in the WS7 admin guide to enable session replication, and I've added the following to my sun-web.xml deployment descriptor:
      <session-config>
        <session-manager persistence-type="replicated"/>
      </session-config>The first problem I discovered was that my JSF managed bean was not serializable, so I fixed that. Now, however, when I load the initial page in my app, I am getting an NPE that looks like it is coming from within the WS7 session replication code:
    [23/Dec/2009:08:46:51] warning ( 3692): for host 172.16.2.47 trying to GET /sessionTest/index.jsf while trying to GET /sessionTest/, service-j2ee reports: executePhase(RENDER_RESPONSE 6,com.sun.faces.context.FacesContextImpl@2de69e99) threw exception
    javax.faces.FacesException
            at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:135)
            at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
            at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
            at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
            at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:398)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:277)
            at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:255)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:188)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:586)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:556)
            at com.sun.web.replication.session.SessionLockingStandardPipeline.invoke(SessionLockingStandardPipeline.java:71)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:187)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:586)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:556)
            at com.sun.webserver.connector.nsapi.NSAPIProcessor.service(NSAPIProcessor.java:160)
    Caused by: ClientAbortException:  java.io.IOException: WEB8001: Write failed
            at org.apache.coyote.tomcat5.OutputBuffer.realWriteBytes(OutputBuffer.java:385)
            at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:404)
            at org.apache.coyote.tomcat5.OutputBuffer.doFlush(OutputBuffer.java:334)
            at org.apache.coyote.tomcat5.OutputBuffer.flush(OutputBuffer.java:313)
            at org.apache.coyote.tomcat5.CoyoteResponse.flushBuffer(CoyoteResponse.java:622)
            at com.sun.webserver.connector.nsapi.NSAPIResponse.flushBuffer(NSAPIResponse.java:127)
            at org.apache.coyote.tomcat5.CoyoteResponseFacade.flushBuffer(CoyoteResponseFacade.java:291)
            at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:203)
            at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
            ... 14 more
    Caused by: java.io.IOException: WEB8001: Write failed
            at com.sun.webserver.connector.nsapi.NSAPIResponseStream.doWrite(NSAPIResponseStream.java:61)
            at org.apache.coyote.Response.doWrite(Response.java:575)
            at org.apache.coyote.tomcat5.OutputBuffer.realWriteBytes(OutputBuffer.java:380)
            ... 22 more
    [23/Dec/2009:08:46:51] warning ( 3692): for host 172.16.2.47 trying to GET /sessionTest/index.jsf while trying to GET /sessionTest/, service-j2ee reports: REPL0080: Received exception while reading session from store [{0}]
    java.lang.NullPointerException
            at com.sun.web.replication.session.LWSFPersistentManager.doRead(LWSFPersistentManager.java:162)
            at com.sun.web.replication.session.LWSFValve.invoke(LWSFValve.java:31)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:556)
            at com.sun.web.replication.session.SessionLockingStandardPipeline.invoke(SessionLockingStandardPipeline.java:71)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:187)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:586)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:556)
            at com.sun.webserver.connector.nsapi.NSAPIProcessor.service(NSAPIProcessor.java:160)I thought that perhaps once the session was created, I would stop seeing this error. It isn't exactly the same, but I am still seeing an NPE even after the session has been created:
    [23/Dec/2009:08:47:33] warning ( 3692): for host 172.16.2.47 trying to POST /sessionTest/index.jsf, service-j2ee reports: REPL0080: Received exception while reading session from store [{0}]
    java.lang.NullPointerException
            at com.sun.web.replication.session.LWSFPersistentManager.doRead(LWSFPersistentManager.java:162)
            at com.sun.web.replication.session.LWSFValve.invoke(LWSFValve.java:31)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:556)
            at com.sun.web.replication.session.SessionLockingStandardPipeline.invoke(SessionLockingStandardPipeline.java:71)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:187)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:586)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:556)
            at com.sun.webserver.connector.nsapi.NSAPIProcessor.service(NSAPIProcessor.java:160)Any idea what's going wrong? Is it something I've done?
    I can give you the code for my webapp if you need it.
    Thanks,
    Bill

    1. First try deploying your application without having this parameter, This is need only when you need session replication at web application level not at web server level..
    2. Try with this option as well:
    <sun-web-app>
              <session-config>
    <session-manager persistence-type="replicated">
    </session-manager>
    </session-config>
    </sun-web-app>

  • Session migration and replication

    Hi All,
    I am having a hard time in configuring my application for HTTP session migration. Our weblogic server consists of two managed servers running in same cluster. Each server has an Ehcache that stores some information of user with key as session ID and value as info object. In case, if a server needs restart, we would want to take this updated info Object from cache residing on server being restarted to another managed server within the same cluster.
    I browsed through many documentations online. Most of them explained about session replication but not migration. so I followed replication (I don't want a real time sync up of HTTP session. I want it to migrate if something goes wrong with one of the managed server).
    However, I could not achieve this task after following the steps to configure this feature. I would appreciate a lot if someone can help me figuring out the issue here.
    Here is what I did.
    1) Weblogic.xml
         <session-descriptor>
    <persistent-store-type>replicated_if_clustered</persistent-store-type>
    </session-descriptor>
    2) An implementation class of HttpSessionActivationListener, HttpSessionListener, HttSessionAttributeListener:
    public void sessionDidActivate(HttpSessionEvent sessionEvent) {
    // NEVER GETS CALLED
    over here i would check if session has any attribute with name 'CACHE_ELEMENT'. If yes, then it is a migration case for current managed server
              Log.info(UserCacheMigrationListener.class, "inside sessionDidActivate");//
    public void sessionWillPassivate(HttpSessionEvent sessionEvent) {
    // NEVER GETS CALLED
    Over here I would set attribute 'CACHE_ELEMENT' so that it is available for target managed server when it's sessionDidActivate is called
              Log.info(UserCacheMigrationListener.class, "inside sessionWillPassivate");
    public void sessionCreated(HttpSessionEvent sessionEvent) {
    THIS GETS CALLED! and I set the following attribute
    sessionEvent.getHttpSession().setAttribute(UserCacheMigrationListener.class.getName(), this);
    public void sessionDestroyed(HttpSessionEvent arg0) {
    THIS GETS CALLED!
    public void valueBound(HttpSessionBindingEvent arg0) {
    THIS GETS CALLED! WHICH MEANS THAT I WAS ABLE TO setAttribute this class's instance in sessionCreatedMethod
    In the above code, the setAttribute method used inside the sessionCreated(..) method successfully sets the attribute to this session. This is apparent because valueBound(..) method is called when session is created. But why does it not call the sessionWillActivate method???
    3.) An entry in web.xml for this listener.
         <listener>
              <listener-class>com.xyz.UserCacheMigrationListener</listener-class>
         </listener>
    4) from weblogic config.xml. I am copying all meaning stuffs from config.xml to describe as much as I can.
    <server>
    <name>AdminServer</name>
    <ssl>
    <enabled>false</enabled>
    </ssl>
    <listen-address>localhost</listen-address>
    <network-access-point>
    <name>AdminChannel</name>
    <protocol>t3</protocol>
    <listen-address>localhost</listen-address>
    <http-enabled-for-this-protocol>true</http-enabled-for-this-protocol>
    <tunneling-enabled>false</tunneling-enabled>
    <outbound-enabled>false</outbound-enabled>
    <enabled>true</enabled>
    <two-way-ssl-enabled>false</two-way-ssl-enabled>
    <client-certificate-enforced>false</client-certificate-enforced>
    </network-access-point>
    <data-source>
    <rmi-jdbc-security xsi:nil="true"></rmi-jdbc-security>
    </data-source>
    </server>
    <server>
    <name>Node1</name>
    <ssl>
    <enabled>false</enabled>
    </ssl>
    <machine>DevMachine</machine>
    <listen-port>7002</listen-port>
    <cluster>DevCluster</cluster>
    <replication-group>devGroup1</replication-group>
    <preferred-secondary-group>devGroup2</preferred-secondary-group>
    <web-server>
    <keep-alive-secs>500</keep-alive-secs>
    <post-timeout-secs>120</post-timeout-secs>
    </web-server>
    <listen-address>localhost</listen-address>
    <jta-migratable-target>
    <user-preferred-server>Node1</user-preferred-server>
    <cluster>DevCluster</cluster>
    </jta-migratable-target>
    <data-source>
    <rmi-jdbc-security xsi:nil="true"></rmi-jdbc-security>
    </data-source>
    </server>
    <server>
    <name>Node2</name>
    <ssl>
    <enabled>false</enabled>
    </ssl>
    <machine>DevMachine</machine>
    <listen-port>7003</listen-port>
    <cluster>DevCluster</cluster>
    <replication-group>devGroup2</replication-group>
    <preferred-secondary-group>devGroup1</preferred-secondary-group>
    <listen-address>localhost</listen-address>
    <network-access-point>
    <name>Node2Channel</name>
    <protocol>t3</protocol>
    <listen-address>localhost</listen-address>
    <http-enabled-for-this-protocol>true</http-enabled-for-this-protocol>
    <tunneling-enabled>true</tunneling-enabled>
    <outbound-enabled>false</outbound-enabled>
    <enabled>true</enabled>
    <two-way-ssl-enabled>false</two-way-ssl-enabled>
    <client-certificate-enforced>false</client-certificate-enforced>
    </network-access-point>
    <jta-migratable-target>
    <user-preferred-server>Node2</user-preferred-server>
    <cluster>DevCluster</cluster>
    </jta-migratable-target>
    <data-source>
    <rmi-jdbc-security xsi:nil="true"></rmi-jdbc-security>
    </data-source>
    </server>
    <cluster>
    <name>DevCluster</name>
    <cluster-messaging-mode>unicast</cluster-messaging-mode>
    </cluster>
    <machine>
    <name>DevMachine</name>
    <node-manager>
    <nm-type>Plain</nm-type>
    </node-manager>
    </machine>
    <migratable-target>
    <name>Node1 (migratable)</name>
    <notes>This is a system generated default migratable target for a server. Do not delete manually.</notes>
    <user-preferred-server>Node1</user-preferred-server>
    <cluster>DevCluster</cluster>
    </migratable-target>
    <migratable-target>
    <name>Node2 (migratable)</name>
    <notes>This is a system generated default migratable target for a server. Do not delete manually.</notes>
    <user-preferred-server>Node2</user-preferred-server>
    <cluster>DevCluster</cluster>
    </migratable-target>
    ------------------------------------------------------------------------------------------------------------------

    Hi,
    So you want to migrate your server to server.
    Here are the following links which help you.
    http://docs.oracle.com/cd/E15051_01/wls/docs103/cluster/migration.html
    http://www.oracle.com/technetwork/middleware/weblogic/messaging/wlasm-1853193.pdf
    let me know the status if you need any further help on this issue.
    Regards,
    Kal

  • Call transaction ANd session method very urgent

    Hi,
       When there are 5000 records which method u prefer to use?What was the reason to choose perticular method?
    Regards
    sai

    Use the CALL TRANSACTION USING statement
    Summary: With CALL TRANSACTION USING, the system processes the data more quickly than with batch input sessions. Unlike batch input sessions, CALL TRANSACTION USING does not automatically support interactive correction or logging functions.
    Your program prepares the data and then calls the corresponding transaction that is then processed immediately.
    The most important features of CALL TRANSACTION USING are:
    Synchronous processing
    Transfer of data from an individual transaction each time the statement CALL TRANSACTION USING is called
    You can update the database both synchronously and asynchronously
    The program specifies the update type
    Separate LUW (logical units of work) for the transaction
    The system executes a database commit immediately before and after the CALL TRANSACTION USING statement
    No batch input processing log
    Create a session on the batch input queue.
    Summary: Offers management of sessions, support for playing back and correcting sessions that contain errors, and detailed logging.
    Your program prepares the data and stores it in a batch input session. A session is a collection of transaction data for one or more transactions. Batch input sessions are maintained by the system in the batch input queue. You can process batch input sessions in the background processing system.
    Your program must open a session in the queue before transferring data to it, and must close it again afterwards. All of these operations are performed by making function module calls from the ABAP program.
    The most important aspects of the session interface are:
    Asynchronous processing
    Transfers data for multiple transactions
    Synchronous database update
    During processing, no transaction is started until the previous transaction has been written to the database.
    A batch input processing log is generated for each session
    Sessions cannot be generated in parallel
    The batch input program must not open a session until it has closed the preceding session.

  • Call transaction and session method -urgent

    Hi,
       can anybody tell me the diffence between call transaction and session method .
    what are the advantage of each method and when we go for it.
    how to see log file in session method.
    i will really appricitate

    hi,
    check this code,
    REPORT ZTEST_ABCD NO STANDARD PAGE HEADING LINE-SIZE 255.
    *REPORT zabzon_bdc
          NO STANDARD PAGE HEADING LINE-SIZE 255.
    TYPES: BEGIN OF record,
          xbanl LIKE raifp3-xbanl,
           anln1 LIKE raifp2-anln1,
           anln2 LIKE raifp2-anln2,
           anbtr TYPE string,
           bldat TYPE string,
           budat TYPE string,
           bzdat TYPE string,
           sgtxt LIKE raifp2-sgtxt,
           monat LIKE raifp2-monat,
           blart LIKE raifp1-blart,
           gkont LIKE raifp2-gkont,
           bwasl LIKE raifp1-bwasl,
           xblnr LIKE raifp1-xblnr,
       END OF record.
    TYPES :BEGIN OF x_messages,
           index TYPE i,
           msgtyp(1),
           message(120),
           END OF x_messages.
    DATA: it_record TYPE STANDARD TABLE OF record,
          wa_record TYPE record.
    DATA : it_messages  TYPE STANDARD TABLE OF x_messages,
           wa_messages TYPE x_messages.
    DATA : it_bdcmsg TYPE STANDARD TABLE OF bdcmsgcoll,
           wa_bdcmsg TYPE bdcmsgcoll.
    DATA : bdcdata TYPE STANDARD TABLE OF bdcdata,
           wa_bdcdata TYPE bdcdata.
    DATA : it_excel TYPE STANDARD TABLE OF alsmex_tabline,
           wa_excel TYPE alsmex_tabline.
    DATA : fname TYPE string.
    DATA :l_index LIKE sy-tabix.
    data : str type string.
    *Selection screen.
    SELECTION-SCREEN : BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    PARAMETERS : p_file1 TYPE rlgrap-filename OBLIGATORY.
    SELECTION-SCREEN : END OF BLOCK b1.
    *Selction-Screen F4 Help
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file1.
      CALL FUNCTION 'F4_FILENAME'
           EXPORTING
                field_name = 'p_file1'
           IMPORTING
                file_name  = p_file1.
    *START-OF-SELECTION.
    START-OF-SELECTION.
      PERFORM process_f1data.
      PERFORM execute_bdc.
           Start new screen                                              *
    FORM bdc_dynpro USING program dynpro.
      CLEAR wa_bdcdata.
      wa_bdcdata-program  = program.
      wa_bdcdata-dynpro   = dynpro.
      wa_bdcdata-dynbegin = 'X'.
      APPEND wa_bdcdata TO bdcdata.
      CLEAR wa_bdcdata.
    ENDFORM.                    "BDC_DYNPRO
           Insert field                                                  *
    FORM bdc_field USING fnam fval .
      CLEAR wa_bdcdata.
      wa_bdcdata-fnam = fnam.
      wa_bdcdata-fval = fval.
      APPEND wa_bdcdata TO bdcdata.
      CLEAR wa_bdcdata.
    ENDFORM.                    "BDC_FIELD
    *&      Form  process_f1data
          text
    -->  p1        text
    <--  p2        text
    FORM process_f1data.
      REFRESH it_excel.
      CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
           EXPORTING
                filename    = p_file1
                i_begin_col = 1
                i_begin_row = 1
                i_end_col   = 99
                i_end_row   = 1000
           TABLES
                intern      = it_excel.
      LOOP AT it_excel INTO wa_excel.
        CASE wa_excel-col .
         WHEN '1' .
           wa_record-xbanl = wa_excel-value.
          WHEN '1' .
            wa_record-anln1 = wa_excel-value.
          WHEN '2'.
            wa_record-anln2 = wa_excel-value.
          WHEN '3'.
            wa_record-anbtr = wa_excel-value.
          WHEN '4'.
            wa_record-bldat = wa_excel-value.
          WHEN '5'.
            wa_record-budat = wa_excel-value.
          WHEN '6'.
            wa_record-bzdat = wa_excel-value.
          WHEN '7'.
            wa_record-sgtxt = wa_excel-value.
          WHEN '8'.
            wa_record-monat = wa_excel-value.
          WHEN '9'.
            wa_record-blart = wa_excel-value.
          WHEN '10'.
            wa_record-gkont = wa_excel-value.
          WHEN '11'.
            wa_record-bwasl = wa_excel-value.
          WHEN '12'.
            wa_record-xblnr = wa_excel-value.
        ENDCASE.
        AT END OF row.
          CONDENSE : wa_record-anln1,wa_record-anln2,
                     wa_record-anbtr,wa_record-bldat,wa_record-budat,
                     wa_record-bzdat,wa_record-sgtxt,wa_record-monat,
                     wa_record-blart,wa_record-gkont,wa_record-bwasl,
                     wa_record-xblnr.
          APPEND  wa_record TO it_record.
          CLEAR  wa_record.
        ENDAT.
      ENDLOOP.
    ENDFORM.                    " process_f1data
    *&      Form  execute_bdc
          text
    -->  p1        text
    <--  p2        text
    FORM execute_bdc.
      LOOP AT it_record INTO wa_record.
        PERFORM bdc_dynpro      USING 'SAPLAMDP' '0100'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=NEWA'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'RAIFP3-XBANL'.
        PERFORM bdc_field       USING 'RAIFP3-XBANL'
                                      'X'.
       PERFORM bdc_field       USING 'RAIFP2-ANLN1'
                                     '3100309'.
       PERFORM bdc_field       USING 'RAIFP2-ANLN2'
                                     '0'.
       PERFORM bdc_field       USING 'RAIFP1-BUDAT'
                                     '22.05.2008'.
        PERFORM bdc_dynpro      USING 'SAPLAMDP' '0100'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'RAIFP2-ANLN1'.
       PERFORM bdc_field       USING 'RAIFP3-XBANL'
                                     'X'.
        PERFORM bdc_field       USING 'RAIFP2-ANLN1'
                                      wa_record-anln1.    "'3100309'.
       PERFORM bdc_field       USING 'RAIFP2-ANLN2'
                                     '0'.
       PERFORM bdc_field       USING 'RAIFP1-BUDAT'
                                     '22.05.2008'.
        PERFORM bdc_dynpro      USING 'SAPLAMDP' '0100'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'RAIFP2-ANLN2'.
       PERFORM bdc_field       USING 'RAIFP3-XBANL'
                                     'X'.
       PERFORM bdc_field       USING 'RAIFP2-ANLN1'
                                     '3100309'.
        PERFORM bdc_field       USING 'RAIFP2-ANLN2'
                                      wa_record-anln2.   "'0'.
       PERFORM bdc_field       USING 'RAIFP1-BUDAT'
                                     '22.05.2008'.
        PERFORM bdc_dynpro      USING 'SAPLAMDP' '0100'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '/00'.
       PERFORM bdc_field       USING 'RAIFP3-XBANL'
                                     'X'.
       PERFORM bdc_field       USING 'RAIFP2-ANLN1'
                                     '3100309'.
       PERFORM bdc_field       USING 'RAIFP2-ANLN2'
                                     '0'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'RAIFP2-ANBTR'.
       str = wa_record-anbtr.
        PERFORM bdc_field       USING 'RAIFP2-ANBTR'
                                      wa_record-anbtr.       "'45000'.
       PERFORM bdc_field       USING 'RAIFP1-BUDAT'
                                     '22.05.2008'.
        PERFORM bdc_dynpro      USING 'SAPLAMDP' '0100'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '/00'.
       PERFORM bdc_field       USING 'RAIFP3-XBANL'
                                     'X'.
       PERFORM bdc_field       USING 'RAIFP2-ANLN1'
                                     '3100309'.
       PERFORM bdc_field       USING 'RAIFP2-ANLN2'
                                     '0'.
       PERFORM bdc_field       USING 'RAIFP2-ANBTR'
                                     '45,000.00'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'RAIFP1-BLDAT'.
        PERFORM bdc_field       USING 'RAIFP1-BLDAT'
                                      wa_record-bldat.        "'01.04.2008'.
       PERFORM bdc_field       USING 'RAIFP1-BUDAT'
                                     '22.05.2008'.
        PERFORM bdc_dynpro      USING 'SAPLAMDP' '0100'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '/00'.
       PERFORM bdc_field       USING 'RAIFP3-XBANL'
                                     'X'.
       PERFORM bdc_field       USING 'RAIFP2-ANLN1'
                                     '3100309'.
       PERFORM bdc_field       USING 'RAIFP2-ANLN2'
                                     '0'.
       PERFORM bdc_field       USING 'RAIFP2-ANBTR'
                                     '45,000.00'.
       PERFORM bdc_field       USING 'RAIFP1-BLDAT'
                                     '01.04.2008'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'RAIFP1-BUDAT'.
        PERFORM bdc_field       USING 'RAIFP1-BUDAT'
                                      wa_record-budat.    "'01.04.2008'.
        PERFORM bdc_dynpro      USING 'SAPLAMDP' '0100'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '/00'.
       PERFORM bdc_field       USING 'RAIFP3-XBANL'
                                     'X'.
       PERFORM bdc_field       USING 'RAIFP2-ANLN1'
                                     '3100309'.
       PERFORM bdc_field       USING 'RAIFP2-ANLN2'
                                     '0'.
       PERFORM bdc_field       USING 'RAIFP2-ANBTR'
                                     '45,000.00'.
       PERFORM bdc_field       USING 'RAIFP1-BLDAT'
                                     '01.04.2008'.
       PERFORM bdc_field       USING 'RAIFP1-BUDAT'
                                     '01.04.2008'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'RAIFP1-BZDAT'.
        PERFORM bdc_field       USING 'RAIFP1-BZDAT'
                                      wa_record-bzdat.   "'01.04.2008'.
        PERFORM bdc_dynpro      USING 'SAPLAMDP' '0100'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '/00'.
       PERFORM bdc_field       USING 'RAIFP3-XBANL'
                                     'X'.
       PERFORM bdc_field       USING 'RAIFP2-ANLN1'
                                     '3100309'.
       PERFORM bdc_field       USING 'RAIFP2-ANLN2'
                                     '0'.
       PERFORM bdc_field       USING 'RAIFP2-ANBTR'
                                     '45,000.00'.
       PERFORM bdc_field       USING 'RAIFP1-BLDAT'
                                     '01.04.2008'.
       PERFORM bdc_field       USING 'RAIFP1-BUDAT'
                                     '01.04.2008'.
       PERFORM bdc_field       USING 'RAIFP1-BZDAT'
                                     '01.04.2008'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'RAIFP2-SGTXT'.
        PERFORM bdc_field       USING 'RAIFP2-SGTXT'
                                      wa_record-sgtxt.      "'test01'.
        PERFORM bdc_dynpro      USING 'SAPLAMDP' '0100'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=TAB02'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'RAIFP2-ANLN1'.
       PERFORM bdc_field       USING 'RAIFP3-XBANL'
                                     'X'.
       PERFORM bdc_field       USING 'RAIFP2-ANLN1'
                                     '3100309'.
       PERFORM bdc_field       USING 'RAIFP2-ANLN2'
                                     '0'.
       PERFORM bdc_field       USING 'RAIFP2-ANBTR'
                                     '45,000.00'.
       PERFORM bdc_field       USING 'RAIFP1-BLDAT'
                                     '01.04.2008'.
       PERFORM bdc_field       USING 'RAIFP1-BUDAT'
                                     '01.04.2008'.
       PERFORM bdc_field       USING 'RAIFP1-BZDAT'
                                     '01.04.2008'.
       PERFORM bdc_field       USING 'RAIFP2-SGTXT'
                                     'test01'.
        PERFORM bdc_dynpro      USING 'SAPLAMDP' '0100'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '/00'.
       PERFORM bdc_field       USING 'RAIFP3-XBANL'
                                     'X'.
       PERFORM bdc_field       USING 'RAIFP2-ANLN1'
                                     '3100309'.
       PERFORM bdc_field       USING 'RAIFP2-ANLN2'
                                     '0'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'RAIFP2-MONAT'.
        PERFORM bdc_field       USING 'RAIFP2-MONAT'
                                      wa_record-monat.     "'01'.
       PERFORM bdc_field       USING 'RAIFP1-BLART'
                                     'AA'.
        PERFORM bdc_dynpro      USING 'SAPLAMDP' '0100'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '/00'.
       PERFORM bdc_field       USING 'RAIFP3-XBANL'
                                     'X'.
       PERFORM bdc_field       USING 'RAIFP2-ANLN1'
                                     '3100309'.
       PERFORM bdc_field       USING 'RAIFP2-ANLN2'
                                     '0'.
       PERFORM bdc_field       USING 'RAIFP2-MONAT'
                                     '1'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'RAIFP1-BLART'.
        PERFORM bdc_field       USING 'RAIFP1-BLART'
                                      wa_record-blart.    " 'AA'.
       PERFORM bdc_dynpro      USING 'SAPLAMDP' '0100'.
       PERFORM bdc_field       USING 'BDC_OKCODE'
                                     '/00'.
       PERFORM bdc_field       USING 'RAIFP3-XBANL'
                                     'X'.
       PERFORM bdc_field       USING 'RAIFP2-ANLN1'
                                     '3100309'.
       PERFORM bdc_field       USING 'RAIFP2-ANLN2'
                                     '0'.
       PERFORM bdc_field       USING 'RAIFP2-MONAT'
                                     '1'.
       PERFORM bdc_field       USING 'RAIFP1-BLART'
                                     'AA'.
       PERFORM bdc_field       USING 'BDC_CURSOR'
                                     'RAIFP2-GKONT'.
        PERFORM bdc_dynpro      USING 'SAPLAMDP' '0100'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '/00'.
       PERFORM bdc_field       USING 'RAIFP3-XBANL'
                                     'X'.
       PERFORM bdc_field       USING 'RAIFP2-ANLN1'
                                     '3100309'.
       PERFORM bdc_field       USING 'RAIFP2-ANLN2'
                                     '0'.
       PERFORM bdc_field       USING 'RAIFP2-MONAT'
                                     '1'.
       PERFORM bdc_field       USING 'RAIFP1-BLART'
                                     'AA'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'RAIFP2-GKONT'.
        PERFORM bdc_field       USING 'RAIFP2-GKONT'
                                      wa_record-gkont.   "'1600'.
        PERFORM bdc_dynpro      USING 'SAPLAMDP' '0100'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '/00'.
       PERFORM bdc_field       USING 'RAIFP3-XBANL'
                                     'X'.
       PERFORM bdc_field       USING 'RAIFP2-ANLN1'
                                     '3100309'.
       PERFORM bdc_field       USING 'RAIFP2-ANLN2'
                                     '0'.
       PERFORM bdc_field       USING 'RAIFP2-MONAT'
                                     '1'.
       PERFORM bdc_field       USING 'RAIFP1-BLART'
                                     'AA'.
       PERFORM bdc_field       USING 'RAIFP2-GKONT'
                                     '1600'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'RAIFP1-BWASL'.
        PERFORM bdc_field       USING 'RAIFP1-BWASL'
                                      wa_record-bwasl.      "'100'.
        PERFORM bdc_dynpro      USING 'SAPLAMDP' '0100'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '/00'.
       PERFORM bdc_field       USING 'RAIFP3-XBANL'
                                     'X'.
       PERFORM bdc_field       USING 'RAIFP2-ANLN1'
                                     '3100309'.
       PERFORM bdc_field       USING 'RAIFP2-ANLN2'
                                     '0'.
       PERFORM bdc_field       USING 'RAIFP2-MONAT'
                                     '1'.
       PERFORM bdc_field       USING 'RAIFP1-BLART'
                                     'AA'.
       PERFORM bdc_field       USING 'RAIFP2-GKONT'
                                     '1600'.
       PERFORM bdc_field       USING 'RAIFP1-BWASL'
                                     '100'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'RAIFP1-XBLNR'.
        PERFORM bdc_field       USING 'RAIFP1-XBLNR'
                                      wa_record-xblnr.   "'TEST01'.
        PERFORM bdc_dynpro      USING 'SAPLAMDP' '0100'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=SAVE'.
       PERFORM bdc_field       USING 'BDC_CURSOR'
                                     'RAIFP2-ANLN1'.
       PERFORM bdc_field       USING 'RAIFP3-XBANL'
                                     'X'.
       PERFORM bdc_field       USING 'RAIFP2-ANLN1'
                                     '3100309'.
       PERFORM bdc_field       USING 'RAIFP2-ANLN2'
                                     '0'.
       PERFORM bdc_field       USING 'RAIFP2-MONAT'
                                     '1'.
       PERFORM bdc_field       USING 'RAIFP1-BLART'
                                     'AA'.
       PERFORM bdc_field       USING 'RAIFP2-GKONT'
                                     '1600'.
       PERFORM bdc_field       USING 'RAIFP1-BWASL'
                                     '100'.
       PERFORM bdc_field       USING 'RAIFP1-XBLNR'
                                     'TEST01'.
       PERFORM bdc_dynpro      USING 'SAPLAMDP' '0100'.
       PERFORM bdc_field       USING 'BDC_OKCODE'
                                     '=SHWD'.
       PERFORM bdc_field       USING 'BDC_OKCODE'
                                     '=SAVE'.
        CALL TRANSACTION 'ABZON' USING bdcdata
                                            MODE 'A'
                                            MESSAGES INTO it_bdcmsg.
        PERFORM collect_bdc_messages.
      ENDLOOP.
    ENDFORM.                    " execute_bdc
    *&      Form  collect_bdc_messages
          text
    -->  p1        text
    <--  p2        text
    FORM collect_bdc_messages.
      DATA: l_msg(100).
      LOOP AT it_bdcmsg INTO wa_bdcmsg.
        CALL FUNCTION 'FORMAT_MESSAGE'
             EXPORTING
                  id        = wa_bdcmsg-msgid
                  lang      = wa_bdcmsg-msgspra
                  no        = wa_bdcmsg-msgnr
                  v1        = wa_bdcmsg-msgv1
                  v2        = wa_bdcmsg-msgv2
             IMPORTING
                  msg       = l_msg
             EXCEPTIONS
                  not_found = 1
                  OTHERS    = 2.
        IF sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                  WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
        CONDENSE l_msg.
        CLEAR wa_bdcmsg.
        wa_messages-index = l_index.
        wa_messages-msgtyp = wa_bdcmsg-msgtyp.
        wa_messages-message = l_msg.
        APPEND wa_messages TO it_messages.
        WRITE:/  wa_messages-message.
      ENDLOOP.
      l_index = l_index + 1.
      REFRESH it_bdcmsg.
    ENDFORM.                    " collect_bdc_messages
    regards
    siva

  • Unstable session replication in a HA cluster (CF10)

    Hi,
    We have tried to create a HA cluster with requests being distributed round robin to N instances of coldfusion, we are NOT using sticky sessions as we are replication session state to all cf instances. What we are seing is that all is fine with low to moderate load, however under heavy load and at random times the replication fails and leads to things in session scope not working. This manifests in users not being able to login to our application (we store a token in session scope to store logged in status).
    Again key point, under low to moderate load it all works fine, users are directed to random nodes in the cluster and their session is picked up fine as the session is distributed to all nodes,so pretty confident config is right.
    Linux servers using CF10 with update 12 applied. Also running is fusion reactor 5.04 on all instances. Each instance has a 64GB heap, Java 7.0.15 (latest certified).
    Firstly apache setup.
    workers.properties
    worker.list=balancer, jkstatus
    worker.jkstatus.type=status
    worker.balancer.type=lb
    worker.balancer.balance_workers=cfusion_master,cfusion_slave2,cfusion_slave1
    worker.balancer.method=R
    worker.balancer.sticky_session=False
    worker.balancer.ping_mode=A
    worker.cfusion_master.type=ajp13
    worker.cfusion_master.host=localhost
    worker.cfusion_master.port=8012
    worker.cfusion_master.max_reuse_connections=250
    worker.cfusion_master.lbfactor=100
    worker.cfusion_slave2.reference=worker.cfusion_master
    worker.cfusion_slave2.port=8014
    worker.cfusion_slave1.reference=worker.cfusion_master
    worker.cfusion_slave1.port=8013
    Now the server.xml from 2 nodes (as an example if I run a 2 node cluster)
    One of the configs from a server in the cluster
    <Server port="8007" shutdown="SHUTDOWN">
      <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on">
      </Listener>
      <Listener className="org.apache.catalina.core.JasperListener">
      </Listener>
      <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener">
      </Listener>
      <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener">
      </Listener>
      <GlobalNamingResources>
        <Resource description="User database that can be updated and saved" name="UserDatabase" pathname="conf/tomcat-users.xml" factory="org.apache.catalina.users.MemoryUserDatabaseFactory" type="org.apache.catalina.UserDatabase" auth="Container">
        </Resource>
      </GlobalNamingResources>
      <Service name="Catalina">
        <Executor name="tomcatThreadPool" minSpareThreads="4" maxThreads="150" namePrefix="catalina-exec-">
        </Executor>
        <Connector port="8012" protocol="AJP/1.3" connectionTimeout="600000" redirectPort="8445" tomcatAuthentication="false">
        </Connector>
        <Engine jvmRoute="cfusion" name="Catalina" defaultHost="localhost">
          <Realm className="org.apache.catalina.realm.LockOutRealm">
            <Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase">
            </Realm>
          </Realm>
          <Host name="localhost" autoDeploy="false" unpackWARs="true" appBase="webapps">
            <Valve pattern="%h %l %u %t &quot;%r&quot; %s %b" directory="logs" prefix="localhost_access_log." className="org.apache.catalina.valves.AccessLogValve" suffix=".txt" resolveHosts="false">
            </Valve>
          </Host>
          <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster" channelSendOptions="8">
            <Manager notifyListenersOnReplication="true" expireSessionsOnShutdown="false" className="org.apache.catalina.ha.session.DeltaManager">
            </Manager>
            <Channel className="org.apache.catalina.tribes.group.GroupChannel">
              <Membership port="45564" dropTime="3000" address="228.0.0.4" className="org.apache.catalina.tribes.membership.McastService" frequency="500">
              </Membership>
              <Receiver port="4001" autoBind="100" address="auto" selectorTimeout="5000" maxThreads="6" className="org.apache.catalina.tribes.transport.nio.NioReceiver">
              </Receiver>
              <Sender className="org.apache.catalina.tribes.transport.ReplicationTransmitter">
                <Transport className="org.apache.catalina.tribes.transport.nio.PooledParallelSender">
                </Transport>
              </Sender>
              <Interceptor className="org.apache.catalina.tribes.group.interceptors.TcpFailureDetector">
              </Interceptor>
              <Interceptor className="org.apache.catalina.tribes.group.interceptors.MessageDispatch15Interceptor">
              </Interceptor>
            </Channel>
            <Valve className="org.apache.catalina.ha.tcp.ReplicationValve" filter="">
            </Valve>
            <Valve className="org.apache.catalina.ha.session.JvmRouteBinderValve">
            </Valve>
            <ClusterListener className="org.apache.catalina.ha.session.JvmRouteSessionIDBinderListener">
            </ClusterListener>
            <ClusterListener className="org.apache.catalina.ha.session.ClusterSessionListener">
            </ClusterListener>
          </Cluster>
        </Engine>
        <Connector port="8499" protocol="org.apache.coyote.http11.Http11NioProtocol" connectionTimeout="20000" redirectPort="8443" executor="tomcatThreadPool">
        </Connector>
      </Service>
    </Server>
    Config from one of the other nodes
    <Server port="8008" shutdown="SHUTDOWN">
      <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on">
      </Listener>
      <Listener className="org.apache.catalina.core.JasperListener">
      </Listener>
      <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener">
      </Listener>
      <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener">
      </Listener>
      <GlobalNamingResources>
        <Resource description="User database that can be updated and saved" name="UserDatabase" pathname="conf/tomcat-users.xml" factory="org.apache.catalina.users.MemoryUserDatabaseFactory" type="org.apache.catalina.UserDatabase" auth="Container">
        </Resource>
      </GlobalNamingResources>
      <Service name="Catalina">
        <Executor name="tomcatThreadPool" minSpareThreads="4" maxThreads="150" namePrefix="catalina-exec-">
        </Executor>
        <Connector port="8013" protocol="AJP/1.3" connectionTimeout="600000" redirectPort="8446" tomcatAuthentication="false">
        </Connector>
        <Engine jvmRoute="cfusion" name="Catalina" defaultHost="localhost">
          <Realm className="org.apache.catalina.realm.LockOutRealm">
            <Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase">
            </Realm>
          </Realm>
          <Host name="localhost" autoDeploy="false" unpackWARs="true" appBase="webapps">
            <Valve pattern="%h %l %u %t &quot;%r&quot; %s %b" directory="logs" prefix="localhost_access_log." className="org.apache.catalina.valves.AccessLogValve" suffix=".txt" resolveHosts="false">
            </Valve>
          </Host>
          <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster" channelSendOptions="8">
            <Manager notifyListenersOnReplication="true" expireSessionsOnShutdown="false" className="org.apache.catalina.ha.session.DeltaManager">
            </Manager>
            <Channel className="org.apache.catalina.tribes.group.GroupChannel">
              <Membership port="45564" dropTime="3000" address="228.0.0.4" className="org.apache.catalina.tribes.membership.McastService" frequency="500">
              </Membership>
              <Receiver port="4002" autoBind="100" address="auto" selectorTimeout="5000" maxThreads="6" className="org.apache.catalina.tribes.transport.nio.NioReceiver">
              </Receiver>
              <Sender className="org.apache.catalina.tribes.transport.ReplicationTransmitter">
                <Transport className="org.apache.catalina.tribes.transport.nio.PooledParallelSender">
                </Transport>
              </Sender>
              <Interceptor className="org.apache.catalina.tribes.group.interceptors.TcpFailureDetector">
              </Interceptor>
              <Interceptor className="org.apache.catalina.tribes.group.interceptors.MessageDispatch15Interceptor">
              </Interceptor>
            </Channel>
            <Valve className="org.apache.catalina.ha.tcp.ReplicationValve" filter="">
            </Valve>
            <Valve className="org.apache.catalina.ha.session.JvmRouteBinderValve">
            </Valve>
            <ClusterListener className="org.apache.catalina.ha.session.JvmRouteSessionIDBinderListener">
            </ClusterListener>
            <ClusterListener className="org.apache.catalina.ha.session.ClusterSessionListener">
            </ClusterListener>
          </Cluster>
        </Engine>
        <Connector port="8500" protocol="org.apache.coyote.http11.Http11NioProtocol" connectionTimeout="20000" redirectPort="8443" executor="tomcatThreadPool">
        </Connector>
      </Service>
    </Server>
    So what do i see in the logs?. Well sometimes I see exceptions like this
    Mar 05, 2014 9:55:19 PM org.apache.catalina.ha.session.DeltaManager messageReceived
    SEVERE: Manager [localhost#/]: Unable to receive message through TCP channel
    java.lang.IllegalStateException: removeAttribute: Session already invalidated
              at org.apache.catalina.ha.session.DeltaSession.removeAttribute(DeltaSession.java:617)
              at org.apache.catalina.ha.session.DeltaRequest.execute(DeltaRequest.java:171)
              at org.apache.catalina.ha.session.DeltaManager.handleSESSION_DELTA(DeltaManager.java:1347)
              at org.apache.catalina.ha.session.DeltaManager.messageReceived(DeltaManager.java:1293)
              at org.apache.catalina.ha.session.DeltaManager.messageDataReceived(DeltaManager.java:1014)
              at org.apache.catalina.ha.session.ClusterSessionListener.messageReceived(ClusterSessionListe ner.java:92)
              at org.apache.catalina.ha.tcp.SimpleTcpCluster.messageReceived(SimpleTcpCluster.java:897)
              at org.apache.catalina.ha.tcp.SimpleTcpCluster.messageReceived(SimpleTcpCluster.java:878)
              at org.apache.catalina.tribes.group.GroupChannel.messageReceived(GroupChannel.java:278)
              at org.apache.catalina.tribes.group.ChannelInterceptorBase.messageReceived(ChannelIntercepto rBase.java:84)
              at org.apache.catalina.tribes.group.interceptors.TcpFailureDetector.messageReceived(TcpFailu reDetector.java:113)
              at org.apache.catalina.tribes.group.ChannelInterceptorBase.messageReceived(ChannelIntercepto rBase.java:84)
              at org.apache.catalina.tribes.group.ChannelInterceptorBase.messageReceived(ChannelIntercepto rBase.java:84)
              at org.apache.catalina.tribes.group.ChannelCoordinator.messageReceived(ChannelCoordinator.ja va:253)
              at org.apache.catalina.tribes.transport.ReceiverBase.messageDataReceived(ReceiverBase.java:2 87)
              at org.apache.catalina.tribes.transport.nio.NioReplicationTask.drainChannel(NioReplicationTa sk.java:212)
              at org.apache.catalina.tribes.transport.nio.NioReplicationTask.run(NioReplicationTask.java:1 01)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
              at java.lang.Thread.run(Thread.java:722)
    I'm unsure why this happens as tribes uses certified mesaging so it should have resent right?, in any case I believe I can change it so messages are not sent asynchronously, should sort this out.
    I see (good) messages like this
    Mar 05, 2014 9:42:19 PM org.apache.catalina.ha.session.DeltaManager startInternal
    INFO: Register manager localhost#/ to cluster element Engine with name Catalina
    Mar 05, 2014 9:42:19 PM org.apache.catalina.ha.session.DeltaManager startInternal
    INFO: Starting clustering manager at localhost#/
    Mar 05, 2014 9:42:19 PM org.apache.catalina.ha.session.DeltaManager getAllClusterSessions
    INFO: Manager [localhost#/], requesting session state from org.apache.catalina.tribes.membership.MemberImpl[tcp://{192, 168, 128, 50}:4001,{192, 168, 128, 50},4001, alive=68824148, securePort=-1, UDP Port=-1, id={123 126 89 39 96 -59 69 8 -113 79 51 122 25 108 -11 -110 }, payload={}, command={}, domain={}, ]. This operation will timeout if no session state has been received within 60 seconds.
    Mar 05, 2014 9:42:20 PM org.apache.catalina.ha.session.DeltaManager waitForSendAllSessions
    INFO: Manager [localhost#/]; session state send at 3/5/14 9:42 PM received in 929 ms.
    Mar 05, 2014 9:42:20 PM org.apache.catalina.ha.session.JvmRouteBinderValve startInternal
    INFO: JvmRouteBinderValve started
    So session state dies appear to be flying around the cluster, I do nightly restarts of some of the nodes due to another issue I have with an ever growing heap (separate issue), interestingly I also see nodes leave and join the cluster, again this is good (shows the multicast is working, and also that replication should be working).
    Mar 05, 2014 2:30:16 AM org.apache.catalina.tribes.group.interceptors.TcpFailureDetector memberDisappeared
    INFO: Verification complete. Member disappeared[org.apache.catalina.tribes.membership.MemberImpl[tcp://{192, 168, 128, 50}:4001,{192, 168, 128, 50},4001, alive=18629101, securePort=-1, UDP Port=-1, id={-2 65 10 -79 53 -75 76 52 -99 63 -90 -120 34 -89 -14 100 }, payload={}, command={66 65 66 89 45 65 76 69 88 ...(9)}, domain={}, ]]
    Mar 05, 2014 2:30:16 AM org.apache.catalina.ha.tcp.SimpleTcpCluster memberDisappeared
    INFO: Received member disappeared:org.apache.catalina.tribes.membership.MemberImpl[tcp://{192, 168, 128, 50}:4001,{192, 168, 128, 50},4001, alive=18629101, securePort=-1, UDP Port=-1, id={-2 65 10 -79 53 -75 76 52 -99 63 -90 -120 34 -89 -14 100 }, payload={}, command={66 65 66 89 45 65 76 69 88 ...(9)}, domain={}, ]
    Mar 05, 2014 2:35:16 AM org.apache.catalina.ha.tcp.SimpleTcpCluster memberAdded
    INFO: Replication member added:org.apache.catalina.tribes.membership.MemberImpl[tcp://{192, 168, 128, 50}:4001,{192, 168, 128, 50},4001, alive=1083, securePort=-1, UDP Port=-1, id={123 126 89 39 96 -59 69 8 -113 79 51 122 25 108 -11 -110 }, payload={}, command={}, domain={}, ]
    So stuck now on how to proceed, to establish why at random times the replication fails, leading to cluster collapse. Could it be the size of the session?, I have a few CFCs stuffed into session scope, but perhaps when the load is high there is too many?. Things fail even with a cluster of 2 on one server, initially I had a 8 node cluster on 2 separate machines but when it failed it rolled it back to a cluster of 2 instances on the one server to see if that was stable (its not 100% which is what I need).
    Any advice, points gratefully received.

    So Lynux, that’s an interesting sounding solution. Would be great if it made some difference for Guitsboy. We’ll see. I notice that you say you’ve not yet tried it, though, and fair enough. Thanks for offering it.
    But I’m curious: did you ever resolve your original problem? And if not, hopefully you saw the note I just wrote to Guitsboy, asking him something that may well interest you if you still have your problem. On rereading this thread, from back in April, I’ve also had some new thoughts come to mind which I’ll share, if it may help either of you, or others with this seeming same issue.
    To remind readers who may not want to review the whole thread, you had said originally that “all is fine with low to moderate load, however under heavy load and at random times the replication fails“, and that this failure “manifests in users not being able to login to our application (we store a token in session scope to store logged in status)”.  Then it seems you may have concluded that things were down to the error you were seeing in the logs:
    Mar 05, 2014 9:55:19 PM org.apache.catalina.ha.session.DeltaManager messageReceived
    SEVERE: Manager : Unable to receive message through TCP channel
    java.lang.IllegalStateException: removeAttribute: Session already invalidated
    And now guitsboy reports seeing the same error.
    But here’s the thing that came to mind for me tonight as I read this: you know, there can be a lot of other reasons that users can feel that they “lose their session”, even without using clustering and replication.
    There are issues related sometimes to folks having duplicate session tokens (which can happen for various reasons, including perhaps ones in your code, and maybe only when people visit pages in a certain pattern, so that it happens only occasionally and not always).
    Then there is an issue that can arise if you are supporting both http and https requests, where Tomcat (not CF) balks at that (see http://www.petefreitag.com/item/817.cfm, and though he shows a solution in IIS you should be able to implement a similar one in mod_rewrite if that was indeed perhaps your issue).
    So I’d be curious if either of you may be in a position to have a failing client use any sort of client tool (like Chrome’s dev tools, or Firebug or Firefox’s new builtin tools, or IE’s f12 dev tools) to watch the communication between the client and the server, and especially to watch the cookies being sent. You guys both mention using jsessionid. Are they the same cookie value on each request? And/or are there more than jsessionid? I’ve seen it happen. There could be differences in the domain property reported for the cookie, the httponly property, the secure property, and so on.  And you really do want to view the value sent from the client to the server, because if you view the cookie scope on the server a) it may show values set ON the server rather than sent TO the server, and b) it won’t show these additional cookie properties that were in play on the client. CF only sees the cookie name and value.
    I’ve helped many people find out that this was the reason for the seeming session loss (and sometimes it was not all requests by all clients but perhaps only some requests for some clients, all on the same server). At least if this is the crux of the problem, you can then tackle WHY it’s happening.  There can be many reasons, from code to configuration, so I won’t belabor them now.
    But if either of you may be able to confirm this, perhaps we can help you both get a little closer to a real explanation and solution for your problem. Again, I’m just guessing a bit based on what you’ve written. I realize it may be that none of this is the problem and you have hit some other real unrelated bug. But I really feel confident that you ought to try to check this out first, as it’s indeed been the crux of problems for others, without respect to clustering.  It seems worth ruling out, so that you don’t get misled chasing the problem on the assumption that it is about clustering.
    As always, hope that helps.
    /charlie

  • Session Failover and Clustering

              Let's say that we have two WebServers (NES) with the weblogic plugin (say WS1 and WS2) and a cluster with two WebLogicCommerce AppServers (say AS1 and AS2). Let's assume that each WebServer and AppServer runs on its own machine (total: 4 machines). Now, let's assume that the WebServer "obj.conf" files (on both WS1 and WS2) are setup so that they point to the servers in the cluster (WebLogicCluster="AS1:7601,AS2:7601").
              When a new request comes in to one of the WebServers (say WS1), the plugin will route it to one of the AppServers using Round-Robin (say AS1). A session will now be initiated in AS1 and it sends a response back to the client.
              Question 1: How does the other proxy in WS2 know that all future requests for this client need to be forwarded to AS1?
              Question 2: For failover, does the cluster automatically replicate the session state existing in AS1 onto AS2 before sending the response (does AS2 automatically become the secondary)?
              Now let's assume that AS1 crashes/dies. When the next request from the client comes to WS1 or WS2, they will forward it to AS1 (assuming that WS2 knows about the client session in AS1) . Since AS1 has crashed, will the client eventually get a timeout error message?
              Question 3: To ensure that the session failover happens so that AS2 gets the request instead (becomes the primary), do we need to setup a WebLogic Proxy Server? If so, why can't the plugins for NES provide the failover themselves?
              Thank you very much for your help!
              Giri
              

              Thank you very much for your responses. It has been very helpful and I am clear on the session/clustering stuff. I have new questions on EJB and clustering which I will post as a separate thread.
              Giri
              "Jason Rosenberg" <[email protected]> wrote:
              >And also, if the browser has cookies disabled, it is important for
              >the app server to embed the WebLogicSession info via url rewriting,
              >otherwise the proxy or NES will not be able to route the session
              >properly.
              >
              >So, in all http responses, be sure to pass the url string through
              >response.encodeURL(). This will do the right thing depending
              >on whether cookies are enabled or not.
              >
              >I've just only recently figured this out. Haven't actually tried it
              >all out yet, so forgive me if it is not quite this simple, but this
              >seems to be the gist of it...
              >
              >Jason
              >
              >
              >"Justin James" <[email protected]> wrote in message news:[email protected]...
              >>
              >> Giri,
              >>
              >> I'm not a weblogic representative, but I tried to replicate this proxing service inside a load balancing switch(BigIP) and I
              >discovered a few things. The weblogic server sets a cookie (WebLogicSession)that the webserver plugin uses to manage the proxying.
              >The cookie (found in the HTTP header information) contains encoded information about the primary and secondary application servers
              >that the session is bound too. Any web server can read the cookie to determine how to dispatch the request to the primary server.
              >If the primary server does not respond, the request is forwarded to the secondary server by the plugin. Regardless of cluster size,
              >the session is replicated to only one other server.
              >>
              >> <[email protected]> wrote:
              >> >Giri Alwar wrote:
              >> >
              >> >> I need a couple of clarifications. First with regard to Question 1, I understand that plugins provide load balancing and
              >failover but what I really was asking is how the plugin in WS2 knows that a session for the client has been initiated in AS1 as a
              >result of WS1 sending the initial request to AS1. If WS2 gets a future request from the client, it needs to know this to send the
              >request to AS1. Does the plugin talk to the cluster to find out if there is a primary and who it is?
              >> >>
              >> >
              >> >> I should have clarified that my other questions pertain to in-memory replication. If I do not persist the session in a database
              >then does the client get an error message (timeout) when AS1 goes down (assuming we use NES with the WebLogic plugin)?
              >> >
              >> >Plugins' know how to route requests based on cookies. If it can't reach the primary server it will automatically try secondary.
              >In your case it doesn't matter if it reaches to proxy 1 or proxy 2, it is still the same.
              >> >
              >> >- Prasad
              >> >
              >> >> To prevent this error message and achieve failover, do I need to use WebLogic as the proxy server? If so, why isn't the NES
              >plugin doing this?
              >> >
              >> >> Thanks.
              >> >> Giri
              >> >>
              >> >> Prasad Peddada <[email protected]> wrote:
              >> >> >Giri Alwar wrote:
              >> >> >
              >> >> >> Let's say that we have two WebServers (NES) with the weblogic plugin (say WS1 and WS2) and a cluster with two
              >WebLogicCommerce AppServers (say AS1 and AS2). Let's assume that each WebServer and AppServer runs on its own machine (total: 4
              >machines). Now, let's assume that the WebServer "obj.conf" files (on both WS1 and WS2) are setup so that they point to the servers
              >in the cluster (WebLogicCluster="AS1:7601,AS2:7601").
              >> >> >>
              >> >> >> When a new request comes in to one of the WebServers (say WS1), the plugin will route it to one of the AppServers using
              >Round-Robin (say AS1). A session will now be initiated in AS1 and it sends a response back to the client.
              >> >> >>
              >> >> >> Question 1: How does the other proxy in WS2 know that all future requests for this client need to be forwarded to AS1?
              >> >> >
              >> >> > Plugin takes care of load balancing and failover, it is all transparent to the client.
              >> >> >
              >> >> >
              >> >> >> Question 2: For failover, does the cluster automatically replicate the session state existing in AS1 onto AS2 before sending
              >the response (does AS2 automatically become the secondary)?
              >> >> >
              >> >> > If you have only two yes it is automatically your secondary. Yes, replication is synchronous.
              >> >> >
              >> >> >>
              >> >> >> Now let's assume that AS1 crashes/dies. When the next request from the client comes to WS1 or WS2, they will forward it to
              >AS1 (assuming that WS2 knows about the client session in AS1) . Since AS1 has crashed, will the client eventually get a timeout
              >error message?
              >> >> >
              >> >> > If you are using some kind of persistence then you will be able to retrieve the session information and since the server
              >is not available the request will automatically failover.
              >> >> >
              >> >> >> Question 3: To ensure that the session failover happens so that AS2 gets the request instead (becomes the primary), do we
              >need to setup a WebLogic Proxy Server? If so, why can't the plugins for NES provide the failover themselves?
              >> >> >
              >> >> > No, you need only one. Either NES or weblogic proxy.
              >> >> >
              >> >> >
              >> >> >> Thank you very much for your help!
              >> >> >> Giri
              >> >> >
              >> >> >- Prasad
              >> >> >
              >> >
              >>
              >
              >
              

  • Session Replication doesn't work when using a custom Unicast Channel

    Hello!
    After configure a WLS Cluster for an WebApp with session replication support enabled I faced some issues with cluster configuration.
    My LAB env used for this configurations is:
    One Solaris 10 SPARC box.
    -- One WLS 11g (10.3.6) domain with:
    ---- 4 Managed servers:
    ---- Admin server
    ---- server-1
    ---- server-2
    ---- Proxy Server (HttpClusterServlet)
    --- 1 Cluster composed by:
    ---- server-1
    ---- server-2In that setup I noticed if I define a custom network channel for servers ( server>protocols>channels ) in the cluster and set Cluster Messaging Mode as Unicast* in the Cluster config ( Cluster>Configuration>Messaging>Messaging Mode ), so the session state replication does not work.
    When I enable the cluster replication debug for managed servers the following messages appears:
    <> <> <1358966729933> <BEA-000000> <[roid:-1772481434088297851] Creating primary for application key /webapp>
    ####<Jan 23, 2013 4:45:29 PM BRST> <Debug> <ReplicationDetails> <de25503> <server-1> <[ACTIVE] ExecuteThread: '5' for queue: > 'weblogic.kernel.Default (self-tuning)'> <<ano
    nymous>> <> <> <1358966729958> <BEA-000000> *<Has secondary servers? false>*
    ####<Jan 23, 2013 4:45:29 PM BRST> <Debug> <ReplicationDetails> <de25503> <server-1> <[ACTIVE] ExecuteThread: '5' for queue: >'weblogic.kernel.Default (self-tuning)'> <<ano
    nymous>> <> <> <1358966729959> <BEA-000000> *<Current secondary server? null>*
    ####<Jan 23, 2013 4:45:29 PM BRST> <Debug> <Replication> <de25503> <server-1> <[ACTIVE] ExecuteThread: '5' for queue: >'weblogic.kernel.Default (self-tuning)'> <<anonymous>
    <> <> <1358966729959> <BEA-000000> <[roid:-1772481434088297851] Unable to create secondary on null>
    ####<Jan 23, 2013 4:45:31 PM BRST> <Debug> <ReplicationDetails> <de25503> <server-1> <[ACTIVE] ExecuteThread: '5' for queue: >'weblogic.kernel.Default (self-tuning)'> After eliminate all possible issues with my webapp (serialization, weblogic descriptor configuration, etc) and try many cluster network configurations I noticed that this problem only occurs when I use Unicast for Cluster's Messaging.
    At the end of the day I really would like to understand why the session replication only works for Cluster's Messaging using Multicast mode. I read a lot the WLS docs (specifically the cluster/network topics) [1][2], but I can't find an official explanation about this.
    Can someone help me understand this behavior?
    Many thanks.
    [1] http://docs.oracle.com/cd/E15523_01/web.1111/e13701/network.htm
    [2] http://docs.oracle.com/cd/E15523_01/web.1111/e13709/setup.htm

    I have Fluxbox started with Slim and .xinitrc. Dbus works only with:
    exec ck-launch-session startfluxbox
    you need run Openbox with ck-launch-session:
    exec ck-launch-session openbox-session
    Bye!!

  • Sun java System Web Server 7.0 up2 session replication setting

    hi ....
    Following the standard example of reverse proxy and 2 cluster nodes with session replication
    I get the following starting message
    info ( 3355): CORE5076: Using [Java HotSpot(TM) Server VM, Version 1.5.0_12] from [Sun Microsystems Inc.]
    [07/Aug/2008:15:26:45] warning ( 3355): REPL0081: No backup instance configured for replication service. Disabling replication service
    [07/Aug/2008:15:26:47] info ( 3355): WEB0100: Loading web module in virtual server [mycluster8087] at [myweb]
    [07/Aug/2008:15:26:48] warning ( 3355): WEB9200: sun-web.xml DTD Version with public ID = [-//Sun Microsystems, Inc.//DTD Application Server 8.1 Servlet 2.5//EN] and system ID = [http://www.sun.com/software/appserver/dtds/sun-web-app_2_4-1.dtd] not found in the local respository. Using DTD version with system ID = [http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd] instead.
    [07/Aug/2008:15:26:48] warning ( 3355): WEB7204: Application [myweb] is configured with persistence-type [replicated] but Session Replication is not enabled on this instance; falling back to persistence-type [memory]
    [07/Aug/2008:15:26:49] info ( 3355): PWC3031: Security role name tomcat used in an <auth-constraint> without being defined in a <security-role> in context [myweb]
    [07/Aug/2008:15:26:49] info ( 3355): PWC3031: Security role name role1 used in an <auth-constraint> without being defined in a <security-role> in context [myweb]
    [07/Aug/2008:15:26:49] info ( 3355): HTTP3072: http-listener-1: http://mycluster8087:8087 ready to accept requests
    [07/Aug/2008:15:26:49] info ( 3355): CORE3274: successful server startup
    [07/Aug/2008:15:27:37] info ( 3355): CORE5073: Web server shutdown in progress
    ********** sun-web.xml ***************
    <!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server
    8.1 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_4
    -1.dtd">
    <sun-web-app>
    <session-config>
    <session-manager persistence-type="replicated"/>
    </session-config>
    </sun-web-app>
    ** path : dir-root/https-[instance-name]/web-app/[instance-name]/myweb/WEB-INF/sun-web.xml setting ...
    Why is it a case a session replication doing not become?
    Is it a case one a mistake by a setting?

    Try this blog [http://blogs.sun.com/nsegura/entry/h2_session_replication_and_lightweight|http://blogs.sun.com/nsegura/entry/h2_session_replication_and_lightweight]
    4. Enabling Session Replication
    Now that we deployed our web application, we need to enable the session replication feature in the configuration. This will start the session replication services in each instance. We can do this using the CLI administration:
    wadm> set-session-replication-prop --config=mycluster enabled=true
    CLI201 Command 'set-session-replication-prop' ran successfully
    wadm> deploy-config mycluster
    CLI201 Command 'deploy-config' ran successfully

Maybe you are looking for