Load Balance on OC4J

Hi,
I want to run same application on n number of servers, how can i redirect request to another server ( How can I implement Load Balancing on OC4J?), kindly, write me the proper syntext/command of loadbalancing and content of the .xml file.
Thanks!
K.G.Sharma

If you are using OC4J 1.0.2.2.x then you can follow the instructions in the Getting Started Guide at http://otn.oracle.com/docs/tech/java/oc4j/htdocs/getstart.htm#1015479 to configure loadbalancing and clustering in OC4J.
In Oracle9iAS Release 2, load balancing and clustering is performed using OHS and mod_OC4J. Please look at http://otn.oracle.com/docs/products/ias/doc_library/90200doc_otn/core.902/a92171/cluster.htm#1006053
Oracle9iAS Release 2 on Windows plaform will be released very soon within 2-3 weeks.
regards
Debu

Similar Messages

  • Load balancing in OC4J

    I have a configuration where I can see in the EM two instances of the xmlpserver (I am not sure how this was done).
    Is there load balancing in OC4J itself, where a request would be directed to either instance? If this is happening, then I assume that session affinity is maintained by cookies.
    The problem that I am having is that I am using a SOAP Client to access the services available from xmlpserver. The client does not support cookies so when I make a call to login, I get back a token in the response and my subsequent calls should use that login. But What is happening is that the calls are alternating between the two instances and the calls are failing because the user session is not created in both instances.
    Is there a configuration in OC4J to say that only a particular instance should always handle all the soap calls?
    Thanks

    C:\product\10.1.3.1\OracleAS_1\opmn\bin>opmnctl status
    Processes in Instance: SOA1013.stbde01.us.oracle.com
    --------------------------------------------------------------+---------
    ias-component | process-type | pid | status
    --------------------------------------------------------------+---------
    OC4JGroup:default_group | OC4J:bixmlpserver | 7640 | Alive
    OC4JGroup:default_group | OC4J:bianalytics | 4632 | Alive
    OC4JGroup:default_group | OC4J:bijmx | 3204 | Alive
    OC4JGroup:default_group | OC4J:home | 2792 | Alive
    ASG | ASG | N/A | Down
    HTTP_Server | HTTP_Server | 7912 | Alive
    C:\product\10.1.3.1\OracleAS_1\opmn\bin>opmnctl @cluster status
    Processes in Instance: SOA1013.stbed37.us.oracle.com
    --------------------------------------------------------------+---------
    ias-component | process-type | pid | status
    --------------------------------------------------------------+---------
    OC4JGroup:default_group | OC4J:bixmlpserver | 4112 | Alive
    OC4JGroup:default_group | OC4J:bijmx | 4008 | Alive
    OC4JGroup:default_group | OC4J:home | 8008 | Alive
    ASG | ASG | N/A | Down
    HTTP_Server | HTTP_Server | 6700 | Alive
    Processes in Instance: SOA1013.staid06.us.oracle.com
    --------------------------------------------------------------+---------
    ias-component | process-type | pid | status
    --------------------------------------------------------------+---------
    OC4JGroup:default_group | OC4J:bianalytics | 5304 | Alive
    OC4JGroup:default_group | OC4J:bijmx | 5324 | Alive
    OC4JGroup:default_group | OC4J:home | 1768 | Alive
    ASG | ASG | N/A | Down
    Processes in Instance: SOA1013.stbde02.us.oracle.com
    --------------------------------------------------------------+---------
    ias-component | process-type | pid | status
    --------------------------------------------------------------+---------
    OC4JGroup:default_group | OC4J:bianalytics | 2528 | Alive
    OC4JGroup:default_group | OC4J:bijmx | 2400 | Alive
    OC4JGroup:default_group | OC4J:home | 2424 | Alive
    ASG | ASG | N/A | Down
    Processes in Instance: SOA1013.stbde01.us.oracle.com
    --------------------------------------------------------------+---------
    ias-component | process-type | pid | status
    --------------------------------------------------------------+---------
    OC4JGroup:default_group | OC4J:bixmlpserver | 7640 | Alive
    OC4JGroup:default_group | OC4J:bianalytics | 4632 | Alive
    OC4JGroup:default_group | OC4J:bijmx | 3204 | Alive
    OC4JGroup:default_group | OC4J:home | 2792 | Alive
    ASG | ASG | N/A | Down
    HTTP_Server | HTTP_Server | 7912 | Alive
    Time: 9:26 AM PST
    Thanks
    Richard

  • Load Balancing on OC4J standalone

    Ola,
    We are setting up a system with 2 Apache web servers and 2 hosts for Oracle Containers for Java. At first, > we will be using stand-alone oc4j. Web servers load balancing will be implemented via hardware. Our
    question is about high availability with oc4js, and searching through the OTN forum database, we found a
    very similar problem with Zhen Kun Cua (how can i use the nested table in form 6i but no answer
    was given.
    How can we replicate Load Balancers (we are using oc4js loadbalancer.jar) as to save the system from going > down with a crash of the first load balancer? Also, is there another way of clustering oc4j stand-alone
    without using this load balancer? We might be using another hardware load balancer for the containers.
    Any help would be much appreciated.
    Thanks you in advance,
    Joco Bosco

    For OC4J questions, try the J2EE forum Products>Application Server > J2EE.
    Thanks,
    Ashesh Parekh

  • Load balancing OHS-OC4J

    Hi there
    I've 2 servers OAS 10.1.2 with the same kind of installation.
    First box: OHS + OC4J
    mod_oc4j.conf:
    <IfModule mod_oc4j.c>
    Oc4jSelectMethod roundrobin
    Oc4jMount /Forms/* instance://ip1:6200, ip2:6200
    Second box: OHS + OC4J
    mod_oc4j.conf:
    <IfModule mod_oc4j.c>
    Oc4jSelectMethod roundrobin
    Oc4jMount /Forms/* instance://ip1:6200, ip2:6200
    is it correct ?
    Regards
    Moosy

    And how are you load balancing requests to both boxes? Are you front-ending it with Web Cache?

  • Oc4j load balancing AS 101202

    Can anyone point me to some good documentation for configuring load balancing for oc4j instances?
    I've seen a lot on metalink, but all dated back to 2002. I was hoping there was some new documentation for 10gR2.
    I'm trying to load balance 3 webservice OC4J instances which each point to different API servers as the API servers themselves are single threaded.
    Thanks for the assistance,
    Tony

    Thanks for the post. We had a little difficulty getting enough specifics out of the documentation to answer all our questions. But opened a TAR and got a good engineer who worked with us to get a custom load balancing solution that is working very well for us.
    Thanks again,
    Tony
    For others out there that are interested, we ended up with a very simple load balancing setup that simply requires that the mod_oc4j.conf be modified to group the containers.
    From Oracle:
    To implement the solution, please execute the following steps:
    1. Deploy application into different containers with the same application name.
    2. Modify the mod_oc4j.conf as follows:
    Oc4jMout /test <oc4j instance 1>, <oc4j instance 1>,...

  • Load balancing HTTP requests for an OC4J instance w/multiple JVMs

    Hello everyone,
    I am using OAS 10.1.3.1 and wish to load balance HTTP requests across an OC4J group of one or more OC4J instances, where each like named OC4J instance may have multiple JVMs or it may just have one JVM.
    My mod_oc4j.conf file would contain the following directives :
    Oc4jSelectMethod roundrobin:local
    Oc4jRoutingMode Static
    Oc4JMount /xyz/* xyz
    In the degenerate case, I would like to have an OC4J group with a cluster size of one, and have that one OC4J instance have two or more JVMs. I would like to be able to receive a request within my web application, determine that the JVM that has been sent the request is the wrong JVM to process the request, and then call HttpServletResponse.sendRedirect("/xyz"). Then, when the browser receives the HTTP 302 response and issues the subsequent HTTP request, have that request sent to a different JVM than the previous JVM that issued the sendRedirect().
    What I have seen is that the subsequent request is sent back to the same JVM that issued the sendRedirect(). I also call invalidate() against the HttpSession prior to calling sendRedirect(), but that does not seem to affect the behavior that I see.
    In the full blown case, I would have an OC4J group with a cluster size > 1, and each of those OC4J instances would have at least one JVM. In that case, I wish the sendRedirect() call to allow the subsequent request to be sent to any one of the OC4J instances in the group, and any one of those JVMs within all of those OC4J instances.
    Can anyone verify that my mod_oc4j mount directive is appropriate given the select method and routing mode? What else might I need to do to have a chance to have a different JVM respond to the request that results from a sendRedirect()?
    Thank you,
    Doug

    I should clarify that in the full blown environment, the OC4J instances that form a group will each be housed within a separate OAS instance that resides on its own machine.
    So ideally, a request could be inbound to say OAS instance 1 on machine A, OC4J instance AA, JVM 2, and I need to force a redirect so that the request can actually be serviced by OAS instance 3 on machine C, OC4J instance AA, JVM 1, and I need to be able to call sendRedirect() against an HttpServletResponse from within a JVM until the subsequent request from the browser, Internet Explorer in my case, is serviced by that JVM.
    Thanks,
    Doug

  • Load Balancing - OC4J - J2EE

    Hello,
    I am trying to do software load balancing on the Applicatoin tier of Oracle Apps 11.5.9 (which uses 9iAS version 2.0, I suppose)
    Going thru the follow metalink documents ---
    Configuring Multiple OC4J Instances as a High Availability Cluster
    (http://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=175593.1)
    Running Multiple OC4J Instances From a Single Install of 9iAS 1.0.2.2
    (http://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=153325.1)
    But I am unable to find the directory 'j2ee' in 9iAS ORACLE_HOME wherein I need to modify the configuration files
    Is there any version probelm
    Or something that I am doing wrong
    Please let me know
    Thanks and Regards,
    Pooja

    Pooja,
    I am unable to find the directory 'j2ee' in 9iAS
    ORACLE_HOMEThat's because ORACLE_HOME for 9iAS is different to ORACLE_HOME for the Oracle database (server).
    On our SUN [sparc] Solaris 9 machine:
    [9iAS] ORACLE_HOME = /u/app/oracle/product/ias
    [9i Database] ORACLE_HOME = /u/app/oracle/product/9.2.0
    And the "j2ee" subdirectory is under "/u/app/oracle/product/ias"
    Good Luck,
    Avi.

  • Load  Balancing Oracle BI Presentation Server with OC4J

    Hello All,
    Is there a way to perform Load Balancing Oracle BI Presenation Server the way we do with IIS (defining in ISAPIConfig.XML file)?
    I am looking some pointers towards Clustering/Load Balancing Oracle BI Presentation Servers using OC4J not IIS.
    Thank you.

    Thanks , the Oracle BI Presentation Server is running now ,but still the oc4j display the below error :-
    C:\OracleBI\oc4j_bi\bin>oc4j.cmd -start
    Starting OC4J from C:\OracleBI\oc4j_bi\j2ee\home ...
    10/05/06 13:58:31 Error initializing server: /C:/OracleBI/oc4j_bi/j2ee/home/conf
    ig/server.xml, Fatal error at line 1 offset 1 in file:/C:/OracleBI/oc4j_bi/j2ee/
    home/config/server.xml: .<Line 1, Column 1>: XML-20108: (Fatal Error) Start of r
    oot element expected.
    10/05/06 13:58:31 Fatal error: server exiting

  • Load Balancing OBIEE using OC4J

    Hi All,
    I would like to know if there is a way of load balancing 2 instances of OBIEE using OC4J.
    Please advice if possible and the steps required to achieve that.
    A small correction ... we have 2 instance of OBIEE and 2 of stand alone of OC4J
    Is there any way we can attempt to load balance the two???
    Regards,
    maabajaber
    Edited by: maabajaber on Sep 22, 2010 4:19 AM

    Hi All,
    A small correction ... we have 2 instance of OBIEE and 2 of stand alone of OC4J.
    I believe OC4J stand alone can do this but i dont know how
    Is there any way we can attempt to load balance the two.
    Regards,
    maabajaber

  • Session replication in oc4j load balancing not working ..

    Hi All,
    I have windows 2000 machine. I have installed 2 instances of oc4j running on ports 8888 and 8889. I started the loadbalancer.jar in the first instance, started the first oc4j instance and then started the second oc4j instance. I have a common application deployed on both instance1 and instance2 and that is nothing but out famous SessionServlet.
    If I access this servlet using http://localhost:80/app/servlet/SessionServlet then I am getting a count as 1 . My loadbalancer that is started from first oc4j instance(running on port 8888) is showing that the request is routed to the first instance. I stopped my first instance1 and then again from the same browser/session/client if I access the same servlet using http://localhost:80/app/servlet/SessionServlet then still I am seeing the count as 1 instead of 2 . At this point my loadbalancer is showing that the request is routed to the second oc4j instance(running on port 8889) since first instance is stopped. So why am I seeing the count as 1 instead as 2.
    Also,
    1. Is it enough that we start the loadbalancer.jar in the first oc4j instance. What about the loadbalancer.jar in the second oc4j instance ?
    2. We all know that Apache HTTP Server runs on port 80. But since I didnt[i]Long postings are being truncated to ~1 kB at this time.

    thank you debu, I have one doubt . In the clustering/load-balancing documentation at metalink(doc id: 151717.1) it is said that in point 4b that we should add the tag <cluster-config /> to orion-web.xml file but this file will be created only after the web application is deployed and it is accessed atlest for one time. So is it that we should first deploy the web application and then access it for atlest one time then stop the server and add this tag .. or is there any other way workaround ?

  • Monitoring oc4j load balancing

    Hi
    We are using mod_oc4j to load balance our OC4J_BI_Forms application between 3 application servers. Is it possible to monitor those servers ? Can i add or remove servers "on the fly" without restarting the servers?
    We use 9iAS rel 2 with Windows 2000
    Regards,
    Louis

    Thanks for the post. We had a little difficulty getting enough specifics out of the documentation to answer all our questions. But opened a TAR and got a good engineer who worked with us to get a custom load balancing solution that is working very well for us.
    Thanks again,
    Tony
    For others out there that are interested, we ended up with a very simple load balancing setup that simply requires that the mod_oc4j.conf be modified to group the containers.
    From Oracle:
    To implement the solution, please execute the following steps:
    1. Deploy application into different containers with the same application name.
    2. Modify the mod_oc4j.conf as follows:
    Oc4jMout /test <oc4j instance 1>, <oc4j instance 1>,...

  • OC4J load balancing

    We got multiple JVMs configured and running. Since we are not able to share the session among the JVMs we are having issue running the application on mutiple JVM since the OC4J is doing the load balancing. For example, if request is established on one JVM the next request is sent to another thus the application fails by not finding the session object. Is there a way we can have the sticky on OC4J so that if the session is established on one JVM then continue to use that JVM through out the life cycle of the session. Another word load balance only if the request is new. Thanks in advance for your help.

    Okay, how about if you have multiple web application that are sharing the session.
    Is there a way we could say these web application should be running on the same JVM? If you mean by this that you have different WAR files (either standalone or contained in an EAR file) that need to share common session state, then we don't support this with OC4J. A session is bounded within the Web module that it is created within. I think someone on here had come up with a way to do once before it using a different cookie name and a common cookie path but its not something we do by default.
    Do you know how to configure them to run on the same JVM. Would parent work?
    Could we make one web app parent for others - if so would it guarantee to run the the same JVM?The parent config doesn't dictate any runtime behaviour -- it's configuration, classloading based parenting only.
    We have a scenario where our web applications are dependent upon each other - meaning they need to run on the same JVM together since they are sharing the session. It sounds to me that if you have this sort of requirement, then it'd be worth your while looking at our Coherence*Web functionality. This provides a way to allow the Coherence distributed cache to be used as the session/session-replication infrastructure -- effectively switching out the native session manager from OC4J (and other J2EE servers, Tomcat, etc.).
    It has a switch that enables cross Web module state sharing. Because it's a distributed cache too, it will allow all JVMs to see/use the same view of the current session state.
    See here for more details:
    http://coherence.oracle.com/display/COH34UG/Coherence*Web+Session+Management+Module
    http://coherence.oracle.com/display/COH34UG/Coherence*Web+Session+and+Session+Attribute+Scoping
    -steve-

  • A question about oc4j load balancing/ failover behaviour

    Hi
    I have been trying to set up load balancing using 9.0.2 standalone oc4j instances that share sessions.
    - I set up two oc4j instances (say oc4j1 and oc4j2) pointing to a load balancer entering the following in <J2EE_HOME>config\http-web-site.xml:
    <web-site host="<ip>" port="<port>" display-name="Oracle 9iAS Java HTTP WebSite" cluster-island="1" >
    and
    <frontend host="<host>" port="80" />
    - I entered <cluster-config/> and <session-tracking/> in each oc4j instance's orion-web.xml, and <distributable/> in their web.xml files.
    - I started the loadbalancer(java -jar loadbalancer.jar -debug) and the oc4j instances.
    Everything works fine up to a point. They are both added to the cluster and the debug messages show that requests are being routed to oc4j1 and cluster session value update messages are sent by oc4j1 and received by oc4j2. When I shut down oc4j1 requests are routed to oc4j2 and session information is maintained.
    However, when I start up oc4j1 again, it does not appear to be receiving the session value updates now being sent by oc4j2 so if I now shut down oc4j2 the session is lost. Can anyone please tell me what I have missed?
    Thanks in advance
    - Al

    Hi
    I have been trying to set up load balancing using 9.0.2 standalone oc4j instances that share sessions.
    - I set up two oc4j instances (say oc4j1 and oc4j2) pointing to a load balancer entering the following in <J2EE_HOME>config\http-web-site.xml:
    <web-site host="<ip>" port="<port>" display-name="Oracle 9iAS Java HTTP WebSite" cluster-island="1" >
    and
    <frontend host="<host>" port="80" />
    - I entered <cluster-config/> and <session-tracking/> in each oc4j instance's orion-web.xml, and <distributable/> in their web.xml files.
    - I started the loadbalancer(java -jar loadbalancer.jar -debug) and the oc4j instances.
    Everything works fine up to a point. They are both added to the cluster and the debug messages show that requests are being routed to oc4j1 and cluster session value update messages are sent by oc4j1 and received by oc4j2. When I shut down oc4j1 requests are routed to oc4j2 and session information is maintained.
    However, when I start up oc4j1 again, it does not appear to be receiving the session value updates now being sent by oc4j2 so if I now shut down oc4j2 the session is lost. Can anyone please tell me what I have missed?
    Thanks in advance
    - Al

  • Request failover between Load Balancer and OAS 10.1.3.3

    Hello,
    I have a Load Balancer hardware "Cisco 11500 content service"
    Working on 4 applications server OAS 10.1.3.3 on the oracle enterprise lunix
    We are using Oracle HTTP Server And deployed application Under (j2ee) I am using Cluster between them "instant” as the same on all 4 servers
    If an OC4J process goes down between requests, then this module is able to hide that failure from the end user by transparently routing the next request to another OC4J that is available within the same group of JVM.
    BUT when I shutdown the opmn the Load Balancer Hardware is still sending that requests to the opmn that is already down
    How can I configure or fix that request that is common to that opmn stopped process
    Do you have the solution to solve this issue?
    Thanks.
    Regards.
    Moataz

    Dear All,
    Will appreciate if someone can answer this. Please let me know.........
    Regards
    Moataz Alem

  • Error while load balancing two servers

    i have two Solaris servers running 9iAS R2 OC4j.
    current patch level is 9.0.2.3
    i'm trying to load balance the instances according
    to the instructions in this document:
    Oracle9i Application Server: mod_oc4j Technical Overview
    all i should need to do is run the command:
    dcmctl addOPMNLink <IP>:<PORT>
    but when i do this i get this error:
    ADMN-906026
    i could not find any info on this error with searches of:
    Google, Google Groups, Oracle MetaLink, Oracle OTN.
    ideas? suggestions? anything?
    thanks,
    .rich

    i just tried running a "dcmctl getError", and got this:
    ADMN-906026
    This Oracle9iAS instance is currently using a database repository to store configuration information. The OPMN link functionality is not supported when a database repository is being used. An Oracle9iAS cluster should be created to associate Oracle9iAS instances when using a repository.
    the two OC4J instances in question are associated with an Infrastructure instance on their respective servers. do i need to de-couple the OC4J instances? or create a "cluster of one" instance?
    .rich

Maybe you are looking for