ResourceBundle loading algorithm.

Hi folks,
I do have a problem/question with the resource bundle loading algorithm.
Here is my setup:
I have written a taglib which retrieves the user locale from the request and returns a message in the user's language, if the resource bundle does not exist, English text should be returned.
Well, here is the problem:
Say the user sends pt_BR
JVM's locale is de_DE (Locale.getDefault())
The taglib is publicly available so I have no influence on the server/JVM locale.
Available are:
bundle.properties (contains English text)
bundle_de.properties (German strings)
Well, what happens is that no bundle_pt_br.properties is going to be found and the user receives the bundle_de.properties content.
The outcome is that the Portuguese speaker sees messages in German which is absolutely useless and undesired.
Is this really intended to happen in this algorithm, if yes, why? How can this be bridged?
The only solution I see is to check the bundle's locale against the locale I wanted to load.
Thanks,
Mike

I've checked the behavior from JDK 1.1 to JDK 7. All behaved the same: fallback to the de locale. IIRC, the ResourceBundle API doc was rewritten to reflect the actual behavior in JDK 1.3. But the behavior didn't change.
I don't know reasons why ResourceBundle.getBudle() was designed to fallback to the default locale, but a number of developers had complained about the behavior. That was one of the reasons that ResourceBundle.Control was introduced in JDK 6.
As Piet pointed out, you can subclass ResourceBundle.Control if you can use JDK6. There is convenience method ResourceBundle.Control.getNoFallbackControl() that returns a ResourceBundle.Control with which getBundle() doesn't fallback to the default locale. If you are using JDK 5.0 or earlier, the workaround would be to provide empty resource bundles for unsupported languages, like bundle_pt.properties.
HTH
Masayoshi

Similar Messages

  • Can ResourceBundle load .properties from files and .jar?

    Hi Guys,
    I'm trying to I18N an application with ResourceBundle.
    Suppose my class look like this:
    package pack;
    import java.util.ResourceBundle;
    public class MyClass {
        public static void main(String[] args) {
            ResourceBundle rb = ResourceBundle.getBundle("Language");
    }This would load the localized string from Language.properties
    And when I pack the class file and Language.properties into a jar. It works fine
    But what I tried to do is to make the ResourceBundle try to load from external file first
    before it load from the jar file so that if I have a new language file I can just drop in the
    NewLang.properties.
    Inside .jar file look like this
    /Language.properties
    /pack/MyClass.class
    /meta-inf/Manifest.mf
    I tried look into some forum and they suggest to include Class-Path in Manifest.mf file
    to include current path like this
    Class-Path: .
    But still, it didn't work. If I include .properties in .jar it will not look outside but if I didn't include
    any .properties it found a properties file.
    How can I achieve this ?

    Dave,
    I reckon you're on the right track... just have to figure out "what's the path to properties file"... I suspect you've got a context problem... not sure... I'm pretty new at this stuff myself.
    So, what's your development environment? O/S, IDE, app/web-server, etc.
    Cheers. Keith.

  • NullPointerException using weight based load algorithm?

              We're using WL451, on Solaris. We have two clusters, Cluster A (running
              servlets) and Cluster B (running EJB's).
              We've enabled weight-based load balancing on cluster B. Each machine
              has a weblogic.system.weight property defined.
              When running code on cluster A, we get frequent null pointer exceptions
              in Weblogic. Has anyone seen this?
              Wed Aug 30 17:11:54 EDT 2000 <E> [ShockExServlet] Unexpected failure:
              java.lang.NullPointerExceptio
              n. Exception: java.lang.NullPointerException
              java.lang.NullPointerException
              at weblogic.service.RichReplicaList.getMaxServerWeight(Compiled
              Code)
              at
              weblogic.service.WeightBasedReplicaHandler.chooseReplica(Compiled Code)
              at weblogic.service.BasicReplicaHandler.loadBalance(Compiled
              Code)
              at weblogic.service.BasicServiceStub._wl_loadBalance(Compiled
              Code)
              at
              weblogic.service.BasicServiceStub._wl_autoLoadBalance(Compiled Code)
              at
              com.shockmarket.ejb.ir.ShockInformationReceiverBeanEOImpl_ServiceStub.exOccurred(Compiled
              Code)
              at
              com.shockmarket.data.ShockInformationReceiverProxy.exOccurred(Compiled
              Code)
              at com.shockmarket.servlet.ShockExServlet.recordEx(Compiled
              Code)
              at com.shockmarket.servlet.ShockExServlet.emitHTML(Compiled
              Code)
              at com.shockmarket.servlet.ShockBaseServlet.sendHTML(Compiled
              Code)
              at com.shockmarket.servlet.ShockBaseServlet._jspService(Compiled
              Code)
              at com.shockmarket.servlet.ShockBaseServlet.doGet(Compiled Code)
              at javax.servlet.http.HttpServlet.service(Compiled Code)
              at javax.servlet.http.HttpServlet.service(Compiled Code)
              at
              weblogic.servlet.internal.ServletStubImpl.invokeServlet(Compiled Code)
              at
              weblogic.servlet.internal.ServletContextImpl.invokeServlet(Compiled
              Code)
              and
              Wed Aug 30 17:12:01 EDT 2000 <E>
              [UUID=prodweb2.shockmarket.com967669921432] [_RG] Failed processing
              form request. data = BH=foo&U=1. Exception:
              java.lang.NullPointerException
              java.lang.NullPointerException
              at
              weblogic.service.WeightBasedReplicaHandler.chooseReplica(Compiled Code)
              at weblogic.service.BasicReplicaHandler.loadBalance(Compiled
              Code)
              at weblogic.service.BasicServiceStub._wl_loadBalance(Compiled
              Code)
              at
              weblogic.service.BasicServiceStub._wl_autoLoadBalance(Compiled Code)
              at
              com.shockmarket.ejb.subscriber.ShockSubscriberBeanHomeImpl_ServiceStub.findByBrIDB
              rHandle(Compiled Code)
              at
              com.shockmarket.ejb.ShockEJBClientUtils.getSubscriberState(Compiled
              Code)
              at
              com.shockmarket.servlet.ShockBaseServlet.getSubscriberState(Compiled
              Code)
              at
              com.shockmarket.servlet.ShockBaseServlet.getNextSubpage(Compiled Code)
              at
              com.shockmarket.servlet.ShockBaseServlet.processRequest(Compiled Code)
              at com.shockmarket.servlet.ShockBaseServlet.doGet(Compiled Code)
              at javax.servlet.http.HttpServlet.service(Compiled Code)
              at javax.servlet.http.HttpServlet.service(Compiled Code)
              at
              weblogic.servlet.internal.ServletStubImpl.invokeServlet(Compiled Code)
              at
              weblogic.servlet.internal.ServletContextImpl.invokeServlet(Compiled
              Code)
              at weblogic.servlet.JSPServlet.service(Compiled Code)
              at javax.servlet.http.HttpServlet.service(Compiled Code)
              at
              weblogic.servlet.internal.ServletStubImpl.invokeServlet(Compiled Code)
              at
              weblogic.servlet.internal.ServletContextImpl.invokeServlet(Compiled
              Code)
              at
              weblogic.servlet.internal.ServletContextImpl.invokeServlet(Compiled
              Code)
              at weblogic.socket.MuxableSocketHTTP.invokeServlet(Compiled
              Code)
              at weblogic.socket.MuxableSocketHTTP.execute(Compiled Code)
              at weblogic.t3.srvr.ExecuteThread.run(Compiled Code)
              David Michaels <[email protected]>
              Director of Technology
              ShockMarket Corporation (650) 330-4665
              [david.vcf]
              

    Which service pack? Could you use most recent service pack?
              Cheers - Wei
              David Michaels <[email protected]> wrote in message
              news:[email protected]...
              >
              > We're using WL451, on Solaris. We have two clusters, Cluster A (running
              > servlets) and Cluster B (running EJB's).
              >
              > We've enabled weight-based load balancing on cluster B. Each machine
              > has a weblogic.system.weight property defined.
              >
              > When running code on cluster A, we get frequent null pointer exceptions
              > in Weblogic. Has anyone seen this?
              >
              > Wed Aug 30 17:11:54 EDT 2000 <E> [ShockExServlet] Unexpected failure:
              > java.lang.NullPointerExceptio
              > n. Exception: java.lang.NullPointerException
              > java.lang.NullPointerException
              > at weblogic.service.RichReplicaList.getMaxServerWeight(Compiled
              > Code)
              > at
              > weblogic.service.WeightBasedReplicaHandler.chooseReplica(Compiled Code)
              > at weblogic.service.BasicReplicaHandler.loadBalance(Compiled
              > Code)
              > at weblogic.service.BasicServiceStub._wl_loadBalance(Compiled
              > Code)
              > at
              > weblogic.service.BasicServiceStub._wl_autoLoadBalance(Compiled Code)
              > at
              >
              com.shockmarket.ejb.ir.ShockInformationReceiverBeanEOImpl_ServiceStub.exOccu
              rred(Compiled
              >
              > Code)
              > at
              > com.shockmarket.data.ShockInformationReceiverProxy.exOccurred(Compiled
              > Code)
              > at com.shockmarket.servlet.ShockExServlet.recordEx(Compiled
              > Code)
              > at com.shockmarket.servlet.ShockExServlet.emitHTML(Compiled
              > Code)
              > at com.shockmarket.servlet.ShockBaseServlet.sendHTML(Compiled
              > Code)
              > at com.shockmarket.servlet.ShockBaseServlet._jspService(Compiled
              >
              > Code)
              > at com.shockmarket.servlet.ShockBaseServlet.doGet(Compiled Code)
              >
              > at javax.servlet.http.HttpServlet.service(Compiled Code)
              > at javax.servlet.http.HttpServlet.service(Compiled Code)
              > at
              > weblogic.servlet.internal.ServletStubImpl.invokeServlet(Compiled Code)
              > at
              > weblogic.servlet.internal.ServletContextImpl.invokeServlet(Compiled
              > Code)
              >
              > and
              >
              > Wed Aug 30 17:12:01 EDT 2000 <E>
              > [UUID=prodweb2.shockmarket.com967669921432] [_RG] Failed processing
              > form request. data = BH=foo&U=1. Exception:
              > java.lang.NullPointerException
              > java.lang.NullPointerException
              > at
              > weblogic.service.WeightBasedReplicaHandler.chooseReplica(Compiled Code)
              > at weblogic.service.BasicReplicaHandler.loadBalance(Compiled
              > Code)
              > at weblogic.service.BasicServiceStub._wl_loadBalance(Compiled
              > Code)
              > at
              > weblogic.service.BasicServiceStub._wl_autoLoadBalance(Compiled Code)
              > at
              >
              com.shockmarket.ejb.subscriber.ShockSubscriberBeanHomeImpl_ServiceStub.findB
              yBrIDB
              >
              > rHandle(Compiled Code)
              > at
              > com.shockmarket.ejb.ShockEJBClientUtils.getSubscriberState(Compiled
              > Code)
              > at
              > com.shockmarket.servlet.ShockBaseServlet.getSubscriberState(Compiled
              > Code)
              > at
              > com.shockmarket.servlet.ShockBaseServlet.getNextSubpage(Compiled Code)
              > at
              > com.shockmarket.servlet.ShockBaseServlet.processRequest(Compiled Code)
              > at com.shockmarket.servlet.ShockBaseServlet.doGet(Compiled Code)
              >
              > at javax.servlet.http.HttpServlet.service(Compiled Code)
              > at javax.servlet.http.HttpServlet.service(Compiled Code)
              > at
              > weblogic.servlet.internal.ServletStubImpl.invokeServlet(Compiled Code)
              > at
              > weblogic.servlet.internal.ServletContextImpl.invokeServlet(Compiled
              > Code)
              > at weblogic.servlet.JSPServlet.service(Compiled Code)
              > at javax.servlet.http.HttpServlet.service(Compiled Code)
              > at
              > weblogic.servlet.internal.ServletStubImpl.invokeServlet(Compiled Code)
              > at
              > weblogic.servlet.internal.ServletContextImpl.invokeServlet(Compiled
              > Code)
              > at
              > weblogic.servlet.internal.ServletContextImpl.invokeServlet(Compiled
              > Code)
              > at weblogic.socket.MuxableSocketHTTP.invokeServlet(Compiled
              > Code)
              > at weblogic.socket.MuxableSocketHTTP.execute(Compiled Code)
              > at weblogic.t3.srvr.ExecuteThread.run(Compiled Code)
              >
              >
              > --
              > David Michaels <[email protected]>
              > Director of Technology
              > ShockMarket Corporation (650) 330-4665
              >
              >
              

  • Load balancing algorithm problems with servlets

    All,
    We have a simple servlet which looks up an RMI object from JNDI and invokes
    one of its methods in a loop. The RMI object is the HelloClusterImpl
    example provided by WebLogic. The servlet basically copies the code from
    the HelloClusterClient. In the cluster property file, our load algorithm is
    setup to be round-robin. We are using IIS as our web server. If we start
    up both servers in the cluster and then use another machine as our client to
    call the HelloClusterClient, we see that the calls to HelloClusterImpl
    alternate between the two clustered servers. In fact, it is done perfectly
    at 50% for each server. When we run the servlet from with the client's
    browser, however, it seems as if which ever server in the cluster that
    receives the servlet request then takes 100% of the calls to
    HelloClusterImpl and there is never any alternating. Although we can verify
    that different servers in the cluster receive the servlet request, it seems
    as if there is never any altering between the servers during the method
    invocations on the HelloClusterImpl servant. Does this seem right?
    Shouldn't there be alternating between the servers? Any help would be
    greatly appreciated.
    Thanks,
    -Jon

    I have to try this and I will let you.
    Thanks
    Jon Eagles wrote:
    All,
    We have a simple servlet which looks up an RMI object from JNDI and invokes
    one of its methods in a loop. The RMI object is the HelloClusterImpl
    example provided by WebLogic. The servlet basically copies the code from
    the HelloClusterClient. In the cluster property file, our load algorithm is
    setup to be round-robin. We are using IIS as our web server. If we start
    up both servers in the cluster and then use another machine as our client to
    call the HelloClusterClient, we see that the calls to HelloClusterImpl
    alternate between the two clustered servers. In fact, it is done perfectly
    at 50% for each server. When we run the servlet from with the client's
    browser, however, it seems as if which ever server in the cluster that
    receives the servlet request then takes 100% of the calls to
    HelloClusterImpl and there is never any alternating. Although we can verify
    that different servers in the cluster receive the servlet request, it seems
    as if there is never any altering between the servers during the method
    invocations on the HelloClusterImpl servant. Does this seem right?
    Shouldn't there be alternating between the servers? Any help would be
    greatly appreciated.
    Thanks,
    -Jon

  • 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.

  • 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??
              

  • JMS load-balancing question

    Hello,
    When performing settings on JMS connection factory, one can set (check the "Load Balancing Enabled" option in the Configuration tab, Load Balance sub tab).
    In the help documentation, we can read:
    Specifies whether non-anonymous producers created through a connection factory are load balanced within a distributed destination on a per-call basis.
    *If enabled, the associated message producers are load balanced on every send() or publish() .+
    I have performed some tests and I don't see the expected behaviour that is to say load-balancing for each send or publish call.
    So first what does mean "non-anonymous producers" ? Does that mean that we have to create JMS connection with username/password arguments ? If yes, I have used the same credentials than the ones used for the admin console and again I don't see load-balancing on physical queues belonging to one distributed queue !
    Could you give, please, me advice on how to get the load-balancing working per send or publish call ?
    Best Regards.

    Hello,
    The content of the config.xml:
    <?xml version='1.0' encoding='UTF-8'?>
    <domain xmlns="http://xmlns.oracle.com/weblogic/domain" xmlns:sec="http://xmlns.oracle.com/weblogic/security" xmlns:wls="http://xmlns.oracle.com/weblogic/security/wls" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.oracle.com/weblogic/security/xacml http://xmlns.oracle.com/weblogic/security/xacml/1.0/xacml.xsd http://xmlns.oracle.com/weblogic/security/providers/passwordvalidator http://xmlns.oracle.com/weblogic/security/providers/passwordvalidator/1.0/passwordvalidator.xsd http://xmlns.oracle.com/weblogic/domain http://xmlns.oracle.com/weblogic/1.0/domain.xsd http://xmlns.oracle.com/weblogic/security http://xmlns.oracle.com/weblogic/1.0/security.xsd http://xmlns.oracle.com/weblogic/security/wls http://xmlns.oracle.com/weblogic/security/wls/1.0/wls.xsd http://www.bea.com/ns/weblogic/90/security/extension http://xmlns.oracle.com/weblogic/1.0/security.xsd">
    <name>FRANCOISdomain</name>
    <domain-version>10.3.2.0</domain-version>
    <security-configuration>
    <name>FRANCOISdomain</name>
    <realm>
    <sec:authentication-provider xsi:type="wls:default-authenticatorType">
    <sec:control-flag>OPTIONAL</sec:control-flag>
    </sec:authentication-provider>
    <sec:authentication-provider xsi:type="wls:default-identity-asserterType">
    <sec:active-type>AuthenticatedUser</sec:active-type>
    </sec:authentication-provider>
    <sec:authentication-provider xmlns:ext="http://www.bea.com/ns/weblogic/90/security/extension" xsi:type="ext:agent-authenticatorType">
    <n1:name xmlns:n1="http://www.bea.com/ns/weblogic/90/security">OpenAMProvider</n1:name>
    <n2:control-flag xmlns:n2="http://www.bea.com/ns/weblogic/90/security">OPTIONAL</n2:control-flag>
    </sec:authentication-provider>
    <sec:role-mapper xmlns:xac="http://xmlns.oracle.com/weblogic/security/xacml" xsi:type="xac:xacml-role-mapperType"></sec:role-mapper>
    <sec:authorizer xmlns:xac="http://xmlns.oracle.com/weblogic/security/xacml" xsi:type="xac:xacml-authorizerType"></sec:authorizer>
    <sec:adjudicator xsi:type="wls:default-adjudicatorType"></sec:adjudicator>
    <sec:credential-mapper xsi:type="wls:default-credential-mapperType"></sec:credential-mapper>
    <sec:cert-path-provider xsi:type="wls:web-logic-cert-path-providerType"></sec:cert-path-provider>
    <sec:cert-path-builder>WebLogicCertPathProvider</sec:cert-path-builder>
    <sec:name>myrealm</sec:name>
    <sec:password-validator xmlns:pas="http://xmlns.oracle.com/weblogic/security/providers/passwordvalidator" xsi:type="pas:system-password-validatorType">
    <sec:name>SystemPasswordValidator</sec:name>
    <pas:min-password-length>8</pas:min-password-length>
    <pas:min-numeric-or-special-characters>1</pas:min-numeric-or-special-characters>
    </sec:password-validator>
    </realm>
    <default-realm>myrealm</default-realm>
    <credential-encrypted>{AES}mq1iuVKohqULL/lwkqBF0PCxYeSXcHavSgc2TO4mKEWr81KYRukVzT/6Icj2576UhryaX5E/RzUKDJUZrEWAshpbE9B023NHogEtz7K0XQhToHxukFCiBy5I5mM8XpN4</credential-encrypted>
    <node-manager-username>myusername</node-manager-username>
    <node-manager-password-encrypted>{AES}r3SsMwpQiaNUYrGsTljMgyB9i4A0TELOfOni+RxRP/0=</node-manager-password-encrypted>
    </security-configuration>
    <jta>
    <timeout-seconds>120</timeout-seconds>
    </jta>
    <log>
    <file-name>logs/FRANCOISdomain.log</file-name>
    <rotation-type>bySize</rotation-type>
    <number-of-files-limited>true</number-of-files-limited>
    <file-count>7</file-count>
    <file-min-size>20480</file-min-size>
    <rotate-log-on-startup>true</rotate-log-on-startup>
    <log4j-logging-enabled>false</log4j-logging-enabled>
    </log>
    <snmp-agent-deployment>
    <name>ServerSNMPAgent-0</name>
    <enabled>true</enabled>
    <send-automatic-traps-enabled>true</send-automatic-traps-enabled>
    <snmp-port>1610</snmp-port>
    <snmp-trap-version>1</snmp-trap-version>
    <community-prefix>public</community-prefix>
    <community-based-access-enabled>true</community-based-access-enabled>
    <snmp-engine-id>ServerSNMPAgent-0</snmp-engine-id>
    <authentication-protocol>noAuth</authentication-protocol>
    <privacy-protocol>noPriv</privacy-protocol>
    <inform-retry-interval>10000</inform-retry-interval>
    <max-inform-retry-count>1</max-inform-retry-count>
    <localized-key-cache-invalidation-interval>3600000</localized-key-cache-invalidation-interval>
    <snmp-access-for-user-m-beans-enabled>true</snmp-access-for-user-m-beans-enabled>
    <inform-enabled>false</inform-enabled>
    <master-agent-x-port>7050</master-agent-x-port>
    <target>AdminServer</target>
    </snmp-agent-deployment>
    <server>
    <name>AdminServer</name>
    <log>
    <name>AdminServer</name>
    <file-name>logs/AdminServer__%yyyy%_%MM%_%dd%_%hh%_%mm%.log</file-name>
    <rotation-type>bySize</rotation-type>
    <file-min-size>20480</file-min-size>
    <logger-severity>Info</logger-severity>
    <log-file-severity>Notice</log-file-severity>
    <stdout-severity>Notice</stdout-severity>
    <domain-log-broadcast-severity>Notice</domain-log-broadcast-severity>
    <memory-buffer-severity>Trace</memory-buffer-severity>
    </log>
    <listen-port>20001</listen-port>
    <iiop-enabled>true</iiop-enabled>
    <default-iiop-user>iiopuser</default-iiop-user>
    <default-iiop-password-encrypted>{AES}v2+TWtuxeDCyJ5ztyFko4t3ISkqKnlXEGK350FHvCXM=</default-iiop-password-encrypted>
    <listen-address>10.10.166.103</listen-address>
    </server>
    <server>
    <name>managed1</name>
    <reverse-dns-allowed>false</reverse-dns-allowed>
    <native-io-enabled>true</native-io-enabled>
    <thread-pool-percent-socket-readers>33</thread-pool-percent-socket-readers>
    <max-message-size>10000000</max-message-size>
    <max-http-message-size>-1</max-http-message-size>
    <complete-message-timeout>60</complete-message-timeout>
    <idle-connection-timeout>65</idle-connection-timeout>
    <period-length>60000</period-length>
    <idle-periods-until-timeout>4</idle-periods-until-timeout>
    <dgc-idle-periods-until-timeout>5</dgc-idle-periods-until-timeout>
    <ssl>
    <enabled>true</enabled>
    <hostname-verifier xsi:nil="true"></hostname-verifier>
    <hostname-verification-ignored>false</hostname-verification-ignored>
    <export-key-lifespan>500</export-key-lifespan>
    <client-certificate-enforced>false</client-certificate-enforced>
    <listen-port>20012</listen-port>
    <two-way-ssl-enabled>false</two-way-ssl-enabled>
    <server-private-key-alias>myhost.mycompany.com</server-private-key-alias>
    <server-private-key-pass-phrase-encrypted>{AES}haHJwbqbttygoo71Dyb3dQck2VsEd1woFGijvFXM0sA=</server-private-key-pass-phrase-encrypted>
    <ssl-rejection-logging-enabled>true</ssl-rejection-logging-enabled>
    <inbound-certificate-validation>BuiltinSSLValidationOnly</inbound-certificate-validation>
    <outbound-certificate-validation>BuiltinSSLValidationOnly</outbound-certificate-validation>
    <allow-unencrypted-null-cipher>false</allow-unencrypted-null-cipher>
    <use-server-certs>false</use-server-certs>
    </ssl>
    <log>
    <file-name>logs/managed1_%yyyy%_%MM%_%dd%_%hh%_%mm%.log</file-name>
    <rotation-type>bySize</rotation-type>
    <number-of-files-limited>true</number-of-files-limited>
    <file-count>7</file-count>
    <rotation-time>00:00</rotation-time>
    <file-min-size>20480</file-min-size>
    <rotate-log-on-startup>true</rotate-log-on-startup>
    <logger-severity>Debug</logger-severity>
    <logger-severity-properties>com.iplanet=Debug;test.ejb=Debug;com.sun.indentity=Debug;org.apache.http=Debug;test.servlet=Debug</logger-severity-properties>
    <log-file-severity>Debug</log-file-severity>
    <stdout-severity>Debug</stdout-severity>
    <domain-log-broadcast-severity>Debug</domain-log-broadcast-severity>
    <domain-log-broadcast-filter xsi:nil="true"></domain-log-broadcast-filter>
    <memory-buffer-severity>Debug</memory-buffer-severity>
    <memory-buffer-filter xsi:nil="true"></memory-buffer-filter>
    <log4j-logging-enabled>true</log4j-logging-enabled>
    <redirect-stdout-to-server-log-enabled>false</redirect-stdout-to-server-log-enabled>
    <domain-log-broadcaster-buffer-size>50</domain-log-broadcaster-buffer-size>
    </log>
    <max-open-sock-count>-1</max-open-sock-count>
    <stuck-thread-max-time>600</stuck-thread-max-time>
    <stuck-thread-timer-interval>60</stuck-thread-timer-interval>
    <machine>FRANCOIS_Machine1</machine>
    <listen-port>20011</listen-port>
    <listen-port-enabled>true</listen-port-enabled>
    <cluster>FRANCOIS_cluster</cluster>
    <web-server>
    <web-server-log>
    <number-of-files-limited>false</number-of-files-limited>
    </web-server-log>
    <frontend-http-port>0</frontend-http-port>
    <frontend-https-port>0</frontend-https-port>
    <keep-alive-enabled>true</keep-alive-enabled>
    <keep-alive-secs>30</keep-alive-secs>
    <https-keep-alive-secs>60</https-keep-alive-secs>
    <post-timeout-secs>30</post-timeout-secs>
    <max-post-size>-1</max-post-size>
    <send-server-header-enabled>false</send-server-header-enabled>
    <wap-enabled>false</wap-enabled>
    <accept-context-path-in-get-real-path>false</accept-context-path-in-get-real-path>
    </web-server>
    <server-debug>
    <debug-scope>
    <name>weblogic.security</name>
    <enabled>false</enabled>
    </debug-scope>
    <debug-scope>
    <name>weblogic.servlet</name>
    <enabled>false</enabled>
    </debug-scope>
    <debug-scope>
    <name>default</name>
    <enabled>false</enabled>
    </debug-scope>
    <debug-scope>
    <name>weblogic</name>
    <enabled>false</enabled>
    </debug-scope>
    </server-debug>
    <listen-address>host.mycompany.com</listen-address>
    <accept-backlog>300</accept-backlog>
    <login-timeout-millis>5000</login-timeout-millis>
    <java-compiler>javac</java-compiler>
    <tunneling-enabled>true</tunneling-enabled>
    <tunneling-client-ping-secs>45</tunneling-client-ping-secs>
    <tunneling-client-timeout-secs>40</tunneling-client-timeout-secs>
    <server-start>
    <java-vendor>Sun</java-vendor>
    <java-home>/opt/32bit/jdk1.6.0_18</java-home>
    <class-path>${CLASSPATH}:/opt/32bit/jdk1.6.0_18/lib/tools.jar:/product/DSL60/wlserver_10.3/server/lib/weblogic_sp.jar:/product/DSL60/wlserver_10.3/server/lib/weblogic.jar:/product/FILES/PAF/j2ee_agents/weblogic_v10_agent/lib/agent.jar:/product/FILES/PAF/j2ee_agents/weblogic_v10_agent/lib/openssoclientsdk.jar:/product/FILES/PAF/j2ee_agents/weblogic_v10_agent/locale:/product/FILES/PAF/j2ee_agents/weblogic_v10_agent/Agent_002/config</class-path>
    <bea-home>/product/DSL60</bea-home>
    <root-directory>/product/DSL60/wls/domain/FRANCOISdomain</root-directory>
    <security-policy-file>/product/DSL60/wlserver_10.3/server/lib/weblogic.policy</security-policy-file>
    <arguments>-Dname=WL1_MYCOMPANY_PID -Dlog4j.configuration=file:///product/DSL60/wls/domain/FRANCOISdomain/lib/log4j.xml -Declipselink.register.run.mbean=true -Xms1024m -Xmx1024m -XX:MaxPermSize=256m -d32 -Doracle.net.tns.admin=/opt/oracle/11.2.0/network/admin/tnsname.ora -Djava.util.logging.config.file=/product/FILES/PAF/j2ee_agents/weblogic_v10_agent/config/OpenSSOAgentLogConfig.properties -DLOG_COMPATMODE=Off</arguments>
    <username>myusername</username>
    <password-encrypted>{AES}+o7kEIuvUEC1C4IoVveulxKTyN3upgWDglcqqgOEwt4=</password-encrypted>
    </server-start>
    <jta-migratable-target>
    <user-preferred-server>managed1</user-preferred-server>
    <cluster>FRANCOIS_cluster</cluster>
    </jta-migratable-target>
    <low-memory-time-interval>3600</low-memory-time-interval>
    <low-memory-sample-size>10</low-memory-sample-size>
    <low-memory-granularity-level>5</low-memory-granularity-level>
    <low-memory-gc-threshold>5</low-memory-gc-threshold>
    <auto-kill-if-failed>true</auto-kill-if-failed>
    <health-check-interval-seconds>30</health-check-interval-seconds>
    <managed-server-independence-enabled>true</managed-server-independence-enabled>
    <client-cert-proxy-enabled>false</client-cert-proxy-enabled>
    <key-stores>CustomIdentityAndCustomTrust</key-stores>
    <custom-identity-key-store-file-name>/product/FILES/PAF/cert/opensso.jks</custom-identity-key-store-file-name>
    <custom-identity-key-store-type>JKS</custom-identity-key-store-type>
    <custom-identity-key-store-pass-phrase-encrypted>{AES}yg0Tx8tcfZsqM2sYbfTPEDl7ceN5X5zUEALaBM58wS8=</custom-identity-key-store-pass-phrase-encrypted>
    <custom-trust-key-store-file-name>/product/FILES/PAF/cert/opensso.jks</custom-trust-key-store-file-name>
    <custom-trust-key-store-type>JKS</custom-trust-key-store-type>
    <custom-trust-key-store-pass-phrase-encrypted>{AES}8Ghgu1RUTF7st3f69sZKdb6vTfWiFvk1g+CUi63utBA=</custom-trust-key-store-pass-phrase-encrypted>
    <overload-protection>
    <shared-capacity-for-work-managers>1111</shared-capacity-for-work-managers>
    <panic-action>system-exit</panic-action>
    <failure-action>no-action</failure-action>
    <free-memory-percent-high-threshold>0</free-memory-percent-high-threshold>
    <free-memory-percent-low-threshold>0</free-memory-percent-low-threshold>
    </overload-protection>
    </server>
    <server>
    <name>managed2</name>
    <reverse-dns-allowed>false</reverse-dns-allowed>
    <native-io-enabled>true</native-io-enabled>
    <thread-pool-percent-socket-readers>33</thread-pool-percent-socket-readers>
    <max-message-size>10000000</max-message-size>
    <complete-message-timeout>60</complete-message-timeout>
    <idle-connection-timeout>65</idle-connection-timeout>
    <period-length>60000</period-length>
    <idle-periods-until-timeout>4</idle-periods-until-timeout>
    <dgc-idle-periods-until-timeout>5</dgc-idle-periods-until-timeout>
    <log>
    <file-name>logs/managed2_%yyyy%_%MM%_%dd%_%hh%_%mm%.log</file-name>
    <rotation-type>bySize</rotation-type>
    <number-of-files-limited>true</number-of-files-limited>
    <file-count>7</file-count>
    <rotation-time>00:00</rotation-time>
    <file-min-size>20480</file-min-size>
    <rotate-log-on-startup>true</rotate-log-on-startup>
    <logger-severity>Debug</logger-severity>
    <logger-severity-properties>org.apache.http=Error</logger-severity-properties>
    <log-file-severity>Debug</log-file-severity>
    <stdout-severity>Debug</stdout-severity>
    <domain-log-broadcast-severity>Debug</domain-log-broadcast-severity>
    <domain-log-broadcast-filter xsi:nil="true"></domain-log-broadcast-filter>
    <memory-buffer-severity>Debug</memory-buffer-severity>
    <memory-buffer-filter xsi:nil="true"></memory-buffer-filter>
    <log4j-logging-enabled>true</log4j-logging-enabled>
    <redirect-stdout-to-server-log-enabled>false</redirect-stdout-to-server-log-enabled>
    <domain-log-broadcaster-buffer-size>50</domain-log-broadcaster-buffer-size>
    </log>
    <max-open-sock-count>-1</max-open-sock-count>
    <stuck-thread-max-time>600</stuck-thread-max-time>
    <stuck-thread-timer-interval>60</stuck-thread-timer-interval>
    <machine>FRANCOIS_Machine1</machine>
    <listen-port>20021</listen-port>
    <cluster>FRANCOIS_cluster</cluster>
    <web-server>
    <web-server-log>
    <number-of-files-limited>false</number-of-files-limited>
    </web-server-log>
    </web-server>
    <listen-address>10.10.166.103</listen-address>
    <accept-backlog>300</accept-backlog>
    <login-timeout-millis>5000</login-timeout-millis>
    <tunneling-enabled>true</tunneling-enabled>
    <tunneling-client-ping-secs>45</tunneling-client-ping-secs>
    <tunneling-client-timeout-secs>40</tunneling-client-timeout-secs>
    <server-start>
    <java-vendor>Sun</java-vendor>
    <java-home>/opt/32bit/jdk1.6.0_18</java-home>
    <class-path>${CLASSPATH}:/opt/32bit/jdk1.6.0_18/lib/tools.jar:/product/DSL60/wlserver_10.3/server/lib/weblogic_sp.jar:/product/DSL60/wlserver_10.3/server/lib/weblogic.jar:/product/FILES/PAF/j2ee_agents/weblogic_v10_agent/lib/agent.jar:/product/FILES/PAF/j2ee_agents/weblogic_v10_agent/lib/openssoclientsdk.jar:/product/FILES/PAF/j2ee_agents/weblogic_v10_agent/locale:/product/FILES/PAF/j2ee_agents/weblogic_v10_agent/Agent_003/config</class-path>
    <bea-home>/product/DSL60</bea-home>
    <root-directory>/product/DSL60/wls/domain/FRANCOISdomain</root-directory>
    <security-policy-file>/product/DSL60/wlserver_10.3/server/lib/weblogic.policy</security-policy-file>
    <arguments>-Dname=WL1_MYCOMPANY_PID -Dlog4j.configuration=file:///product/DSL60/wls/domain/FRANCOISdomain/lib/log4j.xml -Declipselink.register.run.mbean=true -Xms1024m -Xmx1024m -XX:MaxPermSize=256m -d32 -Doracle.net.tns.admin=/opt/oracle/11.2.0/network/admin/tnsname.ora -Djava.util.logging.config.file=/product/FILES/PAF/j2ee_agents/weblogic_v10_agent/config/OpenSSOAgentLogConfig.properties -DLOG_COMPATMODE=Off</arguments>
    <username>myusername</username>
    <password-encrypted>{AES}AveXfjkD6M1nkwLoBOtN9QhrOA+C1d84AP+A2WThpN0=</password-encrypted>
    </server-start>
    <jta-migratable-target>
    <user-preferred-server>managed2</user-preferred-server>
    <cluster>FRANCOIS_cluster</cluster>
    </jta-migratable-target>
    <low-memory-time-interval>3600</low-memory-time-interval>
    <low-memory-sample-size>10</low-memory-sample-size>
    <low-memory-granularity-level>5</low-memory-granularity-level>
    <low-memory-gc-threshold>5</low-memory-gc-threshold>
    <auto-kill-if-failed>true</auto-kill-if-failed>
    <health-check-interval-seconds>30</health-check-interval-seconds>
    <managed-server-independence-enabled>true</managed-server-independence-enabled>
    </server>
    <cluster>
    <name>FRANCOIS_cluster</name>
    <cluster-address>10.10.166.103:20011,10.10.166.103:20021</cluster-address>
    <default-load-algorithm>round-robin</default-load-algorithm>
    <cluster-messaging-mode>unicast</cluster-messaging-mode>
    <cluster-broadcast-channel></cluster-broadcast-channel>
    <weblogic-plugin-enabled>true</weblogic-plugin-enabled>
    <frontend-http-port>20011</frontend-http-port>
    <frontend-https-port>20012</frontend-https-port>
    <number-of-servers-in-cluster-address>1</number-of-servers-in-cluster-address>
    </cluster>
    <production-mode-enabled>false</production-mode-enabled>
    <embedded-ldap>
    <name>FRANCOISdomain</name>
    <credential-encrypted>{AES}M6zrsdwO+PvT05M07l6QPOBMLacz4b6Z9+DT5EDxQPABYDdIzZbossnMLiXSSodJ</credential-encrypted>
    </embedded-ldap>
    <archive-configuration-count>3</archive-configuration-count>
    <config-backup-enabled>true</config-backup-enabled>
    <configuration-version>10.3.2.0</configuration-version>
    <library>
    <name>mycompany-domain-logging.jar#[email protected]</name>
    <target>FRANCOIS_cluster</target>
    <module-type xsi:nil="true"></module-type>
    <source-path>servers/AdminServer/upload/mycompany-domain-logging.jar/app/mycompany-domain-logging.jar</source-path>
    <security-dd-model>DDOnly</security-dd-model>
    <staging-mode>stage</staging-mode>
    </library>
    <library>
    <name>eclipselink-custom.jar#[email protected]</name>
    <target>FRANCOIS_cluster</target>
    <module-type xsi:nil="true"></module-type>
    <source-path>servers/AdminServer/upload/eclipselink-custom.jar/app/eclipselink-custom.jar</source-path>
    <security-dd-model>DDOnly</security-dd-model>
    <staging-mode>stage</staging-mode>
    </library>
    <machine>
    <name>FRANCOIS_Machine1</name>
    <node-manager>
    <nm-type>Plain</nm-type>
    <listen-address>10.10.166.103</listen-address>
    <listen-port>5566</listen-port>
    </node-manager>
    </machine>
    <jms-server>
    <name>JMSServer1</name>
    <target>managed1</target>
    <persistent-store>jdbcStore1</persistent-store>
    </jms-server>
    <jms-server>
    <name>JMSServer2</name>
    <target>managed2</target>
    <persistent-store>jdbcStore2</persistent-store>
    </jms-server>
    <migratable-target>
    <name>managed1 (migratable)</name>
    <notes>This is a system generated default migratable target for a server. Do not delete manually.</notes>
    <user-preferred-server>managed1</user-preferred-server>
    <cluster>FRANCOIS_cluster</cluster>
    </migratable-target>
    <migratable-target>
    <name>managed2 (migratable)</name>
    <notes>This is a system generated default migratable target for a server. Do not delete manually.</notes>
    <user-preferred-server>managed2</user-preferred-server>
    <cluster>FRANCOIS_cluster</cluster>
    </migratable-target>
    <startup-class>
    <name>AppenderStartup</name>
    <target>FRANCOIS_cluster</target>
    <class-name>com.mycompany.logging.AppenderStartup</class-name>
    <load-before-app-deployments>true</load-before-app-deployments>
    </startup-class>
    <jdbc-store>
    <name>jdbcStore1</name>
    <prefix-name>jdbcStore1</prefix-name>
    <data-source>technical_mycompany_noxa.ds</data-source>
    <target>managed1</target>
    </jdbc-store>
    <jdbc-store>
    <name>jdbcStore2</name>
    <prefix-name>jdbcStore2</prefix-name>
    <data-source>mycompany_noxa_failover.ds</data-source>
    <target>managed2</target>
    </jdbc-store>
    <jms-system-resource>
    <name>EclipseLink_Module</name>
    <target>FRANCOIS_cluster</target>
    <sub-deployment>
    <name>DeployToCluster</name>
    <target>FRANCOIS_cluster</target>
    </sub-deployment>
    <descriptor-file-name>jms/eclipselink_module-jms.xml</descriptor-file-name>
    </jms-system-resource>
    <jms-system-resource>
    <name>TESTJMS</name>
    <target>FRANCOIS_cluster</target>
    <sub-deployment>
    <name>TestQueueM1</name>
    <target>JMSServer1</target>
    </sub-deployment>
    <sub-deployment>
    <name>TestQueueM2</name>
    <target>JMSServer2</target>
    </sub-deployment>
    <descriptor-file-name>jms/testjms-jms.xml</descriptor-file-name>
    </jms-system-resource>
    <admin-server-name>AdminServer</admin-server-name>
    <jdbc-system-resource>
    <name>mycompany_xa_failover.ds</name>
    <target>FRANCOIS_cluster</target>
    <descriptor-file-name>jdbc/mycompany_xa_failover2eds-4849-jdbc.xml</descriptor-file-name>
    </jdbc-system-resource>
    <jdbc-system-resource>
    <name>mycompany_noxa_failover.ds</name>
    <target>FRANCOIS_cluster</target>
    <descriptor-file-name>jdbc/mycompany_noxa_failover2eds-3264-jdbc.xml</descriptor-file-name>
    </jdbc-system-resource>
    <jdbc-system-resource>
    <name>technical_mycompany_noxa.ds</name>
    <target>FRANCOIS_cluster</target>
    <descriptor-file-name>jdbc/technical_mycompany_noxa2eds-3047-jdbc.xml</descriptor-file-name>
    </jdbc-system-resource>
    </domain>
    Best Regards.

  • OSB jms clustering - load balancing seems to be not working

    Hi All,
    I have one admin server and two managed servers running ( one of these managed server is running in the remote linux machine) in a cluster
    I have connectionfactory created with load balance enabled with round robin
    and server affinity is disabled
    I have queue created as uniformly distributed Q
    I have a proxy service with load balancing as roundrobin and endpoint URL as below
    jms://rdoelapp001011:61703,rdoelapp001013:61703/synergyConnectionFactory1/MM_gridQ0
    If I execute this proxy sending messages it always go to one server only. There is no message going to the other server.
    If I shutdown the server that receives messages then the other server is receiving messages. Seems like fail-over is working but not the load-balancing
    There is one point may be worth mentioning here is, from the admin console if I look at the servers for the clusters it has below information
    Name      State      Drop-out Frequency      Remote Groups Discovered      Local Group Leader      Total Groups      Discovered Group Leaders      Groups      Primary      
    synergyOSBServer1     RUNNING     Never     0     synergyOSBServer1     1     synergyOSBServer1     *{synergyOSBServer1}*     0          
    synergyOSBServer2     RUNNING     Never     0     synergyOSBServer1     1     synergyOSBServer1     *{synergyOSBServer1, synergyOSBServer2}* 0
    one server has groups as {synergYOSBServer1} instead of {synergyOSBServer1, synergyOSBServer2}. Does that look correct?
    here is my jms xml file
    <?xml version='1.0' encoding='UTF-8'?>
    <weblogic-jms xmlns="http://xmlns.oracle.com/weblogic/weblogic-jms" xmlns:sec="http://xmlns.oracle.com/weblogic/security" xmlns:wls="http://xmlns.oracle.com/weblogic/security/wls" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.oracle.com/weblogic/weblogic-jms http://xmlns.oracle.com/weblogic/weblogic-jms/1.1/weblogic-jms.xsd">
    *<connection-factory name="synergyConnectionFactory1">*
    *<sub-deployment-name>synergySubDeploy1</sub-deployment-name>*
    *<default-targeting-enabled>false</default-targeting-enabled>*
    *<jndi-name>synergyConnectionFactory1</jndi-name>*
    *<client-params>*
    *<client-id-policy>Restricted</client-id-policy>*
    *<subscription-sharing-policy>Exclusive</subscription-sharing-policy>*
    *<messages-maximum>10</messages-maximum>*
    *</client-params>*
    *<transaction-params>*
    *<xa-connection-factory-enabled>false</xa-connection-factory-enabled>*
    *</transaction-params>*
    *<load-balancing-params>*
    *<load-balancing-enabled>true</load-balancing-enabled>*
    *<server-affinity-enabled>false</server-affinity-enabled>*
    *</load-balancing-params>*
    *<security-params>*
    *<attach-jmsx-user-id>false</attach-jmsx-user-id>*
    *</security-params>*
    *</connection-factory>*
    <uniform-distributed-queue name="errorQ">
    <sub-deployment-name>synergySubDeploy1</sub-deployment-name>
    <default-targeting-enabled>false</default-targeting-enabled>
    <jndi-name>errorQ</jndi-name>
    <load-balancing-policy>Round-Robin</load-balancing-policy>
    <forward-delay>-1</forward-delay>
    <reset-delivery-count-on-forward>true</reset-delivery-count-on-forward>
    </uniform-distributed-queue>
    <uniform-distributed-queue name="undlvQ">
    <sub-deployment-name>synergySubDeploy1</sub-deployment-name>
    <default-targeting-enabled>false</default-targeting-enabled>
    <jndi-name>undlvQ</jndi-name>
    <load-balancing-policy>Round-Robin</load-balancing-policy>
    <forward-delay>-1</forward-delay>
    <reset-delivery-count-on-forward>true</reset-delivery-count-on-forward>
    </uniform-distributed-queue>
    *<uniform-distributed-queue name="MM_gridQ0">*
    *<sub-deployment-name>synergySubDeploy1</sub-deployment-name>*
    *<default-targeting-enabled>false</default-targeting-enabled>*
    *<jndi-name>MM_gridQ0</jndi-name>*
    *<load-balancing-policy>Round-Robin</load-balancing-policy>*
    *<forward-delay>5</forward-delay>*
    *<reset-delivery-count-on-forward>true</reset-delivery-count-on-forward>*
    *</uniform-distributed-queue>*
    <saf-imported-destinations name="synergySAFImportedDest1">
    <sub-deployment-name>synergySubDeploy1</sub-deployment-name>
    <default-targeting-enabled>false</default-targeting-enabled>
    <saf-queue name="gridQ0">
    <remote-jndi-name>MB_gridQ0</remote-jndi-name>
    <local-jndi-name>gridQ0</local-jndi-name>
    <non-persistent-qos>At-Least-Once</non-persistent-qos>
    <time-to-live-default>0</time-to-live-default>
    <use-saf-time-to-live-default>false</use-saf-time-to-live-default>
    <unit-of-order-routing>Hash</unit-of-order-routing>
    </saf-queue>
    <jndi-prefix>MB_</jndi-prefix>
    <saf-remote-context>synergySAFContext1</saf-remote-context>
    <saf-error-handling>synergySAFErrorHndlr1</saf-error-handling>
    <time-to-live-default>0</time-to-live-default>
    <use-saf-time-to-live-default>false</use-saf-time-to-live-default>
    <unit-of-order-routing>Hash</unit-of-order-routing>
    </saf-imported-destinations>
    <saf-remote-context name="synergySAFContext1">
    <saf-login-context>
    <loginURL>t3://rdoelapp001013:7001</loginURL>
    <username>weblogic</username>
    <password-encrypted>{AES}z9VY/K4M7ItAr2Vedvhx+j9htR/HkbY2LRh1ED+Cz5Y=</password-encrypted>
    </saf-login-context>
    <compression-threshold>2147483647</compression-threshold>
    </saf-remote-context>
    <saf-error-handling name="synergySAFErrorHndlr1">
    <policy>Log</policy>
    <log-format xsi:nil="true"></log-format>
    <saf-error-destination xsi:nil="true"></saf-error-destination>
    </saf-error-handling>
    </weblogic-jms>
    Any help will be greatly appriciated
    Edited by: 818591 on Feb 16, 2011 11:28 AM

    I am not getting you here "the right approach is to make OSB run on the man server cluster and not on admin server. "
    I have a jms proxy service that I created from admin console
    And also I have gone thru the step 5 in the link below
    http://download.oracle.com/docs/cd/E13159_01/osb/docs10gr3/deploy/config.html#wp1524235
    If I am not wrong, the proxy service endpoint URI determines where it is pointing to. If it is a cluster environment, it should point to a clustered address
    My proxy has below endpoint URI
    jms://rdoelapp001011:61703,rdoelapp001013:61703/synergyConnectionFactory1/MM_gridQ0
    and rdoelapp001011:61703,rdoelapp001013:61703 is my cluster address
    As per your suggestion "To fix your problem, *make osb to run on the cluster* and specify the same URL for the jms proxy service"
    Could you please provide some instruction how would I "make osb jms proxy service to run in a cluster"
    As a note, I have Q defined as a distributed Q and connection factory targets to the cluster. UDQ also targtes to the cluster.
    Just for a testing I have created another manged server running local to the machine where my admin server is running
    And I created a proxy by following steps as I mentioned above and with endpoint URI as below
    jms://rdoelapp001011:61703,rdoelapp001013:61703,*rdoelapp001011:61700*/synergyConnectionFactory1/MM_gridQ0
    where the new address of my cluster is rdoelapp001011:61703,rdoelapp001013:61703,rdoelapp001011:61700
    It did create consumers in both the managed servers in the cluster that are running locally, but no consumers in the remote managed server.
    So I am kind of leaning towards thinking that there is some incorrect setup for the remote managed server and may be admin server is not able to communicate to the remote server for some reason but not sure about it..
    As a note the cluster is setup to communicate using "unicast" channel
    and I created a channel in each manged server with the same name
    here is the cluster configuration
    <name>synergyCluster1</name>
    <cluster-address>rdoelapp001011:61703,rdoelapp001013:61703,rdoelapp001011:61700</cluster-address>
    <default-load-algorithm>round-robin</default-load-algorithm>
    *<cluster-messaging-mode>unicast</cluster-messaging-mode>*
    *<cluster-broadcast-channel>synergyChannel1</cluster-broadcast-channel>*
    *<number-of-servers-in-cluster-address>3</number-of-servers-in-cluster-address>*
    </cluster>
    here are the twoOSBserver configuration
    <server>
    <name>synergyOSBServer1</name>
    <machine xsi:nil="true"></machine>
    <listen-port>61703</listen-port>
    <cluster>synergyCluster1</cluster>
    <web-server>
    <web-server-log>
    <number-of-files-limited>false</number-of-files-limited>
    </web-server-log>
    </web-server>
    <server-debug>
    <debug-scope>
    <name>weblogic.jms.saf</name>
    <enabled>true</enabled>
    </debug-scope>
    <debug-jmssaf>true</debug-jmssaf>
    <debug-saf-sending-agent>true</debug-saf-sending-agent>
    </server-debug>
    <listen-address>localhost</listen-address>
    <network-access-point>
    *<name>synergyChannel1</name>*
    *<protocol>cluster-broadcast</protocol>*
    *<listen-address>localhost</listen-address>*
    *<listen-port>61702</listen-port>*
    <http-enabled-for-this-protocol>true</http-enabled-for-this-protocol>
    <tunneling-enabled>false</tunneling-enabled>
    *<outbound-enabled>true</outbound-enabled>*
    *<enabled>true</enabled>*
    <two-way-ssl-enabled>false</two-way-ssl-enabled>
    <client-certificate-enforced>false</client-certificate-enforced>
    </network-access-point>
    <jta-migratable-target>
    <user-preferred-server>synergyOSBServer1</user-preferred-server>
    <cluster>synergyCluster1</cluster>
    </jta-migratable-target>
    </server>
    <server>
    <name>synergyOSBServer2</name>
    <ssl>
    <enabled>false</enabled>
    </ssl>
    <machine xsi:nil="true"></machine>
    <listen-port>61703</listen-port>
    <listen-port-enabled>true</listen-port-enabled>
    <cluster>synergyCluster1</cluster>
    <web-server>
    <web-server-log>
    <number-of-files-limited>false</number-of-files-limited>
    </web-server-log>
    </web-server>
    <listen-address>rdoelapp001013</listen-address>
    <network-access-point>
    *<name>synergyChannel1</name>*
    *<protocol>cluster-broadcast</protocol>*
    *<listen-address>rdoelapp001013</listen-address>*
    *<listen-port>61702</listen-port>*
    <http-enabled-for-this-protocol>true</http-enabled-for-this-protocol>
    <tunneling-enabled>false</tunneling-enabled>
    *<outbound-enabled>true</outbound-enabled>*
    *<enabled>true</enabled>*
    <two-way-ssl-enabled>false</two-way-ssl-enabled>
    <client-certificate-enforced>false</client-certificate-enforced>
    </network-access-point>
    <java-compiler>javac</java-compiler>
    <jta-migratable-target>
    <user-preferred-server>synergyOSBServer2</user-preferred-server>
    <cluster>synergyCluster1</cluster>
    </jta-migratable-target>
    <client-cert-proxy-enabled>false</client-cert-proxy-enabled>
    </server>
    <server>
    Edited by: 818591 on Feb 18, 2011 11:26 AM

  • Custom load handler

    Hello,
              Reading through the documentation on clusters I found the following;
              A developer may use one of a set of default load handlers or may provide
              one specifically tailored for the application.
              I assume this means that I could plug my own load balancing algorithm
              into the intelligent stubs.
              If so, then how?
              Are there any examples of documentation of this, or has anyone else
              defined their own algorithm.
              Thanks,
              Kirk
              

              http://www.weblogic.com/docs51/classdocs/API_rmi.html
              http://www.weblogic.com/docs51/classdocs/javadocs/weblogic/rmi/extensions/CallRouter.html
              -callRouter callRouterClass
              May only be used in conjunction with "-clusterable". Specifies the
              class to be used for routing method calls. This class must implement
              weblogic.rmi.extensions.CallRouter. If specified, an instance of this class
              will be called before each method call and be given the opportunity to
              choose the server given the method parameters. It either returns a server
              name or null indicating that the current load algorithm should be used to
              pick the server.
              - Prasad
              Kirk Fritsche wrote:
              > Hello,
              >
              > Reading through the documentation on clusters I found the following;
              > A developer may use one of a set of default load handlers or may provide
              > one specifically tailored for the application.
              >
              > I assume this means that I could plug my own load balancing algorithm
              > into the intelligent stubs.
              > If so, then how?
              > Are there any examples of documentation of this, or has anyone else
              > defined their own algorithm.
              >
              > Thanks,
              >
              > Kirk
              

  • Load and Trim Problems with IdeaTab A1000

    Lenovo IdeaTab A1000 16GB at work was a terrible device. Having spent two weeks hanging software. I had to give a warranty repairs.
    After a week of warranty repairs, the device worked for five hours and again hung software ...
    I'm beginning to think that was wrong with the choice of the device.

    I have to try this and I will let you.
              Thanks
              Jon Eagles wrote:
              > All,
              >
              > We have a simple servlet which looks up an RMI object from JNDI and invokes
              > one of its methods in a loop. The RMI object is the HelloClusterImpl
              > example provided by WebLogic. The servlet basically copies the code from
              > the HelloClusterClient. In the cluster property file, our load algorithm is
              > setup to be round-robin. We are using IIS as our web server. If we start
              > up both servers in the cluster and then use another machine as our client to
              > call the HelloClusterClient, we see that the calls to HelloClusterImpl
              > alternate between the two clustered servers. In fact, it is done perfectly
              > at 50% for each server. When we run the servlet from with the client's
              > browser, however, it seems as if which ever server in the cluster that
              > receives the servlet request then takes 100% of the calls to
              > HelloClusterImpl and there is never any alternating. Although we can verify
              > that different servers in the cluster receive the servlet request, it seems
              > as if there is never any altering between the servers during the method
              > invocations on the HelloClusterImpl servant. Does this seem right?
              > Shouldn't there be alternating between the servers? Any help would be
              > greatly appreciated.
              >
              > Thanks,
              >
              > -Jon
              

  • Problems clustering a Weblogic  Stateful EJB 3.0

    Hello!
    I'm developing a Stateful EJB 3.0 with clustering configuration for weblogic 11G. My client gets a reference to the RemoteInterface, invoke a method and it's working. Then I shutdown the server where the EJB was created and the client reinvoke (using the same reference) a method and get's this error:
    javax.ejb.EJBException: Exception waiting for response; nested exception is:
         java.io.EOFException: Connection closed by peer; nested exception is: java.io.EOFException: Connection closed by peer
    java.io.EOFException: Connection closed by peer
         at weblogic.iiop.EndPointImpl.handleCloseConnection(EndPointImpl.java:602)
         at weblogic.iiop.EndPointImpl.processMessage(EndPointImpl.java:545)
         at weblogic.iiop.EndPointImpl.handleMessage(EndPointImpl.java:500)
         at weblogic.iiop.EndPointImpl.dispatch(EndPointImpl.java:324)
         at weblogic.iiop.ConnectionManager.dispatch(ConnectionManager.java:126)
         at weblogic.iiop.MuxableSocketIIOP.dispatch(MuxableSocketIIOP.java:302)
         at weblogic.socket.BaseAbstractMuxableSocket.dispatch(BaseAbstractMuxableSocket.java:298)
         at weblogic.socket.SocketMuxer.readReadySocketOnce(SocketMuxer.java:915)
         at weblogic.socket.SocketMuxer.readReadySocket(SocketMuxer.java:844)
         at weblogic.socket.JavaSocketMuxer.processSockets(JavaSocketMuxer.java:335)
         at weblogic.socket.SocketReaderRequest.run(SocketReaderRequest.java:29)
         at weblogic.work.ExecuteRequestAdapter.execute(ExecuteRequestAdapter.java:21)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:145)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:117)
    javax.ejb.EJBException: Exception waiting for response; nested exception is:
         java.io.EOFException: Connection closed by peer; nested exception is: java.io.EOFException: Connection closed by peer
         at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.unwrapRemoteException(RemoteBusinessIntfProxy.java:109)
         at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.invoke(RemoteBusinessIntfProxy.java:91)
         at $Proxy0.getMas(Unknown Source)
         at com.ibermatica.pruebas.pruebaEJB30SF.getPrueba(pruebaEJB30SF.java:79)
         at com.ibermatica.pruebas.pruebaEJB30SF.main(pruebaEJB30SF.java:26)
    Caused by: java.io.EOFException: Connection closed by peer
         at weblogic.iiop.EndPointImpl.handleCloseConnection(EndPointImpl.java:602)
         at weblogic.iiop.EndPointImpl.processMessage(EndPointImpl.java:545)
         at weblogic.iiop.EndPointImpl.handleMessage(EndPointImpl.java:500)
         at weblogic.iiop.EndPointImpl.dispatch(EndPointImpl.java:324)
         at weblogic.iiop.ConnectionManager.dispatch(ConnectionManager.java:126)
         at weblogic.iiop.MuxableSocketIIOP.dispatch(MuxableSocketIIOP.java:302)
         at weblogic.socket.BaseAbstractMuxableSocket.dispatch(BaseAbstractMuxableSocket.java:298)
         at weblogic.socket.SocketMuxer.readReadySocketOnce(SocketMuxer.java:915)
         at weblogic.socket.SocketMuxer.readReadySocket(SocketMuxer.java:844)
         at weblogic.socket.JavaSocketMuxer.processSockets(JavaSocketMuxer.java:335)
         at weblogic.socket.SocketReaderRequest.run(SocketReaderRequest.java:29)
         at weblogic.work.ExecuteRequestAdapter.execute(ExecuteRequestAdapter.java:21)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:145)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:117)
    The description of my test is:
    +I have a Weblogic cluster (c1, c2)
    +I have developed an 3.0 Stateful EJB (configurated for replication)
    +My client  gets an EJB Instance from c1 and invoke one method (debugging)
    +I stops my client
    +I shutdown my server (c1)
    +My client invokes another EJB method end gets the error described before.
    It seems like the Server don't replicate the EJB.
    My replicatión ejb deployment descriptor is (weblogic.xml):
    <weblogic-enterprise-bean>
    <ejb-name>Session30EJBSFBean</ejb-name>
    <stateful-session-descriptor>
    <stateful-session-clustering>
    <!--<home-is-clusterable>true</home-is-clusterable>
    <home-load-algorithm>random</home-load-algorithm>
    <replication-type>InMemory</replication-type>-->
    <use-serverside-stubs>true</use-serverside-stubs>
    <replication-type>InMemory</replication-type>
    </stateful-session-clustering>
    </stateful-session-descriptor>
    </weblogic-enterprise-bean>
    My ejb bean class is:
    @Stateful(name = "Session30EJBSF", mappedName = "clustering30-cluster301-Session30EJBSF")
    @Remote
    public class Session30EJBSFBean implements Session30EJBSF {
    private SessionContext _context;
    private int contador= 0;
    private String user="";
    public Session30EJBSFBean() {
    public void inicio(String user){
    this.user= user;
    contador=0;
    public void mas(){
    contador++;
    public int getMas(){
    return contador;
    public String getUser(){
    return this.user;
    My Remote EJB:
    import javax.ejb.Remote;
    @Remote
    public interface Session30EJBSF {
    public void inicio(String user);
    public void mas();
    public int getMas();
    public String getUser();
    My client:
    public class pruebaEJB30SF {
    public pruebaEJB30SF() {
    super();
    public static void main(String[] args) {
    pruebaEJB30SF pruebaEJB30SF = new pruebaEJB30SF();
    try {
    pruebaEJB30SF.getPrueba();
    } catch (Exception e) {
    e.printStackTrace();
    public Context getInitialContext() throws NamingException {
    //String url="t3://c1:8001";
    String url="iiop://c1:8001";
    String user="any";
    String password="any";
    Properties p= new Properties();
    //p.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.T3InitialContextFactory");
    p.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
    p.put(Context.PROVIDER_URL,url);
    p.put(Context.SECURITY_PRINCIPAL,user);
    p.put(Context.SECURITY_CREDENTIALS,password);
    return new InitialContext(p);
    public void getPrueba() throws NamingException, RemoteException,
    CreateException {
    // <PROFILING>
    Context ctx= getInitialContext();
    //2.0 Stateful
    Object ref= ctx.lookup("clustering30-cluster301-Session30EJBSF#.Session30EJBSF");
    Session30EJBSF home= (Session30EJBSF)PortableRemoteObject.narrow(ref, Session30EJBSF.class);
    Session30EJBSF ejb=home;
    ejb.inicio("User1");
    ejb.mas();
    System.out.println( ejb.getMas());// I put here a breakpoint and I shutdown the serer c1
    ejb.mas();
    System.out.println( ejb.getMas());
    ejb.mas();
    System.out.println( ejb.getMas());//Caida
    ejb.mas();
    System.out.println( ejb.getMas());
    I have developed a EJB 2.1 and a EJB 2.1 client and it's working. The most important change betwin ejb 3.0 client and my 2.1 client is that in 2.1 I use the getHandle method and a Home, not a Remote.
    Please, can anyone help me.
    Thanks.

    Hi,
    Please change your Client Code as below: URL must be pointing to the comma Separated address of your ManagedServers Address/Port which are part of Cluster like For Example Suppose you have 2 managedServers in ClusterA ..... t3://MS1Host:8003,MS2Host:8005
    public Context getInitialContext() throws NamingException {
    <strike><font color=red>String url="t3://c1:8001";</font></strike>
    <b>String url="t3://ManagedServer1HostName:port,ManagedServer2HostName:port";</b>
    String user="any";
    String password="any";
    Properties p= new Properties();
    p.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
    p.put(Context.PROVIDER_URL,url);
    p.put(Context.SECURITY_PRINCIPAL,user);
    p.put(Context.SECURITY_CREDENTIALS,password);
    return new InitialContext(p);
    Thanks
    Jay SenSharma
    http://weblogic-wonders.com/weblogic (WebLogic Wonders Are here)

  • Setting up a cluster for the first time: newbie questions

    Any help appreciated with this situation:
              I'm trying to set up a cluster for the first time and running into
              issues (no big surprise). I'll outline my situation and pose questions
              as they arise. If/when I get things to work I'll post a step-by-step
              summary of what it took to get a simple cluster going.
              Here's what I have:
              machines:
              1 Windows 2000 machines with WL 6.1
              2 RedHat Linux machines with WL 6.1
              All machines are on the same Home LAN, can see each other, etc.
              IP addresses are:
              Windows box: 192.168.1.100
              Linux box 1: 192.168.1.102
              Linux box 2: 192.168.1.103
              servers:
              I've set up the Windows machine as my admin server, and set up
              a managed server on each Linux machine. I created a cluster that consists
              of the 2 Linux machines and deployed the web app and EJB to the cluster.
              The Windows machine is acting as a Proxy using ClusterServlet.
              The web application has been set as the Default Web Application on the
              two Linux machines. All 3 machines are listening on ports 80/443. I also
              set up session memory replication through the console.
              Application:
              I have an application that I package as an EAR file. I'm using it as a
              "reference" application designed to mimic a real world app as much as possible.
              The EAR file contains a web application that uses Struts. It also consists
              of a single Stateless Session Bean. The WAR file and EJB Jar are all
              packaged up into the EAR file. I've been able to run this application just
              fine on a single managed server on all 3 machines.
              The web application works fine, and it can invoke the EJB. I can also
              invoke the EJB from Java stand-alone clients. Struts works great. All is
              well with the world. Now I'm trying to "cluster-ize" this app using
              the environment described above and encountering issues.
              I've read the docs and followed the instructions according to the
              "Weblogic Bible" book. I can bring up all 3 servers and the Linux
              managed servers connect to the cluster just fine. I can also
              see the Struts messages in their logs which normally happens and tells me
              the webapp is initialized properly. The console tells me that the managed
              servers are running. I get no error messages starting up any of the serves.
              Here are the problems I am encountering.
              When I try to access the Web Application (through a browser on the
              Windows machine using http://localhost) I get the following error message:
              <Nov 19, 2002 6:44:33 AM EST> <Error> <HTTP> <HttpServer(1754841,null default ct
              x,admin) found no context for "/". This request does not match the context path
              for any installed web applications and there is no default web application confi
              gured.>
              Also, when I try to invoke the EJB through a stand-alone Java client,
              I get a JNDI lookup error on the EJB's home interface.
              Questions:
              Question1: I noticed when setting up the machines that console lets you
              define a "Machine" or a "Unix Machine". What's the difference? Should I
              define the Linux machines as Unix machines or machines, and what are the
              consequences of either choice?
              Question2:
              I'm not totally clear on how my web.xml should look to set up Struts,
              the ClusterServlet, and a servlet filter I'm using to test Servlet filters.
              Here is what I had before I tried to cluster and which works fine:
              <filter>
              <filter-name>MainFilter</filter-name>
              <filter-class>com.refapp.servlets.MainFilter</filter-class>
              <init-param>
              <param-name>myAttribute</param-name>
              <param-value>Foo</param-value>
              </init-param>
              </filter>
              <filter-mapping>
              <filter-name>MainFilter</filter-name>
              <url-pattern>/*</url-pattern>
              </filter-mapping
              <!-- Struts ActionServlet Configuration -->
              <servlet>
              <servlet-name>action</servlet-name>
              <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
              <init-param>
              <param-name>application</param-name>
              <param-value>refappstruts</param-value>
              </init-param>
              <init-param>
              <param-name>config</param-name>
              <param-value>/WEB-INF/struts-config.xml</param-value>
              </init-param>
              <init-param>
              <param-name>debug</param-name>
              <param-value>2</param-value>
              </init-param>
              <init-param>
              <param-name>mapping</param-name>
              <param-value>org.apache.struts.action.RequestActionMapping</param-value>
              </init-param>
              <load-on-startup>2</load-on-startup>
              </servlet>
              <servlet-mapping>
              <servlet-name>action</servlet-name>
              <url-pattern>*.do</url-pattern>
              </servlet-mapping>
              <welcome-file-list>
              <welcome-file>index.do</welcome-file>
              <welcome-file>index.jsp</welcome-file>
              <welcome-file>index.html</welcome-file>
              </welcome-file-list>
              (I have set up a "dummy" 0-length file called index.do that triggers
              Struts to go into its ActionServlet when first accessing the web site).
              Here is how I added ClusterServlet to web.xml:
              servlet>
              <servlet-name>ClusterServlet</servlet-name>
              <servlet-class>weblogic.servlet.internal.HttpClusterServlet</servlet-class>
              <load-on-startup>0</load-on-startup>
              <init-param>
              <param-name>defaultServers</param-name>
              <param-value>192.168.1.102:80:443|192.168.1.103:80:443</param-value>
              </init-param>
              <init-param>
              <param-name>DebugConfigInfo</param-name>
              <param-value>ON</param-value>
              </init-param>
              </servlet>
              <servlet-mapping>
              <servlet-name>InitServlet</servlet-name>
              <url-pattern>/servlet/InitServlet</url-pattern>
              </servlet-mapping>
              <servlet-mapping>
              <servlet-name>action</servlet-name>
              <url-pattern>*.do</url-pattern>
              </servlet-mapping>
              <servlet-mapping>
              <servlet-name>ClusterServlet</servlet-name>
              <url-pattern>/</url-pattern>
              </servlet-mapping>
              <servlet-mapping>
              <servlet-name>ClusterServlet</servlet-name>
              <url-pattern>*.html</url-pattern>
              </servlet-mapping>
              <servlet-mapping>
              <servlet-name>ClusterServlet</servlet-name>
              <url-pattern>*.jsp</url-pattern>
              </servlet-mapping>
              <servlet-mapping>
              <servlet-name>ClusterServlet</servlet-name>
              <url-pattern>*.do</url-pattern>
              </servlet-mapping>
              Clearly there is a problem with the Default Web application not being
              seen/mapped properly. Any chances my URL mappings for the filter servlet,
              Struts, and ClusterServlet are stepping on each other?
              With respect to the EJB, here is what my weblogic-ejb-jar looks like:
              <weblogic-ejb-jar>
              <weblogic-enterprise-bean>
              <ejb-name>Hello</ejb-name>
              <stateless-session-descriptor>
              <pool>
                   <max-beans-in-free-pool>100</max-beans-in-free-pool>
              </pool>
              <stateless-clustering>
              <stateless-bean-is-clusterable>true</stateless-bean-is-clusterable>
              <stateless-bean-load-algorithm>
              round-robin
              </stateless-bean-load-algorithm>
              <stateless-bean-methods-are-idempotent>
              true
              </stateless-bean-methods-are-idempotent>
              </stateless-clustering>
              </stateless-session-descriptor>
              <jndi-name>Hello.Home</jndi-name>
              </weblogic-enterprise-bean>
              I run this through ejbc and package everything up into the EAR file.
              However, I get a JNDI lookup failure when I try to access the Bean from
              a standalone Java client running on the Windows machine.
              Here is the jndi.properties file that I am using:
              java.naming.factory.initial=weblogic.jndi.WLInitialContextFactory
              java.naming.provider.url=t3://localhost:80
              Any ideas what I'm doing wrong here? I can post config.xml also if needed.
              Thanks in advance!
              

    Let me try to answer :)....
              A1> No need to name diff machines by default weblogic
              considers the servers are physically located in diff boxes.
              The names are used to differtiate the mang servers which are in
              multihomed
              Some things to chk
              1> Did u targeted the ear file Target as cluster.
              2> Can u see on the Admin console that both the man servers
              are participated in the cluster( u can see by clicking the monitoring
              tab on the Cluster node).
              3>Is the URL:PORT for the default web app correct?
              the reason: is I dont see the port# on the link u mentioned
              4> probably ur ejb might not been deployed on the target thats the
              reason u cant access thru java client. If u correct the targets that
              will probably fix it.
              Hope this helps
              Please post the result
              Thanks
              Sudhir
              [email protected] (Chris) wrote in message news:<[email protected]>...
              > Any help appreciated with this situation:
              > I'm trying to set up a cluster for the first time and running into
              > issues (no big surprise). I'll outline my situation and pose questions
              > as they arise. If/when I get things to work I'll post a step-by-step
              > summary of what it took to get a simple cluster going.
              > Here's what I have:
              >
              > machines:
              > 1 Windows 2000 machines with WL 6.1
              > 2 RedHat Linux machines with WL 6.1
              > All machines are on the same Home LAN, can see each other, etc.
              > IP addresses are:
              > Windows box: 192.168.1.100
              > Linux box 1: 192.168.1.102
              > Linux box 2: 192.168.1.103
              >
              > servers:
              > I've set up the Windows machine as my admin server, and set up
              > a managed server on each Linux machine. I created a cluster that consists
              > of the 2 Linux machines and deployed the web app and EJB to the cluster.
              > The Windows machine is acting as a Proxy using ClusterServlet.
              > The web application has been set as the Default Web Application on the
              > two Linux machines. All 3 machines are listening on ports 80/443. I also
              > set up session memory replication through the console.
              >
              > Application:
              > I have an application that I package as an EAR file. I'm using it as a
              > "reference" application designed to mimic a real world app as much as possible.
              > The EAR file contains a web application that uses Struts. It also consists
              > of a single Stateless Session Bean. The WAR file and EJB Jar are all
              > packaged up into the EAR file. I've been able to run this application just
              > fine on a single managed server on all 3 machines.
              > The web application works fine, and it can invoke the EJB. I can also
              > invoke the EJB from Java stand-alone clients. Struts works great. All is
              > well with the world. Now I'm trying to "cluster-ize" this app using
              > the environment described above and encountering issues.
              >
              > I've read the docs and followed the instructions according to the
              > "Weblogic Bible" book. I can bring up all 3 servers and the Linux
              > managed servers connect to the cluster just fine. I can also
              > see the Struts messages in their logs which normally happens and tells me
              > the webapp is initialized properly. The console tells me that the managed
              > servers are running. I get no error messages starting up any of the serves.
              >
              > Here are the problems I am encountering.
              >
              > When I try to access the Web Application (through a browser on the
              > Windows machine using http://localhost) I get the following error message:
              >
              > <Nov 19, 2002 6:44:33 AM EST> <Error> <HTTP> <HttpServer(1754841,null default ct
              > x,admin) found no context for "/". This request does not match the context path
              > for any installed web applications and there is no default web application confi
              > gured.>
              >
              > Also, when I try to invoke the EJB through a stand-alone Java client,
              > I get a JNDI lookup error on the EJB's home interface.
              >
              > Questions:
              > Question1: I noticed when setting up the machines that console lets you
              > define a "Machine" or a "Unix Machine". What's the difference? Should I
              > define the Linux machines as Unix machines or machines, and what are the
              > consequences of either choice?
              >
              > Question2:
              > I'm not totally clear on how my web.xml should look to set up Struts,
              > the ClusterServlet, and a servlet filter I'm using to test Servlet filters.
              > Here is what I had before I tried to cluster and which works fine:
              >
              > <filter>
              > <filter-name>MainFilter</filter-name>
              > <filter-class>com.refapp.servlets.MainFilter</filter-class>
              > <init-param>
              > <param-name>myAttribute</param-name>
              > <param-value>Foo</param-value>
              > </init-param>
              > </filter>
              >
              > <filter-mapping>
              > <filter-name>MainFilter</filter-name>
              > <url-pattern>/*</url-pattern>
              > </filter-mapping
              >
              >
              > <!-- Struts ActionServlet Configuration -->
              > <servlet>
              > <servlet-name>action</servlet-name>
              > <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
              >
              > <init-param>
              > <param-name>application</param-name>
              > <param-value>refappstruts</param-value>
              > </init-param>
              >
              > <init-param>
              > <param-name>config</param-name>
              > <param-value>/WEB-INF/struts-config.xml</param-value>
              > </init-param>
              >
              > <init-param>
              > <param-name>debug</param-name>
              > <param-value>2</param-value>
              > </init-param>
              >
              > <init-param>
              > <param-name>mapping</param-name>
              > <param-value>org.apache.struts.action.RequestActionMapping</param-value>
              > </init-param>
              > <load-on-startup>2</load-on-startup>
              > </servlet>
              >
              > <servlet-mapping>
              > <servlet-name>action</servlet-name>
              > <url-pattern>*.do</url-pattern>
              > </servlet-mapping>
              >
              > <welcome-file-list>
              > <welcome-file>index.do</welcome-file>
              > <welcome-file>index.jsp</welcome-file>
              > <welcome-file>index.html</welcome-file>
              > </welcome-file-list>
              >
              > (I have set up a "dummy" 0-length file called index.do that triggers
              > Struts to go into its ActionServlet when first accessing the web site).
              >
              > Here is how I added ClusterServlet to web.xml:
              >
              > servlet>
              > <servlet-name>ClusterServlet</servlet-name>
              > <servlet-class>weblogic.servlet.internal.HttpClusterServlet</servlet-class>
              > <load-on-startup>0</load-on-startup>
              > <init-param>
              > <param-name>defaultServers</param-name>
              > <param-value>192.168.1.102:80:443|192.168.1.103:80:443</param-value>
              > </init-param>
              > <init-param>
              > <param-name>DebugConfigInfo</param-name>
              > <param-value>ON</param-value>
              > </init-param>
              > </servlet>
              >
              > <servlet-mapping>
              > <servlet-name>InitServlet</servlet-name>
              > <url-pattern>/servlet/InitServlet</url-pattern>
              > </servlet-mapping>
              >
              > <servlet-mapping>
              > <servlet-name>action</servlet-name>
              > <url-pattern>*.do</url-pattern>
              > </servlet-mapping>
              >
              > <servlet-mapping>
              > <servlet-name>ClusterServlet</servlet-name>
              > <url-pattern>/</url-pattern>
              > </servlet-mapping>
              >
              > <servlet-mapping>
              > <servlet-name>ClusterServlet</servlet-name>
              > <url-pattern>*.html</url-pattern>
              > </servlet-mapping>
              >
              > <servlet-mapping>
              > <servlet-name>ClusterServlet</servlet-name>
              > <url-pattern>*.jsp</url-pattern>
              > </servlet-mapping>
              >
              > <servlet-mapping>
              > <servlet-name>ClusterServlet</servlet-name>
              > <url-pattern>*.do</url-pattern>
              > </servlet-mapping>
              >
              >
              > Clearly there is a problem with the Default Web application not being
              > seen/mapped properly. Any chances my URL mappings for the filter servlet,
              > Struts, and ClusterServlet are stepping on each other?
              >
              > With respect to the EJB, here is what my weblogic-ejb-jar looks like:
              >
              > <weblogic-ejb-jar>
              > <weblogic-enterprise-bean>
              > <ejb-name>Hello</ejb-name>
              > <stateless-session-descriptor>
              > <pool>
              >      <max-beans-in-free-pool>100</max-beans-in-free-pool>
              > </pool>
              > <stateless-clustering>
              > <stateless-bean-is-clusterable>true</stateless-bean-is-clusterable>
              > <stateless-bean-load-algorithm>
              > round-robin
              > </stateless-bean-load-algorithm>
              > <stateless-bean-methods-are-idempotent>
              > true
              > </stateless-bean-methods-are-idempotent>
              > </stateless-clustering>
              > </stateless-session-descriptor>
              > <jndi-name>Hello.Home</jndi-name>
              > </weblogic-enterprise-bean>
              >
              > I run this through ejbc and package everything up into the EAR file.
              > However, I get a JNDI lookup failure when I try to access the Bean from
              > a standalone Java client running on the Windows machine.
              > Here is the jndi.properties file that I am using:
              >
              > java.naming.factory.initial=weblogic.jndi.WLInitialContextFactory
              > java.naming.provider.url=t3://localhost:80
              >
              > Any ideas what I'm doing wrong here? I can post config.xml also if needed.
              >
              > Thanks in advance!
              

  • RMI Failover not working in 9.2?

    Setup:
    RMI's RTD.xml
    <cluster
    clusterable="true"
    load-algorithm="round-robin"
    >
    </cluster>
    <method
    name="*"
    idempotent="true"
    timeout="3000"
    >
    </method>
    Cluster
    Srv1=RMI.instance1
    Srv2=RMI.instance2
    Srv3
    Servlet: gets Srv1 context and looks up RMI object, invokes its biz method;
    Loadbalancing works, according to logs.
    Shutdown Srv2 and Srv1 continues processing.
    Restart Srv2 and shutdown Srv1 and the failover should kick in here too, but the connection is now considered broken and results in a Host not reachable exception.
    Can't find any documentation as to what I should be doing different, but I must be missing something.
    Any ideas?
    Karoly

    It just started working, or very likely, it was working from the beginning, but some components were not build/deployed properly.

  • Making requests to a cluster

              Hi,
              I'm a bit confused by the General tab in cluster configuration.
              It contains the following fields:-
              - Name
              - Cluster Address
              - Default Load Algorithm
              - Service Age Threshold
              I understand that hostname/IP(s) that map to one or more servers
              in the cluster goes in Cluster Address. But, if that's the case,
              what party is responsible for scheduling requests to servers
              in th cluster, using the algorithm in Default Load Algorithm? And, how does one
              connect to that party and on what port?
              If the answer is that you have to use your own policy (software
              or hardware load balancing) then what is the purpose of
              the Default Load Algorithm field in WLS 6.1?
              You already configure what servers are on the cluster, so WLS
              knows this already. So why does one have to specify the
              IPs again in Cluster Address? Seems to me, and from other
              messages in this forum, that filling out this tab doesn't have
              much benefit at all.
              Thanks in advance,
              Gary
              FT.com
              

    The cluster address is the DNS round-robin address that clients use in their URL to
              establish
              their initial connection. The cluster address is currently only used by WL in two
              limited cases:
              EJB home handles -- These contain info that can be serialized and passed to a
              client
              which currently may not have a connection to the cluster. The client can use
              the handle to find its associated EJB.
              Entity Bean fail-over -- Allows client to automagically get back to the cluster
              if a connection to the cluster fails.
              Tom
              Gary Watson wrote:
              > Hi,
              >
              > I'm a bit confused by the General tab in cluster configuration.
              > It contains the following fields:-
              > - Name
              > - Cluster Address
              > - Default Load Algorithm
              > - Service Age Threshold
              >
              > I understand that hostname/IP(s) that map to one or more servers
              > in the cluster goes in Cluster Address. But, if that's the case,
              > what party is responsible for scheduling requests to servers
              > in th cluster, using the algorithm in Default Load Algorithm? And, how does one
              > connect to that party and on what port?
              >
              > If the answer is that you have to use your own policy (software
              > or hardware load balancing) then what is the purpose of
              > the Default Load Algorithm field in WLS 6.1?
              >
              > You already configure what servers are on the cluster, so WLS
              > knows this already. So why does one have to specify the
              > IPs again in Cluster Address? Seems to me, and from other
              > messages in this forum, that filling out this tab doesn't have
              > much benefit at all.
              >
              > Thanks in advance,
              > Gary
              > FT.com
              > ______________________________________________________________
              

Maybe you are looking for