Load Balancing in EJB ???

Hi everyone
Can anyone guide me how can I achieve failover/IIOP load balancing in EJB.
Thanks,
AA

I would agree when you say it is App Server Specific but could anyone give me an example/flow of how failover is achieved in any one App Server say Sun App Server.

Similar Messages

  • WLS 5.1 SP8 improper load balancing of EJB

    I have noticed a strange behaviour in load balancing of EJB.
              I have 3 instances of WLS 5.1 sp8 running under a cluster, lets say X, Y and
              Z. Now if I access the EJB in the cluster from with in one of the WLS
              instances(eg servlet), lets say Y, then I always get the reference from that
              same machine "Y" no matter what load balancing algorithm I set. No matter
              how many times I access this EJB from machine Y it will only give me
              reference of EJB from Y. Somehow this seems wrong, it should round-robin
              between X, then Y then Z and then X again no matter where I get a reference
              from.
              Now if I access the EJB from outside of the cluster, a fourth JVM, then each
              time I get the reference from a different machine and clustering works fine
              and load balances as expected.
              Any explanation, workaround ??? Most of the EJB referencing we are doing is
              within the cluster itself, this is causing problems because everything
              works, but on a single machine even though we have a cluster set up. We only
              reference the EJB externally once, that does get clustered, but from that
              point on, everything happens on that machine.
              

              What you really want to do is use CallRouter - I've used it with clustered RMI,
              I have not used it with EJB. (but EJB use RMI so you should be able to make it
              work).
              Personally, I'd be writing my number crunching bits in C about now.
              Mike
              "Haider Kazmi" <[email protected]> wrote:
              >Thanks Mike, let me give creating InitialContext with specific IP address
              >a
              >try , maybe we can put in load sharing logic in our code this way.
              >
              >As for using C, I think as with all products, our marketing team wouldn't
              >like that but thats a definate approach to improve performance.
              >
              >cheers
              >
              >"Mike Reiche" <[email protected]> wrote in message
              >news:[email protected]...
              >>
              >> You're doing heavy computation in Java - it's going to be slow.
              >> Write it in C, call it using JNI and it will be about 10 times as fast.
              >>
              >> There 'executing sequentially' is not a function of the EJB
              >specification. I
              >> assume your code looks something like...
              >>
              >>
              >> result1= ejb1.calculate1 ( a, b, c );
              >> result2= ejb2.calculate2 ( e, f, result1);
              >> result3= ejb3.calcualte3 ( x, result3);
              >>
              >> caculate3 won't be called until calculate2 has finished, which won't
              >be
              >called
              >> until calculate1 has finished. Sequential.
              >>
              >> If you really want to force the EJBs on a specific WL instance, just
              >specify the
              >> IP address and port number when you create the InitialContext.
              >>
              >> Mike
              >>
              >>
              >>
              >> "Haider Kazmi" <[email protected]> wrote:
              >> >Hi Mike
              >> >
              >> >> First you gotta understand that calling an EJB on a remote JVM costs
              >> >about
              >> >10 times
              >> >> as much as calling one on a local instance. That's what I tried
              >to
              >> >say in
              >> >the
              >> >> first followup.
              >> >>
              >> >> Second, if whatever is calling the EJB (JSP, Servlet) is load balanced,
              >> >then -
              >> >> presto - all the EJB calls are load balanced as well.
              >> >
              >> >Thats definately true, I think I might have created some confusion,
              >what
              >> >I
              >> >was really trying to say is that we are doing a lot of processing
              >and
              >> >its
              >> >mathematical in nature unlike the standard credit card transaction
              >or
              >> >website transaction. We have optimized this to a large extent, the
              >real
              >> >problem we get into is when the consumers of this result try to consume
              >> >them, each of which are stateless session beans.
              >> >The result gets posted on a JMS topic, servlet was an example, what
              >we
              >> >actually have are JMS clients calling more EJBs once a result is posted
              >> >on
              >> >the JMS topic. So here is how it goes, once the processing of workflow
              >> >is
              >> >done, this published on the relevent JMS topic based on the result
              >of
              >> >the
              >> >workflow process. All the related JMS clients subscribed to this topic
              >> >pick
              >> >it up. They call relevent EJBs with this result. So we don't have
              >control
              >> >over load balancing our clients.
              >> >
              >> >> The only time that such a configuration would load only one instance
              >> >is if
              >> >you
              >> >> only had one such EJB call at a time. But this is still faster
              >than
              >> >having the
              >> >> EJBs load balanced on remote JVM. Load balanced or not, the EJB
              >calls
              >> >are
              >> >NOT
              >> >> made in parallel, thus the calling method has to wait for the first
              >> >call
              >> >to finish,
              >> >> then the second, then the third... so that if each call takes longer
              >> >on a
              >> >remote
              >> >> JVM than locally, your total wait time is longer.
              >> >thanks for this info. I think I better read the EJB specs in more
              >details.
              >> >however whats not clear to me is even if the EJBs are different (not
              >> >just
              >> >different instances of the same EJBs and what about different instances
              >> >of
              >> >the same EJB, are things still done sequentially) will only one method
              >> >be
              >> >called at a time??
              >> >
              >> >> Maybe that's not clear - distributing the calls does not make anything
              >> >happen
              >> >> any faster - it just spreads it out.
              >> >Is this also true for stateless session beans, specifically among
              >different
              >> >instances of the same bean?
              >> >
              >> >> You should be spending your time figuring out how to reduce the
              >amount
              >> >of
              >> >processing.
              >> >This is where I am stuck at now. We are at a point where a lot of
              >the
              >> >optimization is done. The problem arizes when processing is done and
              >> >the
              >> >result is posted on the JMS, a bunch of stateless session bean try
              >to
              >> >consume the result all at once.
              >> >
              >> >
              >>
              >
              >
              

  • Load Balance / Clustering of Oracle9iAS (for EJBs)

    <P>Hi there,</P>
    <P>I am testing Oracle9iAS and am wondering how load
    balancing can be configured with this server. There is
    information available about <A
    href="http://otn.oracle.com/products/ias/daily/aug27.html"
    target=_blank>load balancing for servlets and JSPs</A>, but
    I did not find any information about how to load balance or
    cluster EJB servers. Does any of you know?</P>
    <P>Thank you!<BR>
    Chris</P>

    <P>Hi there,</P>
    <P>I am testing Oracle9iAS and am wondering how load
    balancing can be configured with this server. There is
    information available about <A
    href="http://otn.oracle.com/products/ias/daily/aug27.html"
    target=_blank>load balancing for servlets and JSPs</A>, but
    I did not find any information about how to load balance or
    cluster EJB servers. Does any of you know?</P>
    <P>Thank you!<BR>
    Chris</P>

  • WLS6.1sp1 stateful EJB problem =   load-balancing and fail over

              I have three problem
              1. I have 2 clustered server. my weblogic-ejb-jar.xml is here
              <?xml version="1.0"?>
              <!DOCTYPE weblogic-ejb-jar PUBLIC '-//BEA Systems, Inc.//DTD WebLogic 6.0.0 EJB//EN'
              'http://www.bea.com/servers/wls600/dtd/weblogic-ejb-jar.dtd'>
              <weblogic-ejb-jar>
              <weblogic-enterprise-bean>
                   <ejb-name>DBStatefulEJB</ejb-name>
                   <stateful-session-descriptor>
                   <stateful-session-cache>
                        <max-beans-in-cache>100</max-beans-in-cache>
                        <idle-timeout-seconds>120</idle-timeout-seconds>
                   </stateful-session-cache>
                   <stateful-session-clustering>
                        <home-is-clusterable>true</home-is-clusterable>
                        <home-load-algorithm>RoundRobin</home-load-algorithm>
                        <home-call-router-class-name>common.QARouter</home-call-router-class-name>
                        <replication-type>InMemory</replication-type>
                   </stateful-session-clustering>
                   </stateful-session-descriptor>
                   <jndi-name>com.daou.EJBS.solutions.DBStatefulBean</jndi-name>
              </weblogic-enterprise-bean>
              </weblogic-ejb-jar>
              when i use "<home-call-router-class-name>common.QARouter</home-call-router-class-name>"
              and deploy this ejb, exception cause
              <Warning> <Dispatcher> <RuntimeException thrown b
              y rmi server: 'weblogic.rmi.cluster.ReplicaAwareServerRef@9 - jvmid: '2903098842
              594628659S:203.231.15.167:[5001,5001,5002,5002,5001,5002,-1]:mydomain:cluster1',
              oid: '9', implementation: 'weblogic.jndi.internal.RootNamingNode@5f39bc''
              java.lang.IllegalArgumentException: Failed to instantiate weblogic.rmi.cluster.B
              asicReplicaHandler due to java.lang.reflect.InvocationTargetException
              at weblogic.rmi.cluster.ReplicaAwareInfo.instantiate(ReplicaAwareInfo.ja
              va:185)
              at weblogic.rmi.cluster.ReplicaAwareInfo.getReplicaHandler(ReplicaAwareI
              nfo.java:105)
              at weblogic.rmi.cluster.ReplicaAwareRemoteRef.initialize(ReplicaAwareRem
              oteRef.java:79)
              at weblogic.rmi.cluster.ClusterableRemoteRef.initialize(ClusterableRemot
              eRef.java:28)
              at weblogic.rmi.cluster.ClusterableRemoteObject.initializeRef(Clusterabl
              eRemoteObject.java:255)
              at weblogic.rmi.cluster.ClusterableRemoteObject.onBind(ClusterableRemote
              Object.java:149)
              at weblogic.jndi.internal.BasicNamingNode.rebindHere(BasicNamingNode.jav
              a:392)
              at weblogic.jndi.internal.ServerNamingNode.rebindHere(ServerNamingNode.j
              ava:142)
              at weblogic.jndi.internal.BasicNamingNode.rebind(BasicNamingNode.java:36
              2)
              at weblogic.jndi.internal.BasicNamingNode.rebind(BasicNamingNode.java:36
              9)
              at weblogic.jndi.internal.BasicNamingNode.rebind(BasicNamingNode.java:36
              9)
              at weblogic.jndi.internal.BasicNamingNode.rebind(BasicNamingNode.java:36
              9)
              at weblogic.jndi.internal.BasicNamingNode.rebind(BasicNamingNode.java:36
              9)
              at weblogic.jndi.internal.RootNamingNode_WLSkel.invoke(Unknown Source)
              at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:296)
              So do i must use it or not???
              2. When i don't use "<home-call-router-class-name>common.QARouter</home-call-router-class-name>"
              , there's no exception
              but load balancing does not happen. According to the document , there's must load
              balancing when i call home.create() method.
              my client program goes here
                   DBStateful the_ejb1 = (DBStateful) PortableRemoteObject.narrow(home.create(),
              DBStateful.class);
                   DBStateful the_ejb2 = (DBStateful) PortableRemoteObject.narrow(home.create(3),
              DBStateful.class);
              the result is like that
                   the_ejb1 = ClusterableRemoteRef(203.231.15.167 weblogic.rmi.cluster.PrimarySecon
                   daryReplicaHandler@4695a6)/397
                   the_ejb2 = ClusterableRemoteRef(203.231.15.167 weblogic.rmi.cluster.PrimarySecon
                   daryReplicaHandler@acf6e)/398
                   or
                   the_ejb1 = ClusterableRemoteRef(203.231.15.125 weblogic.rmi.cluster.PrimarySecon
                   daryReplicaHandler@252fdf)/380
                   the_ejb2 = ClusterableRemoteRef(203.231.15.125 weblogic.rmi.cluster.PrimarySecon
                   daryReplicaHandler@6a0252)/381
                   I think the result should be like under one... isn't it??
                   the_ejb1 = ClusterableRemoteRef(203.231.15.167 weblogic.rmi.cluster.PrimarySecon
                   daryReplicaHandler@4695a6)/397
                   the_ejb2 = ClusterableRemoteRef(203.231.15.125 weblogic.rmi.cluster.PrimarySecon
                   daryReplicaHandler@6a0252)/381
              In this case i think the_ejb1 and the_ejb2 must have instance in different cluster
              server
              but they go to one server .
              3. If i don't use      "<home-call-router-class-name>common.QARouter</home-call-router-class-name>",
              "<replication-type>InMemory</replication-type>" then load balancing happen but
              there's no fail-over
              So how can i get load-balancing and fail over together??
              

              I have three problem
              1. I have 2 clustered server. my weblogic-ejb-jar.xml is here
              <?xml version="1.0"?>
              <!DOCTYPE weblogic-ejb-jar PUBLIC '-//BEA Systems, Inc.//DTD WebLogic 6.0.0 EJB//EN'
              'http://www.bea.com/servers/wls600/dtd/weblogic-ejb-jar.dtd'>
              <weblogic-ejb-jar>
              <weblogic-enterprise-bean>
                   <ejb-name>DBStatefulEJB</ejb-name>
                   <stateful-session-descriptor>
                   <stateful-session-cache>
                        <max-beans-in-cache>100</max-beans-in-cache>
                        <idle-timeout-seconds>120</idle-timeout-seconds>
                   </stateful-session-cache>
                   <stateful-session-clustering>
                        <home-is-clusterable>true</home-is-clusterable>
                        <home-load-algorithm>RoundRobin</home-load-algorithm>
                        <home-call-router-class-name>common.QARouter</home-call-router-class-name>
                        <replication-type>InMemory</replication-type>
                   </stateful-session-clustering>
                   </stateful-session-descriptor>
                   <jndi-name>com.daou.EJBS.solutions.DBStatefulBean</jndi-name>
              </weblogic-enterprise-bean>
              </weblogic-ejb-jar>
              when i use "<home-call-router-class-name>common.QARouter</home-call-router-class-name>"
              and deploy this ejb, exception cause
              <Warning> <Dispatcher> <RuntimeException thrown b
              y rmi server: 'weblogic.rmi.cluster.ReplicaAwareServerRef@9 - jvmid: '2903098842
              594628659S:203.231.15.167:[5001,5001,5002,5002,5001,5002,-1]:mydomain:cluster1',
              oid: '9', implementation: 'weblogic.jndi.internal.RootNamingNode@5f39bc''
              java.lang.IllegalArgumentException: Failed to instantiate weblogic.rmi.cluster.B
              asicReplicaHandler due to java.lang.reflect.InvocationTargetException
              at weblogic.rmi.cluster.ReplicaAwareInfo.instantiate(ReplicaAwareInfo.ja
              va:185)
              at weblogic.rmi.cluster.ReplicaAwareInfo.getReplicaHandler(ReplicaAwareI
              nfo.java:105)
              at weblogic.rmi.cluster.ReplicaAwareRemoteRef.initialize(ReplicaAwareRem
              oteRef.java:79)
              at weblogic.rmi.cluster.ClusterableRemoteRef.initialize(ClusterableRemot
              eRef.java:28)
              at weblogic.rmi.cluster.ClusterableRemoteObject.initializeRef(Clusterabl
              eRemoteObject.java:255)
              at weblogic.rmi.cluster.ClusterableRemoteObject.onBind(ClusterableRemote
              Object.java:149)
              at weblogic.jndi.internal.BasicNamingNode.rebindHere(BasicNamingNode.jav
              a:392)
              at weblogic.jndi.internal.ServerNamingNode.rebindHere(ServerNamingNode.j
              ava:142)
              at weblogic.jndi.internal.BasicNamingNode.rebind(BasicNamingNode.java:36
              2)
              at weblogic.jndi.internal.BasicNamingNode.rebind(BasicNamingNode.java:36
              9)
              at weblogic.jndi.internal.BasicNamingNode.rebind(BasicNamingNode.java:36
              9)
              at weblogic.jndi.internal.BasicNamingNode.rebind(BasicNamingNode.java:36
              9)
              at weblogic.jndi.internal.BasicNamingNode.rebind(BasicNamingNode.java:36
              9)
              at weblogic.jndi.internal.RootNamingNode_WLSkel.invoke(Unknown Source)
              at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:296)
              So do i must use it or not???
              2. When i don't use "<home-call-router-class-name>common.QARouter</home-call-router-class-name>"
              , there's no exception
              but load balancing does not happen. According to the document , there's must load
              balancing when i call home.create() method.
              my client program goes here
                   DBStateful the_ejb1 = (DBStateful) PortableRemoteObject.narrow(home.create(),
              DBStateful.class);
                   DBStateful the_ejb2 = (DBStateful) PortableRemoteObject.narrow(home.create(3),
              DBStateful.class);
              the result is like that
                   the_ejb1 = ClusterableRemoteRef(203.231.15.167 weblogic.rmi.cluster.PrimarySecon
                   daryReplicaHandler@4695a6)/397
                   the_ejb2 = ClusterableRemoteRef(203.231.15.167 weblogic.rmi.cluster.PrimarySecon
                   daryReplicaHandler@acf6e)/398
                   or
                   the_ejb1 = ClusterableRemoteRef(203.231.15.125 weblogic.rmi.cluster.PrimarySecon
                   daryReplicaHandler@252fdf)/380
                   the_ejb2 = ClusterableRemoteRef(203.231.15.125 weblogic.rmi.cluster.PrimarySecon
                   daryReplicaHandler@6a0252)/381
                   I think the result should be like under one... isn't it??
                   the_ejb1 = ClusterableRemoteRef(203.231.15.167 weblogic.rmi.cluster.PrimarySecon
                   daryReplicaHandler@4695a6)/397
                   the_ejb2 = ClusterableRemoteRef(203.231.15.125 weblogic.rmi.cluster.PrimarySecon
                   daryReplicaHandler@6a0252)/381
              In this case i think the_ejb1 and the_ejb2 must have instance in different cluster
              server
              but they go to one server .
              3. If i don't use      "<home-call-router-class-name>common.QARouter</home-call-router-class-name>",
              "<replication-type>InMemory</replication-type>" then load balancing happen but
              there's no fail-over
              So how can i get load-balancing and fail over together??
              

  • Load-balancing and fail-over between web containers and EJB containers

    When web components and EJB components are run in different OC4J instances, can we achieve load-balancing and fail-over between web containers and EJB containers?
    null

    It looks like there is clustering, but not loadbalancing available for rmi
    from the rmi.xml configuration. The application will treat any ejbs on the
    cluster as one-to-one look-ups. Orion will go out and get the first ejb
    available on the cluster. See the docs on configuring rmi.xml (and also the
    note below).
    That is a kind-of failover, because if machine A goes down, and the
    myotherAejbs.jar are on machine B too, orion will go out and get the bean
    from machine B when it can't find machine A. But it doesn't go machine A
    then machine B for each remote instance of the bean. You could also specify
    the maximum number of instances of a bean, and as one machine gets "loaded",
    orion would go to the next available machine...but that's not really
    loadbalancing.
    That is, you can set up your web-apps with ejbs, but let all of the ejbs be
    remote="true" in the orion-application.xml file:
    <?xml version="1.0"?>
    <!DOCTYPE orion-application PUBLIC "-//Evermind//DTD J2EE Application
    runtime 1.2//EN" "http://www.orionserver.com/dtds/orion-application.dtd">
    <orion-application deployment-version="1.5.2">
    <ejb-module remote="true" path="myotherAejbs.jar" />
    <ejb-module remote="true" path="myotherBejbs.jar" />
    <ejb-module remote="true" path="myotherCejbs.jar" />
    &ltweb-module id="mysite" path="mysite.war" />
    ... other stuff ...
    </orion-application>In the rmi.xml you would define your clustering:
    <cluster host="230.0.0.1" id="123" password="123abc" port="9127"
    username="cluster-user" />
    Tag that is defined if the application is to be clustered. Used to set up
    a local multicast cluster. A username and password used for the servers to
    intercommunicate also needs to be specified.
    host - The multicast host/ip to transmit and receive cluster data on. The
    default is 230.0.0.1.
    id - The id (number) of this cluster node to identify itself with in the
    cluster. The default is based on local machine IP.
    password - The password configured for cluster access. Needs to match that
    of the other nodes in the cluster.
    port - The port to transmit and receive cluster data on. The default is
    9127.
    username - The username configured for cluster access. Needs to match that
    of the other nodes in the cluster.

  • Ias support for EJB, JSP/servlets,JDBC, connection pooling, XML, SOAP, load balancing etc

    Please let me know where I can find more information regarding iPlanet usage/deployment/configuring/tuning etc for support of technologies - like EJB, JSP/servlets, JDBC, connection pooling, XML, load balancing, JDBC & Transactions
    (I have already read the 'Getting Started with the iPlanet Application Server' part five and six - http://developer.iplanet.com/appserver/testdrive/partfive.jsp and partsix.jsp)(I am using the ias testdrive version).

    Hi,
    It's difficult to explain unless the J2EE architecture is understood. Also, explaining things like load balancing, Transactions, tuning, are bit vague and could blow the disk space of this site.
    To get started, the best way is to test the sample applications and the best part is you don't require internet connection to follow each steps. Install iWS and iAS, open browser, type in http://hostname:port/ias-samples/index.html. You can find links to the sample applications bundled. Please follow the steps given on deploying the application. This will enable you to a higher level.
    Regards
    Ganesh .R
    Developer Technical Support
    Sun Microsystems
    http://www.sun.com/developers/support

  • Disabling load balancing in WebSphere

    Hello,
    We've come across this problem just after we deployed our application to a clustered environment (probably a short sight on our part while designing). This is our situation:
    Environment: WebSphere 6.1, EJB 2.1
    Problem: We use the EJB Timer service for executing some business logic periodically with in our stateless session bean application. We have multiple timers within the same EJB that do stuff dynamically with the same code based on the parameters. However, we don't want the timers to come up automatically when the EJB application (like doing it with in contextInitialized) comes up because we want to bring the timers up and down in a more controlled fashion (more of a business requirement) and so we expose the startTimer and stopTimer methods in our EJB, and we invoke those methods from scripts outside of the WebSphere context as and when needed. This model has worked perfectly in a stand-alone environment. When we switched to our clustered UAT environment and started testing, that's when we got this reality check.
    Our cluster consists of 2 nodes, with 4 clones per node, and our middle ware team worked on the horizontal scaling in this environment. So when we try to invoke the startTimer in each of these node clones, it automatically goes to a random clone, not necessarily the one that we are trying to invoke on. And the same happens when we are trying to stop the timer, it tries to stop it on a random clone and the timer might not even be up on the clone it is trying to stop.
    So my short question: is there any way to force the EJB invocation to go to a particular clone? In other words, can we disable this whole horizontal scaling and just let it go to the clone we want (not let Websphere come in between with its "smart" load balancing) in our request? Something like a magic parameter that can be passed to the java command while invoking the EJB?
    This might sound "impossible" to do it that way and probably better to look at other ways, but we are just looking for something that will not significantly change our architecture at this point in the game.
    Thanks in advance!

    Answer to my question: http://ieoc.com/forums/p/26385/218976.aspx#218976

  • Https through load balancer breaks declarative security

    Hello,
    My desired setup is for a Jboss cluster serving requests behind a load balancer. Also I intend to use declarative security on the deployed units and have ssl client side authentication.
    I need someone to please confirm/deny the following statements:
    1) ssl has to be negotiated by the load balancer, whether hardware or software based (apache with mod_proxy/mod_jk).
    2) if using apache with mod_jk it is possible to configure it to send the client side authentication details (certificate) in such a way that jboss may enforce declarative authorization as if it had done the authentication itself. This also means that the programatic means to get the authenticated user identity described in the ejb and servlet specs will still work.
    3) there is no hardware load balancer that supports the behavior described in 2), which means that with a hardware load balancer it is impossible to use declarative authorization enforcement.
    After a whole lot testing and digging up for info, I'm quite desperate to solve this question, so if someone could help me I would be most thankfull.
    Nuno

    After further research, I think the best course of action will be to create a VLAN for the zone behind the BigIP and then create the corresponding interface in the vlan and zone. Using this links as my references in case anyone is interested. I'll post what I come up with.
    https://blogs.oracle.com/stw/entry/using_ip_instances_with_vlans
    https://blogs.oracle.com/stw/entry/solaris_zones_and_networking_common
    http://docs.oracle.com/cd/E19253-01/816-4554/816-4554.pdf # AdministeringVirtualLocalAreaNetworks
    http://docs.oracle.com/cd/E19053-01/ldoms.mgr11/820-4913-10/820-4913-10.pdf # Assign VLANs to a Virtual Switch and Virtual
    Network Device

  • Load balancing for JSPs and servlets

    Hi:
              I am using IIS as the proxy server, with the WLS plug-in, to a WLS
              cluster. This provides round robin load balancing just fine. Will it
              provide weight based load balancing if I set 'weblogic.system.weight'
              differently on each server, or is that not relevant for clustering JSPs
              and servlets?
              Sincerely,
              Ashish
              

    Currently the plugins ( for NES, IIS and Apache) just use the round robin
              algorithm. the property
              weblogic.system.weight is used only be weblogic's replica aware clusterable
              RMI/EJB stubs.
              To use this property for your JSP/Servlet load balancing you have to use
              weblogic server as proxy fron-ending your weblogic cluster.
              --Viresh Garg
              Ashish Vimal wrote:
              > Hi:
              > I am using IIS as the proxy server, with the WLS plug-in, to a WLS
              > cluster. This provides round robin load balancing just fine. Will it
              > provide weight based load balancing if I set 'weblogic.system.weight'
              > differently on each server, or is that not relevant for clustering JSPs
              > and servlets?
              > Sincerely,
              > Ashish
              

  • Load balancing with JSP

    Anyone and everyone,
    When configuring load balancing with Weblogic clusters, does load
    balancing take effect for all services or just EJB and RMI? Or another
    way of saying the same thing, can I setup weighted load balancing for
    the JSP engines across 2 weblogic servers.
    Thanks in advance,
    Mike

    The load-balancing documentation you read describing the different algorithms only applies to RMI stubs (e.g., EJB clients). Please see http://www.weblogic.com/docs51/cluster/concepts.html#1026091 for a description of how load-balancing/clustering works with servlets/JSPs.
    The short answer is that in using servlet clustering, most people want/need/use in-memory replication for HttpSession objects. In WLS 5.1 (and before), in-memory replication requires one or more proxy servers be set-up in front of the cluster. Typically, most people use something like BigIP to load-balance
    across the proxy servers and let the weblogic plug-in for the proxy server handle the routing to the cluster. The plug-in uses round-robin until an HttpSession is established for a user, then it always tries to route to the server where the user's session is located.
    Hope this helps,
    Robert
    Brian Lin wrote:
    All,
    I have a quesiton here regarding load balancing with DNS round robin. As of Chapter Adminstration of Clustering Weblogic server, Weblogic can be configured to balance by weight. How about Weblogic handle weight based balancing after DNS round robin ip response? or just can choose one way instead of both?
    What's the big difference between choosing BigIP and software balancing (WL)?
    Brian
    "Wei Guan" <[email protected]> wrote:
    I don't think you can configure this load balancing in weblogic in current
    release. However, if you have Big-IP or LocalDireoctr, you can set up
    weighted load-balancing there. Otherwise, weblogic proxy will use DNS round
    robin to do the load-balancing between JSP engins.
    My 2 cents.
    Cheers - Wei
    Michael Yakimisky <[email protected]> wrote in message
    news:[email protected]...
    Anyone and everyone,
    When configuring load balancing with Weblogic clusters, does load
    balancing take effect for all services or just EJB and RMI? Or another
    way of saying the same thing, can I setup weighted load balancing for
    the JSP engines across 2 weblogic servers.
    Thanks in advance,
    Mike

  • Load Balancing cockpit error

              We are testing clustering and load balancing using WLS 6SP1. We have found that
              the fail over works fine (i.e. we kill a server and the next call is invoked on
              another server). However, we find that all calls (modulo failover) always go to
              the same server. We expected to get round-robin for each home access. I've attached
              the config.xml and deployment descriptors. What am I missing here? Is there anything
              special I should be doing code wise?
              BTW: All calls are going to a stateless session bean.
              Regards,
              Andy
              [config.zip]
              

              Viresh Garg <[email protected]> wrote:
              >The attached config.zip seems to be corrupted. I can't download it.
              Wierd, I've just managed to download it. Anyway, I'll paste the
              contents into the text below.
              >
              >I am assuming that you are using a JAVA client. Could you describe your
              >test case to
              >test the load balancing between home methods of EJB ( what kind of EJB??)
              We have a stateless session bean. At each request we use JNDI to
              obtain a handle to a stateless session bean. We invoke an
              operation on it and then call remove on the stateless session
              bean. We run several of these clients (Java clients) and observe
              the system load and network traffic. We see that network traffic
              is almost minimal and system load on the "other" server is non-
              existent. We know that other server can satisfy calls to the
              stateless session bean because fail over (between calls) works
              correctly. I'm sure we are doing something daft, but I can't spot it.
              --------------------- config.xml ---------------------------
              <?xml version="1.0" encoding="UTF-8"?>
              <!--If your domain is active, please do not edit the config.xml file. Any changes
              made to that file while the domain is active will not have any effect on the domain's
              configuration and are likely to be lost. If your domain is inactive, you may edit
              this file with an XML editor. If you do so, please refer to the configuration
              documentation at http://edocs.bea.com/wls/docs60/adminguide/config_xml.html.
              In general, we recommend that changes to your configuration file be made through
              the Administration Console.-->
              <Domain Name="myDomain">
              <Security Name="petstore"
              PasswordPolicy="wl_default_password_policy" Realm="myRealm"/>
              <Application Name="wl_management_internal2" Path="C:\bea\wlserver6.0sp1\config\tmp">
              <WebAppComponent Name="wl_management_internal2"
              Targets="petstoreServer" URI="wl_management_internal2.war"/>
              </Application>
              <PasswordPolicy Name="wl_default_password_policy"/>
              <Server Cluster="PetStoreCluster" ClusterWeight="80"
              IIOPEnabled="false" JavaCompiler="C:\bea\jdk130/bin/javac"
              ListenAddress="194.152.80.29" ListenPort="7001" Machine="ROWAN"
              Name="petstoreServer" NativeIOEnabled="false"
              RootDirectory="C:\bea\wlserver6.0sp1" StdoutDebugEnabled="true"
              StdoutEnabled="true" StdoutSeverityLevel="64"
              ThreadPoolSize="15" TransactionLogFilePrefix="config/myDomain/logs/">
              <Log FileName="./config/myDomain/logs/weblogic.log" Name="petstoreServer"/>
              <ServerDebug DebugAbbreviation="false" DebugCluster="true"
              DebugClusterAnnouncements="true"
              DebugClusterFragments="true" DebugClusterHeartbeats="true"
              DebugConnection="true" DebugEJB="true" DebugEJBCache="true"
              DebugEJBCalls="false" DebugEJBDeployment="true"
              DebugEJBFreepool="true" DebugEJBLocking="true"
              DebugEJBPersistence="true" DebugEJBSecurity="true"
              DebugEventManager="true" DebugFailOver="true"
              DebugHttp="true" DebugJMSBackEnd="true" DebugJMSBoot="true"
              DebugJMSCommon="true" DebugJMSConfig="true"
              DebugJMSDurableSubscribers="true" DebugJMSFrontEnd="true"
              DebugJMSJDBCScavengeOnFlush="true" DebugJMSLocking="true"
              DebugJMSStore="true" DebugJMSXA="true" DebugJNDI="true"
              DebugJNDIFactories="true" DebugJNDIResolution="false"
              DebugLoadBalancing="true" DebugMessaging="true"
              DebugRC4="true" DebugRSA="true" DebugReplication="true"
              DebugReplicationDetails="true" DebugRouting="true"
              DebugSSL="true" DebugSecurityPasswordPolicy="true"
              DebugSecurityRealm="true" DebugTunnelingConnection="true"
              DebugTunnelingConnectionTimeout="true"
              DebugURLResolution="true" JDBCConn="true" JDBCSQL="true"
              JTA2PC="true" JTAAPI="true" JTAJDBC="true"
              JTAPropagate="true" JTARMI="true" JTARecovery="true"
              JTATLOG="true" JTAXA="true" ListenThreadDebug="true"
              LogDGCStatistics="true" MagicThreadDumpBackToSocket="false"
              MagicThreadDumpEnabled="false"
              MagicThreadDumpFile="debugMagicThreadDumpFile"
              MagicThreadDumpHost="localhost" Name="petstoreServer"/>
              <SSL CertificateCacheSize="3" Enabled="true" ListenPort="7002"
              Name="petstoreServer"
              ServerCertificateChainFileName="./config/myDomain/ca.pem"
              ServerCertificateFileName="./config/myDomain/democert.pem"
              ServerKeyFileName="./config/myDomain/demokey.pem" TrustedCAFileName="./config/myDomain/ca.pem"/>
              <WebServer DefaultWebApp="tour"
              LogFileName="./config/myDomain/logs/access.log"
              LoggingEnabled="true" Name="petstoreServer"/>
              <KernelDebug Name="petstoreServer"/>
              </Server>
              <Application Name="wl_management_internal1" Path="C:\bea\wlserver6.0sp1\config\tmp">
              <WebAppComponent Name="wl_management_internal1"
              Targets="petstoreServer" URI="wl_management_internal1.war"/>
              </Application>
              <Application Deployed="true" Name="tour" Path="C:\bea\wlserver6.0sp1\config\myDomain\applications">
              <WebAppComponent Name="tour" Targets="petstoreServer" URI="tour.war"/>
              </Application>
              <FileRealm Name="myFileRealm"/>
              <Security Name="myDomain"
              PasswordPolicy="wl_default_password_policy" Realm="wl_default_realm"/>
              <Application Deployed="true" Name="monitorApp1_1" Path="C:\bea\wlserver6.0sp1\config\myDomain\applications\monitorApp1_1.ear">
              <EJBComponent Name="monitorBeans1_1" Targets="PetStoreCluster" URI="monitorBeans1_1.jar"/>
              <WebAppComponent Name="monitorClient1_1"
              Targets="PetStoreCluster" URI="monitorClient1_1.war"/>
              </Application>
              <ApplicationManager Name="petstore"/>
              <FileRealm Name="wl_default_file_realm"/>
              <JDBCConnectionPool CapacityIncrement="1"
              DriverName="com.inet.tds.TdsDriver" InitialCapacity="1"
              JDBCXADebugLevel="0" LoginDelaySeconds="0" MaxCapacity="10"
              Name="monitorSimplePool"
              Properties="sql7=true;user=sa;port=1433;password=;url=jdbc:inetdae7:194.152.80.29;host=194.152.80.29;database=poc3a"
              RefreshMinutes="0" ShrinkPeriodMinutes="15"
              ShrinkingEnabled="true" SupportsLocalTransaction="false"
              Targets="PetStoreCluster" TestConnectionsOnRelease="false"
              TestConnectionsOnReserve="false" URL="jdbc:inetdae7:194.152.80.29"/>
              <Machine Name="ROWAN"/>
              <Log FileName="./config/myDomain/logs/wl-domain.log" Name="petstore"/>
              <Server AcceptBacklog="50" AdministrationPort="0"
              Cluster="PetStoreCluster" ClusterWeight="100"
              CompleteHTTPMessageTimeout="480"
              CompleteIIOPMessageTimeout="480" CompleteT3MessageTimeout="480"
              ConsoleInputEnabled="false" DGCIdlePeriodsUntilTimeout="2"
              DefaultIIOPPassword="guest" DefaultIIOPUser="guest"
              DefaultProtocol="t3" DefaultSecureProtocol="t3s"
              EnabledForDomainLog="true" HelpPageURL="/docs/adminhelp/"
              HttpdEnabled="true" IIOPEnabled="false"
              IdlePeriodsUntilTimeout="4" InstrumentStackTraceEnabled="false"
              JDBCLoggingEnabled="false"
              JMSDefaultConnectionFactoriesEnabled="true"
              JavaCompiler="C:\bea\jdk130/bin/javac"
              ListenAddress="194.152.80.1" ListenPort="7001"
              ListenThreadStartDelaySecs="0"
              LogRemoteExceptionsEnabled="false" LoginTimeout="1000"
              LoginTimeoutMillis="5000" Machine="MOUSE"
              MaxHTTPMessageSize="10000000" MaxIIOPMessageSize="10000000"
              MaxT3MessageSize="10000000" Name="petstoreServerClone"
              NativeIOEnabled="false" NetworkClassLoadingEnabled="false"
              PeriodLength="60000" ResponseTimeout="0"
              ReverseDNSAllowed="false" RjvmIdleTimeout="0"
              RootDirectory="C:\bea\wlserver6.0sp1"
              SocketReaderTimeoutMaxMillis="1000"
              SocketReaderTimeoutMinMillis="100" StdoutDebugEnabled="true"
              StdoutEnabled="true" StdoutSeverityLevel="64"
              ThreadPoolPercentSocketReaders="33" ThreadPoolSize="15"
              TransactionLogFilePrefix="config/myDomain/logs/"
              TunnelingClientPingSecs="45" TunnelingClientTimeoutSecs="40"
              TunnelingEnabled="false" WorkspaceShowUserKeysOnly="false"
              ZACEnabled="true" ZACPublishRoot="exports">
              <WebServer ClusteringEnabled="false" DefaultWebApp="tour"
              HttpsKeepAliveSecs="60" KeepAliveEnabled="true"
              KeepAliveSecs="30" LogFileBufferKBytes="8"
              LogFileFlushSecs="60" LogFileFormat="common"
              LogFileName="./config/myDomain/logs/access.log"
              LogRotationPeriodMins="2147483647" LogRotationType="size"
              LoggingEnabled="true" MaxLogFileSizeKBytes="0"
              MaxPostSize="-1" MaxPostTimeSecs="-1"
              Name="petstoreServerClone" PostTimeoutSecs="0" WAPEnabled="false"/>
              <SSL CertificateCacheSize="3" ClientCertificateEnforced="false"
              Enabled="true" ExportKeyLifespan="500" HandlerEnabled="true"
              KeyEncrypted="false" ListenPort="8002"
              LoginTimeoutMillis="25000" MDAcceleration="Java"
              Name="petstoreServerClone" PeerValidationEnforced="0"
              RC4Acceleration="Native/Java" RSAAcceleration="Native/Java"
              ServerCertificateChainFileName="./config/myDomain/ca.pem"
              ServerCertificateFileName="./config/myDomain/democert.pem"
              ServerKeyFileName="./config/myDomain/demokey.pem"
              TrustedCAFileName="./config/myDomain/ca.pem" UseJava="true"/>
              <Log FileCount="7" FileMinSize="500"
              FileName="./config/myDomain/logs/weblogic_clone.log"
              FileTimeSpan="24" Name="petstoreServerClone"
              NumberOfFilesLimited="false" RotationType="none"/>
              <KernelDebug Name="petstoreServerClone"/>
              <ServerDebug DebugAbbreviation="false" DebugCluster="true"
              DebugClusterAnnouncements="true"
              DebugClusterFragments="true" DebugClusterHeartbeats="true"
              DebugConnection="true" DebugEJB="true" DebugEJBCache="true"
              DebugEJBCalls="false" DebugEJBDeployment="true"
              DebugEJBFreepool="true" DebugEJBLocking="true"
              DebugEJBPersistence="true" DebugEJBSecurity="true"
              DebugEventManager="true" DebugFailOver="true"
              DebugHttp="true" DebugJMSBackEnd="true" DebugJMSBoot="true"
              DebugJMSCommon="true" DebugJMSConfig="true"
              DebugJMSDurableSubscribers="true" DebugJMSFrontEnd="true"
              DebugJMSJDBCScavengeOnFlush="true" DebugJMSLocking="true"
              DebugJMSStore="true" DebugJMSXA="true" DebugJNDI="true"
              DebugJNDIFactories="true" DebugJNDIResolution="false"
              DebugLoadBalancing="true" DebugMessaging="true"
              DebugRC4="true" DebugRSA="true" DebugReplication="true"
              DebugReplicationDetails="true" DebugRouting="true"
              DebugSSL="true" DebugSecurityPasswordPolicy="true"
              DebugSecurityRealm="true" DebugTunnelingConnection="true"
              DebugTunnelingConnectionTimeout="true"
              DebugURLResolution="true" JDBCConn="true" JDBCSQL="true"
              JTA2PC="true" JTAAPI="true" JTAJDBC="true"
              JTAPropagate="true" JTARMI="true" JTARecovery="true"
              JTATLOG="true" JTAXA="true" ListenThreadDebug="true"
              LogDGCStatistics="false" MagicThreadDumpBackToSocket="false"
              MagicThreadDumpEnabled="false"
              MagicThreadDumpFile="debugMagicThreadDumpFile"
              MagicThreadDumpHost="localhost" Name="petstoreServerClone"/>
              </Server>
              <Log FileName="myDomain.log" Name="myDomain"/>
              <JTA Name="myDomain"/>
              <Machine Name="MOUSE"/>
              <ApplicationManager Name="myDomain"/>
              <Realm FileRealm="myFileRealm" Name="myRealm"/>
              <Realm FileRealm="wl_default_file_realm" Name="wl_default_realm"/>
              <Cluster ClusterAddress="194.152.80.1,194.152.80.29:7001"
              DefaultLoadAlgorithm="round-robin"
              MulticastAddress="224.10.10.1" Name="PetStoreCluster" ServiceAgeThresholdSeconds="180"/>
              <Application Name="console" Path="C:\bea\wlserver6.0sp1\config\examples\applications">
              <WebAppComponent Name="console" Targets="petstoreServer" URI="console.war"/>
              </Application>
              <JDBCDataSource JNDIName="monitorSimplePool"
              Name="monitorSimpleDB_1" PoolName="monitorSimplePool" Targets="PetStoreCluster"/>
              </Domain>
              ---------------------- ejb-jar.xml -------------------------
              <?xml version="1.0"?>
              <!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans
              1.1//EN' 'http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd'>
              <ejb-jar>
              <enterprise-beans>
              <entity>
              <ejb-name>ContractCMP</ejb-name>
              <home>com.liffe.monitor.contractonly.server.cmp.ContractCMPHome</home>
              <remote>com.liffe.monitor.contractonly.server.Contract</remote>
              <ejb-class>com.liffe.monitor.contractonly.server.cmp.ContractCMPBean</ejb-class>
              <persistence-type>Container</persistence-type>
              <prim-key-class>com.liffe.monitor.general.ContractPK</prim-key-class>
              <reentrant>False</reentrant>
              <cmp-field>
              <field-name>contractCode</field-name>
              </cmp-field>
              <cmp-field>
              <field-name>tradeVolume</field-name>
              </cmp-field>
              <cmp-field>
              <field-name>suspended</field-name>
              </cmp-field>
              </entity>
              <entity>
              <ejb-name>ContractBMP</ejb-name>
              <home>com.liffe.monitor.contractonly.server.bmp.ContractBMPHome</home>
              <remote>com.liffe.monitor.contractonly.server.Contract</remote>
              <ejb-class>com.liffe.monitor.contractonly.server.bmp.ContractBMPBean</ejb-class>
              <persistence-type>Bean</persistence-type>
              <prim-key-class>com.liffe.monitor.general.ContractPK</prim-key-class>
              <reentrant>False</reentrant>
              </entity>
              <session>
              <ejb-name>ContractMonitor</ejb-name>
              <home>com.liffe.monitor.contractonly.server.ContractMonitorHome</home>
              <remote>com.liffe.monitor.contractonly.server.ContractMonitor</remote>
              <ejb-class>com.liffe.monitor.contractonly.server.ContractMonitorBean</ejb-class>
              <session-type>Stateful</session-type>
              <transaction-type>Container</transaction-type>
              <ejb-ref>
              <ejb-ref-name>ejb/ContractCMPHome</ejb-ref-name>
              <ejb-ref-type>Entity</ejb-ref-type>
              <home>com.liffe.monitor.contractonly.server.cmp.ContractCMPHome</home>
              <remote>com.liffe.monitor.contractonly.server.Contract</remote>
              </ejb-ref>
              <ejb-ref>
              <ejb-ref-name>ejb/ContractBMPHome</ejb-ref-name>
              <ejb-ref-type>Entity</ejb-ref-type>
              <home>com.liffe.monitor.contractonly.server.bmp.ContractBMPHome</home>
              <remote>com.liffe.monitor.contractonly.server.Contract</remote>
              </ejb-ref>
              </session>
              <session>
              <ejb-name>InjectorTarget</ejb-name>
              <home>com.liffe.monitor.injector.server.InjectorTargetHome</home>
              <remote>com.liffe.monitor.injector.server.InjectorTarget</remote>
              <ejb-class>com.liffe.monitor.injector.server.InjectorTargetBean</ejb-class>
              <session-type>Stateless</session-type>
              <transaction-type>Container</transaction-type>
              <ejb-ref>
              <ejb-ref-name>ejb/ContractCMPHome</ejb-ref-name>
              <ejb-ref-type>Entity</ejb-ref-type>
              <home>com.liffe.monitor.contractonly.server.cmp.ContractCMPHome</home>
              <remote>com.liffe.monitor.contractonly.server.Contract</remote>
              </ejb-ref>
              <ejb-ref>
              <ejb-ref-name>ejb/ContractBMPHome</ejb-ref-name>
              <ejb-ref-type>Entity</ejb-ref-type>
              <home>com.liffe.monitor.contractonly.server.bmp.ContractBMPHome</home>
              <remote>com.liffe.monitor.contractonly.server.Contract</remote>
              </ejb-ref>
              </session>
              </enterprise-beans>
              <assembly-descriptor>
              <method-permission>
              <role-name>everyone</role-name>
              <method>
              <ejb-name>InjectorTarget</ejb-name>
              <method-name>*</method-name>
              </method>
              </method-permission>
              <container-transaction>
              <method>
              <ejb-name>ContractCMP</ejb-name>
              <method-intf>Remote</method-intf>
              <method-name>*</method-name>
              </method>
              <trans-attribute>Required</trans-attribute>
              </container-transaction>
              <container-transaction>
              <method>
              <ejb-name>ContractMonitor</ejb-name>
              <method-intf>Remote</method-intf>
              <method-name>*</method-name>
              </method>
              <trans-attribute>Required</trans-attribute>
              </container-transaction>
              <container-transaction>
              <method>
              <ejb-name>InjectorTarget</ejb-name>
              <method-name>*</method-name>
              </method>
              <trans-attribute>Required</trans-attribute>
              </container-transaction>
              </assembly-descriptor>
              </ejb-jar>
              ------------------- weblogic-ejb-jar.xml -----------------
              <?xml version="1.0"?>
              <!DOCTYPE weblogic-ejb-jar PUBLIC '-//BEA Systems, Inc.//DTD WebLogic 5.1.0 EJB//EN'
              'http://www.bea.com/servers/wls510/dtd/weblogic-ejb-jar.dtd'>
              <weblogic-ejb-jar>
              <weblogic-enterprise-bean>
              <ejb-name>ContractCMP</ejb-name>
              <caching-descriptor>
              <max-beans-in-cache>1000</max-beans-in-cache>
              </caching-descriptor>
              <persistence-descriptor>
              <persistence-type>
              <type-identifier>WebLogic_CMP_RDBMS</type-identifier>
              <type-version>5.1.0</type-version>
              <type-storage>META-INF/weblogic-cmp-rdbms-jar-contractonly-cmp.xml</type-storage>
              </persistence-type>
              <persistence-use>
              <type-identifier>WebLogic_CMP_RDBMS</type-identifier>
              <type-version>5.1.0</type-version>
              </persistence-use>
              </persistence-descriptor>
              <clustering-descriptor>
              <home-is-clusterable>true</home-is-clusterable>
              <home-load-algorithm>random</home-load-algorithm>
              </clustering-descriptor>
              <transaction-descriptor>
              <trans-timeout-seconds>15</trans-timeout-seconds>
              </transaction-descriptor>
              <jndi-name>com.liffe.monitor.contractonly.server.cmp.ContractCMPHome</jndi-name>
              <transaction-isolation>
              <isolation-level>TRANSACTION_READ_COMMITTED</isolation-level>
              <method>
              <ejb-name>ContractCMP</ejb-name>
              <method-intf>Remote</method-intf>
              <method-name>*</method-name>
              </method>
              </transaction-isolation>
              </weblogic-enterprise-bean>
              <weblogic-enterprise-bean>
              <ejb-name>ContractBMP</ejb-name>
              <caching-descriptor>
              <max-beans-in-cache>1000</max-beans-in-cache>
              </caching-descriptor>
              <clustering-descriptor>
              <home-is-clusterable>true</home-is-clusterable>
              <home-load-algorithm>random</home-load-algorithm>
              </clustering-descriptor>
              <transaction-descriptor>
              <trans-timeout-seconds>15</trans-timeout-seconds>
              </transaction-descriptor>
              <jndi-name>com.liffe.monitor.contractonly.server.bmp.ContractBMPHome</jndi-name>
              <transaction-isolation>
              <isolation-level>TRANSACTION_READ_COMMITTED</isolation-level>
              <method>
              <ejb-name>ContractBMP</ejb-name>
              <method-intf>Remote</method-intf>
              <method-name>*</method-name>
              </method>
              </transaction-isolation>
              </weblogic-enterprise-bean>
              <weblogic-enterprise-bean>
              <ejb-name>ContractMonitor</ejb-name>
              <caching-descriptor>
              <max-beans-in-cache>100</max-beans-in-cache>
              </caching-descriptor>
              <clustering-descriptor>
              <home-is-clusterable>true</home-is-clusterable>
              <home-load-algorithm>round-robin</home-load-algorithm>
              </clustering-descriptor>
              <reference-descriptor>
              <ejb-reference-description>
              <ejb-ref-name>ejb/ContractCMPHome</ejb-ref-name>
              <jndi-name>com.liffe.monitor.contractonly.server.cmp.ContractCMPHome</jndi-name>
              </ejb-reference-description>
              <ejb-reference-description>
              <ejb-ref-name>ejb/ContractBMPHome</ejb-ref-name>
              <jndi-name>com.liffe.monitor.contractonly.server.bmp.ContractBMPHome</jndi-name>
              </ejb-reference-description>
              </reference-descriptor>
              <jndi-name>com.liffe.monitor.contractonly.server.ContractMonitorHome</jndi-name>
              </weblogic-enterprise-bean>
              <weblogic-enterprise-bean>
              <ejb-name>InjectorTarget</ejb-name>
              <caching-descriptor>
              <max-beans-in-free-pool>50</max-beans-in-free-pool>
              </caching-descriptor>
              <clustering-descriptor>
              <home-is-clusterable>true</home-is-clusterable>
              <home-load-algorithm>round-robin</home-load-algorithm>
              </clustering-descriptor>
              <reference-descriptor>
              <ejb-reference-description>
              <ejb-ref-name>ejb/ContractCMPHome</ejb-ref-name>
              <jndi-name>com.liffe.monitor.contractonly.server.cmp.ContractCMPHome</jndi-name>
              </ejb-reference-description>
              <ejb-reference-description>
              <ejb-ref-name>ejb/ContractBMPHome</ejb-ref-name>
              <jndi-name>com.liffe.monitor.contractonly.server.bmp.ContractBMPHome</jndi-name>
              </ejb-reference-description>
              </reference-descriptor>
              <jndi-name>ejb/InjectorTargetHome</jndi-name>
              </weblogic-enterprise-bean>
              </weblogic-ejb-jar>
              ---------------------- weblogic-cmp-.... ---------------------
              <!DOCTYPE weblogic-rdbms-bean PUBLIC
              '-//BEA Systems, Inc.//DTD WebLogic 5.1.0 EJB RDBMS Persistence//EN'
              'http://www.bea.com/servers/wls510/dtd/weblogic-rdbms-persistence.dtd'>
              <weblogic-rdbms-bean>
              <pool-name>monitorSimplePool</pool-name>
              <table-name>Contract</table-name>
              <attribute-map>
              <object-link>
              <bean-field>contractCode</bean-field>
              <dbms-column>contractCode</dbms-column>
              </object-link>
              <object-link>
              <bean-field>tradeVolume</bean-field>
              <dbms-column>tradeVolume</dbms-column>
              </object-link>
              <object-link>
              <bean-field>suspended</bean-field>
              <dbms-column>suspended</dbms-column>
              </object-link>
              </attribute-map>
              <finder-list>
              <finder>
              <method-name>findByGTVolume</method-name>
              <method-params>
              <method-param>int</method-param>
              </method-params>
              <finder-query><![CDATA[(> tradeVolume $0)]]></finder-query>
              </finder>
              <finder>
              <method-name>findAllContracts</method-name>
              <finder-query><![CDATA[(isNotNull contractCode)]]></finder-query>
              </finder>
              </finder-list>
              <options>
              <use-quoted-names>false</use-quoted-names>
              </options>
              </weblogic-rdbms-bean>
              

  • Load balancing MQ 7.0 Foreign JMS Server and Weblogic 10 MDBs?

    We have the following configuration and we are trying to troubleshoot what appears to be a load balancing issue.
    We have 3 Solaris servers. Each Solaris server has two Weblogic managed servers running on it. There are a total of 6 managed servers in the Weblogic cluster.
    MQ Series 7.0 is also installed on each Solaris server. The MQ queue managers are in a MQ cluster. Each queue manager has the same queues defined.
    We have a foreign JMS Server configured on Weblogic that has destinations and a connection factory defined. There aren't many configuration options available for the connection factory. The destinations are bound to the queues defined on MQ using the MQ bindings file.
    The MQ bindings file was generated using the TRANSPORT(BIND) mechanism. Each bindings file points to the queue manager running on that machine. So the 2 managed servers running on one machine are accepting messages from the queue manager on that machine.
    The MDB's listenning for messages on the MQ queues are configured as follows in the weblogic-ejb-jar.xml:
         <max-beans-in-free-pool>16</max-beans-in-free-pool>
    We also created a custom work manager with min threads constraint=5 and max threads constraint=16. The dispatch-policy of all the MDBs is set to the custom work manager.
    The open input count on each MQ queue managers shows up as 32 which is expected.
    The default load algorithm on the cluster is round-robin.
    When we run a load test (injecting 40 messages per second on one MQ queue), we notice that one managed server ends up being significantly loaded than the other. Each MQ queue manager in the MQ cluster receives approximately the same number of messages in the load test. But it seems like one managed server is preferred over the other in Weblogic.
    What can be done to equally balance the load among the two managed servers on each Solaris server?
    Thanks for the help.

    Load balancing generally applies at determing how many consumer threads has to be created on each of the clustered queue instance. In that sense you have achieved perfect load balancing as your queue instances has the same no of consumer threads.
    Once you have set 'x' consumer threads on a queue, it is upto messaging provider to decide which thread to deliver a particular message and you will hardly have any control over this. Since your 32 threads are listening on the same queue, MQ can select any thread for delivering the message and the behaviour could be non deterministic.
    One option to change your design is to have a dispacther mdb which picks the messages off the MQ and then routes to a weblogic distributed destination and you can have your core mdb which does all processing listen to this distributed destination. You can enable load balancing when the disaptcher mdb routes the message to the distributed destination. Since dispatcher MDB is nothing more than a router, the unbalanced consumption off the MQ shouldn't seriously affect the server.

  • JMS Clustering : Load Balancing expected Behaviour

    Hi All,
              I have a Cluster with a 2 managed servers A and B . ConnectionFactory is deployed to the cluster and Server B hosts JMS Server.Destinations on the JMS Server are not distributed, but the JNDI Names of the same are replicated across the cluster.Both Load Balancing and server affinity are enabled on the connectionFactory(I hope these attributes are required only if the destinations are distributed).
              An application containing MDBs and EJBs are deployed to the cluster and onMessage MDB looks up for a Facade and makes calls on it.An external java client sets up the initialContext based on the cluster address and starts sending messages to the destination
              What should be the expected behaviour in this scenario ?According to my understanding,
              -Eventhough, the connectionFactory is deployed across the cluster, since the physical destinations are available only in the weblogic server hosting the JMS Server(Server B), the actual message handling(MDB invocation) would be done only here.
              -When the MDBs are invoked on serverB, it would performs a lookup for the Facade.Because of the colocation optimisation, the replica aware stub used would be the one in ServerB and henceforth all the method processing should be done on Server B.
              Is this correct ? But this would also mean that no load balancing would happen because of the colocation optimisation ? Do i need to use a distributed destination to enable load balancing in this scenario ?
              Any help would be greatly appreciated..
              thanks,
              Josh

    Hi All,
              I have a Cluster with a 2 managed servers A and B . ConnectionFactory is deployed to the cluster and Server B hosts JMS Server.Destinations on the JMS Server are not distributed, but the JNDI Names of the same are replicated across the cluster.Both Load Balancing and server affinity are enabled on the connectionFactory(I hope these attributes are required only if the destinations are distributed).
              An application containing MDBs and EJBs are deployed to the cluster and onMessage MDB looks up for a Facade and makes calls on it.An external java client sets up the initialContext based on the cluster address and starts sending messages to the destination
              What should be the expected behaviour in this scenario ?According to my understanding,
              -Eventhough, the connectionFactory is deployed across the cluster, since the physical destinations are available only in the weblogic server hosting the JMS Server(Server B), the actual message handling(MDB invocation) would be done only here.
              -When the MDBs are invoked on serverB, it would performs a lookup for the Facade.Because of the colocation optimisation, the replica aware stub used would be the one in ServerB and henceforth all the method processing should be done on Server B.
              Is this correct ? But this would also mean that no load balancing would happen because of the colocation optimisation ? Do i need to use a distributed destination to enable load balancing in this scenario ?
              Any help would be greatly appreciated..
              thanks,
              Josh

  • Load Balancing to 2 Instances in a 4-Tier System

    Problem:
              I need to load balance requests from a cluster of JRun JSP servers through
              an IP(IP2) to a set of servers on tier3 containing 2 instances per box, that
              are not clustered. I have used WLBS to proxy through IP2 to each machine in
              tier 3. Heres the kicker -- I can't figure out how to proxy to 2 instances
              on each of the dual processor Win2k boxes. Does anyone know? I have 2 IPs on
              each box but WLBS won't proxy to 2 IPs on the same box. I am looking for a
              software solution.
              Thanks,
              Mica Cooper
              Description of System:
              IP1
              Tier 1 ---- IIS for HTTP 4 Dual Win2K
              Tier 2 ---- JRun for JSP 4 Dual Win2K
              IP2
              Tier 3 ---- WL51 for EJB/JMS 3 Dual Win2K and 4 Solaris (10 instances)
              Tier 4 ---- MSSQL
              

    Cross posted. Reply in this thread:
    How to perform an RFC on all instances of an 4.6c system?

  • Load Balancing of 2-Tiered vs 3-Tiered Clustering

    Hi,
              I was looking at the cluster diagrams on the clustering page:
              http://www.weblogic.com/docs60/cluster/index.html
              And I can't help notice a slight descrepency between the diagram of a 2-Tier
              cluster (WL web cluster + WL app cluster) vs.a 3-Tier cluster (web
              proxy-plugin + WL web cluster + WL app cluster).
              In the 2-Tier diagram, the arrows going from the web nodes to the app nodes
              converges to a single point, indicating that there's load balancing of
              servlet calls to ejbs.
              In the 3-Tier diagram, the arrows from each web node point directly to an
              app node, which seems to indicate that there is a static one-to-one
              relationship, hence no load-balancing. Below the 3-Tier diagram, one of the
              described limitations of using standalone web server and proxy plug-ins is:
              a.. Limited Load Balancing Options: When you use proxy plug-ins or the
              HttpClusterServlet to access clustered servlets, the load balancing
              algorithm is limited to a simple round-robin strategy.
              I believe this is describe load balancing between the fire-wall and the
              proxy web servers. But what about the load balancing between the WL web
              servers and the app servers? Does it exist, or does one web server always
              assigned to one app server?
              Gene Chuang
              Join Kiko.com!
              

    Currently, we only support clusters within the same subnet, as most routers
              can't handle multicast traffic. We are considering designs to relax this
              restriction in a future release.
              -Don
              Cameron Purdy wrote:
              > > 3) In WLAS6.0, you can specify how to pick the secondary server. Most
              > > important of all, pick a secondary server which is on the different
              > physical
              > > box than primary.
              >
              > ... and if you are using two different physical networks, make sure it is on
              > the other physical network. Any hints on how to do that?
              >
              > --
              > Cameron Purdy
              > Tangosol, Inc.
              > http://www.tangosol.com
              > +1.617.623.5782
              > WebLogic Consulting Available
              >
              > "Wei Guan" <[email protected]> wrote in message
              > news:[email protected]...
              > > Here is my understanding:
              > > 1) Proxy will route new sessions based on round-robins. Old sessions will
              > > route to the primary server.
              > > 2) Primary server will pick the secondary server.
              > > 3) In WLAS6.0, you can specify how to pick the secondary server. Most
              > > important of all, pick a secondary server which is on the different
              > physical
              > > box than primary.
              > >
              > >
              > > --
              > > Hope it helps.
              > >
              > > Cheers - Wei
              > >
              > >
              > > "Cameron Purdy" <[email protected]> wrote in message
              > > news:[email protected]...
              > > > Is it true that the proxy can only use round-robin to load-balance the
              > WL
              > > > cluster? I understand that, once selected for a session, the proxy will
              > > > always route requests to the primary server specified in the cookie or
              > URL
              > > > (or secondary), but in the case that no primary or secondary has been
              > > > assigned, can the proxy pick a destination server (which I assume
              > becomes
              > > > the primary) using an algorithm such as "random" (which is theoretically
              > > > superior to round-robin over time)? Also, who picks the secondary
              > server?
              > > > Is it the primary or the proxy?
              > > >
              > > > --
              > > > Cameron Purdy
              > > > Tangosol, Inc.
              > > > http://www.tangosol.com
              > > > +1.617.623.5782
              > > > WebLogic Consulting Available
              > > >
              > > >
              > > > "Don Ferguson" <[email protected]> wrote in message
              > > > news:[email protected]...
              > > > > Hi, comments in line.
              > > > >
              > > > > Gene Chuang wrote:
              > > > > >
              > > > > > Hi,
              > > > > >
              > > > > > I was looking at the cluster diagrams on the clustering page:
              > > > > >
              > > > > > http://www.weblogic.com/docs60/cluster/index.html
              > > > > >
              > > > > > And I can't help notice a slight descrepency between the diagram of
              > a
              > > > 2-Tier
              > > > > > cluster (WL web cluster + WL app cluster) vs.a 3-Tier cluster (web
              > > > > > proxy-plugin + WL web cluster + WL app cluster).
              > > > > >
              > > > > > In the 2-Tier diagram, the arrows going from the web nodes to the
              > app
              > > > nodes
              > > > > > converges to a single point, indicating that there's load balancing
              > of
              > > > > > servlet calls to ejbs.
              > > > > >
              > > > > > In the 3-Tier diagram, the arrows from each web node point directly
              > to
              > > > an
              > > > > > app node, which seems to indicate that there is a static one-to-one
              > > > > > relationship, hence no load-balancing.
              > > > >
              > > > > This is just an artifact of the drawing, not of the architecture. The
              > > > same
              > > > > load balancing would be performed between the web and app tiers
              > > regardless
              > > > > of whether or not there is a front end web server.
              > > > >
              > > > > > Below the 3-Tier diagram, one of the
              > > > > > described limitations of using standalone web server and proxy
              > > plug-ins
              > > > is:
              > > > > >
              > > > > > a.. Limited Load Balancing Options: When you use proxy plug-ins or
              > the
              > > > > > HttpClusterServlet to access clustered servlets, the load balancing
              > > > > > algorithm is limited to a simple round-robin strategy.
              > > > > >
              > > > > > I believe this is describe load balancing between the fire-wall and
              > > the
              > > > > > proxy web servers. But what about the load balancing between the WL
              > > web
              > > > > > servers and the app servers? Does it exist, or does one web server
              > > > always
              > > > > > assigned to one app server?
              > > > >
              > > > > This is not describing the load balancing between the firewall and the
              > > > > proxy web servers; we do not control of how that is performed. It is
              > > > > describing the load balancing between the proxy servers and the web
              > > tier.
              > > > > The diagram should really show that more clearly, as was done in the
              > > > 2-tier
              > > > > example.
              > > > >
              > > > > -Don
              > > > >
              > > > > >
              > > > > > --
              > > > > > Gene Chuang
              > > > > > Join Kiko.com!
              > > >
              > > >
              > >
              > >
              

Maybe you are looking for