This discussion is archived
1 2 Previous Next 15 Replies Latest reply: Nov 3, 2010 12:16 PM by 778462 RSS

JMS load-balancing question

778462 Newbie
Currently Being Moderated
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.
  • 1. Re: JMS load-balancing question
    653697 Journeyer
    Currently Being Moderated
    First of all, “non-anonymous producers” are the producers that are created with a non-null destination object and send messages without supplying a destination object (say using MessageProducer. send(Message message) API instead of MessageProducer. send(Destination destination, Message message).

    Secondly WLS JMS producer load balancing takes into consideration two parameters configured on the connection factory: Server Affinity Enabled (the default is true) and Load Balancing Enabled (the default is true). The behavior of queue senders and topic publishers are different.

    -- DT Publishers
    Senders to DTs always load balance once and then pin to a particular member for all messages – this member becomes the “sender host”. Once a message arrives on its sender host, the message is automatically replicated to every subscription on every DT member. If you want to control the initial load balance decision for the sender host so that it is not biased towards being the same as its connection host, then disable “Server Affinity” (enabled by default), and enable “Load Balancing” (which is the default).

    -- DQ Senders
    The default behavior for a sender to a DQ is if there are members that run on the sender's connection host (the server that hosts the sender’s connection), all sent messages go to one of these local members, otherwise messages round-robin among all members. To force messages from the same DQ sender to round-robin among all active members even when local members reside on the sender's connection host, then disable “Server Affinity” (enabled by default), and enable “Load Balancing” (which is the default).

    Most likely you need to disable server affinity on the connection factory.

    On top of these, there are a couple heuristics that also contribute to the decision. The heuristics for producer load balancing are
    1. transaction affinity -- when producing multiple messages within a transacted session, an effort is made to send all messages produced to the same WebLogic Server
    2. queue members with zero consumers are not considered for message production, unless all instances of the given queue have zero consumers.
    3. members are paused for production will not be considered for message production.

    So please also make sure that there are consumers on none or all of the queue members.

    For more details about load balancing, please refer to the following edoc.
    http://download.oracle.com/docs/cd/E14571_01/web.1111/e13738/advance_config.htm#i1076739
  • 2. Re: JMS load-balancing question
    778462 Newbie
    Currently Being Moderated
    Hello,

    First thanks for your reply.

    My tests has been run using a distributed queue (one physical queue per managed (so JMSServer)) with 2 managed servers.

    I have also configured the connection factory to not have server affinity (disable) and to have load balancing (enable).
    Then once my JMS connection has been created I have created 2 JMS sessions and associated producer which sends messages, let's 50 for each producer.

    Then I looked at the number of messages stored into each physical queue linked to each JMSServer. I see 50 on each queues: fine.
    Then i reduced the number of session from 2 to 1 and performed the same test: i was expecting to have 25 on each physical queue if each send call will be load balanced but I have not seen that. Is it because in the send call I have not called the right api (send with 2 arguments) ?

    I will try and let you know.

    Best Regards.
  • 3. Re: JMS load-balancing question
    778462 Newbie
    Currently Being Moderated
    Hello again,

    OK forget about my 2 last sentences in my previous post.
    According what you have said the code I have written used "non-anonymous producer".

    So the question of my previous reply remains: I was expecting to have, when I have reduced the number of JMS session from 2 to 1, the same number of messages in the 2 physical queues* according the "Load Balancing Enabled" option help which states:
    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()+

    And yes I can confirm you that there is no consumer on that distributed queue when I have perfomed my test.

    Any explanation ? Or the help is wrong ?

    Best Regards.

    Edited by: user12154507 on 13 oct. 2010 19:22

    Edited by: user12154507 on 13 oct. 2010 19:25
  • 4. Re: JMS load-balancing question
    653697 Journeyer
    Currently Being Moderated
    I assume that you are using a non-anonymous producer and sending messages using send(Message msg) API. Are you sending to a distributed destination (say look up this destination using the jndi name of the DD) or a member of a distributed destination (say look up the destination using the member's jndi name)?
  • 5. Re: JMS load-balancing question
    778462 Newbie
    Currently Being Moderated
    Hello,

    I was sending to a distributed queue (DQ). The jndi name, when I performed my jndi lookup, was the one of the distributed queue.

    So have you an idea ?

    Best Regards.

    Edited by: user12154507 on 15 oct. 2010 21:58
  • 6. Re: JMS load-balancing question
    653697 Journeyer
    Currently Being Moderated
    I don't think you are seeing the expected behavior. If you would like someone to double check your configuration and code, please post your config.xml and jms module file, as well as the producer code snippet.
  • 7. Re: JMS load-balancing question
    778462 Newbie
    Currently Being Moderated
    Hello,

    Sorry for the delay but I was managing other subjects.
    How can I attach the files you requested ?

    Best Regards.
  • 8. Re: JMS load-balancing question
    778462 Newbie
    Currently Being Moderated
    Hello,

    Anyway, it is the JMS module configuration I use:

    <?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.0/weblogic-jms.xsd">
    <connection-factory name="TestConnectionFactory">
    <default-targeting-enabled>true</default-targeting-enabled>
    <jndi-name>queue/TestConnectionFactory</jndi-name>
    <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>
    <queue name="TestQueueM1">
    <sub-deployment-name>TestQueueM1</sub-deployment-name>
    <jndi-name>queue/TestQueueM1</jndi-name>
    </queue>
    <queue name="TestQueueM2">
    <sub-deployment-name>TestQueueM2</sub-deployment-name>
    <jndi-name>queue/TestQueueM2</jndi-name>
    </queue>
    <distributed-queue name="TestJMSQueue">
    <jndi-name>queue/TestJMSQueue</jndi-name>
    <load-balancing-policy>Round-Robin</load-balancing-policy>
    <unit-of-order-routing>Hash</unit-of-order-routing>
    <saf-export-policy>All</saf-export-policy>
    <distributed-queue-member name="TestQueueM1"></distributed-queue-member>
    <distributed-queue-member name="TestQueueM2"></distributed-queue-member>
    <forward-delay>-1</forward-delay>
    <reset-delivery-count-on-forward>true</reset-delivery-count-on-forward>
    </distributed-queue>
    </weblogic-jms>


    Best Regards.
  • 9. Re: JMS load-balancing question
    778462 Newbie
    Currently Being Moderated
    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#1.0@1.0.3</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#1.0@1.0.1</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.
  • 10. Re: JMS load-balancing question
    778462 Newbie
    Currently Being Moderated
    Hello,

    The code snippet:

    TestJMSLB.java
    public class TestJMSLB {
         
         public void JMSSend(Context ctxt) {
              final int NB_SESSION = 1;
              Session jmsSession = null;
              Connection jmsConnection = null;
              
              try {
                   final Destination dest = (Destination) ctxt.lookup("jms/MyDistributedQueue");
                   final ConnectionFactory cf = (ConnectionFactory) ctxt.lookup("jms/TestConnectionFactory");
                   final List<Thread> listOfPublisherThread = new ArrayList<Thread>();               

                   jmsConnection = cf.createConnection();               
    //               jmsConnection = cf.createConnection("user", "password");

                   for (int i = 0; i < NB_SESSION; i++) {
                        jmsSession = jmsConnection.createSession(true, 0);
                        PublisherThread pt = new PublisherThread(jmsSession, dest, "Session " + i);
                        Thread t = new Thread(pt);
                        listOfPublisherThread.add(t);
                   }
                   
                   
                   for (Thread t : listOfPublisherThread) {
                        t.start();
                   }
                   
                   try {
                        Thread.sleep(3600000L); // To be sure
                        System.out.println("having wait for 1 hour !");
                   } catch (InterruptedException e) {
                        e.printStackTrace();
                   }
              } catch (NamingException e) {
                   e.printStackTrace();
              } catch (JMSException jmsEx) {
                   jmsEx.printStackTrace();               
              } finally {
                   try {
                        System.out.println("JMS close all !");
                        jmsConnection.close();
                   } catch (JMSException e) {
                        e.printStackTrace();
                   }
              }
         }

         /**
         * @param args
         */
         public static void main(String[] args) {
              final int NB_CLIENT = 1;

              final Hashtable<String, String> env = new Hashtable<String, String>();
              env.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
              env.put(Context.PROVIDER_URL, "t3://myhost:20011,myhost:20021"); //on myhost
              Context ctxt = null;
              
              try {
                   ctxt = new InitialContext(env);
              } catch (NamingException e) {
                   e.printStackTrace();
              }
              
              for (int i=0; i < NB_CLIENT; i++) {
              TestJMSLB testJMSLB = new TestJMSLB();
              testJMSLB.JMSSend(ctxt);
              }          
         }

    }

    And PublisherThread.java

    public class PublisherThread implements Runnable {
         Session jmsSession = null;
         Destination dest;
         String name;
         
         public PublisherThread(final Session jmsSession, final Destination dest, final String name) {
              this.jmsSession = jmsSession;
              this.dest = dest;
              this.name = name;
         }
         
         @Override
         public void run() {
              final int NB_MESS_TO_SEND = 50;

              try {
                   final MessageProducer mp = jmsSession.createProducer(dest);
                   System.out.println("Sending " + NB_MESS_TO_SEND + " messages from "+ name + " ...");
                   
                   for (int i = 0; i < NB_MESS_TO_SEND; i++) {
                        final Message mess = jmsSession.createTextMessage("Test_" + i);
                        
                        mp.send(mess);
                        jmsSession.commit();
                   }
                   System.out.println("All message from " + name + " has been sent.");
              } catch (JMSException e) {
                   e.printStackTrace();
              } finally {
                   try {
                        jmsSession.close();
                   } catch (JMSException e) {
                        e.printStackTrace();
                   }
              }
              

         }

    }

    Best Regards.

    Edited by: user12154507 on 25 oct. 2010 09:57

    Edited by: user12154507 on 3 nov. 2010 19:13
  • 11. Re: JMS load-balancing question
    653697 Journeyer
    Currently Being Moderated
    Okay. The problem is that you are using transacted sessions (the first parameter in createSession call). As I mentioned in one of my earlier responses, one of the load balancing heuristics is Transaction Affinity. When you used two producers you had two different transacted sessions, and now that you only have one transacted session since you only have one thread.

    BTW, I noticed that you are using weighted distributed destination. Oracle recommends customers to use uniform distributed destinations.

    Best Regards.
  • 12. Re: JMS load-balancing question
    778462 Newbie
    Currently Being Moderated
    Hello,

    First thanks a lot again for your explanation.

    I will try with non transacted session and you're right when you mentioned transaction affinity in one of your previous post (my apalogize)
    Dongbo wrote:
    On top of these, there are a couple heuristics that also contribute to the decision. The heuristics for producer load balancing are
    1. transaction affinity -- when producing multiple messages within a transacted session, an effort is made to send all messages produced to the same >WebLogic Server
    Best Regards.
  • 13. Re: JMS load-balancing question
    778462 Newbie
    Currently Being Moderated
    Hello,

    So, with the same configuration, I have only made some modifications in my code and have tested again. The result is KO: the 50 messages are stored only in one physical queue :-(

    The modifications I have made are:
    - in TestJMSLB.java replace jmsSession = jmsConnection.createSession(true, 0); by
    jmsSession = jmsConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
    - in PublisherThread.java remove the line jmsSession.commit();

    So what's wrong ?

    Best Regards.
  • 14. Re: JMS load-balancing question
    778462 Newbie
    Currently Being Moderated
    Hello,

    Forget my last message. I haven't started my 2nd managed instance.

    So the result is OK :-)
    After having run my test, I can see now 25 messages in one physical queue and 25 messages in the second physical queue.

    Thanks you very much !

    Best Regards.

    Edited by: user12154507 on 29 oct. 2010 15:51
1 2 Previous Next

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points