-
1. Re: client-side invoker load-balance logic in code?
jason1 Aug 31, 2005 5:49 PM (in response to jason1)Hmmm... org.jboss.invocation.jrmp.server.JRMPInvokerHA ?? Too bad I don't see this in my debugger. I guess that might be why it is not loadbalancing properly.
I've defined my SLSB as "Clustered Stateless SessionBean" from standardjboss.xml. I figured that would through the JRMPInvokerHA into the mix for me. -
2. Re: client-side invoker load-balance logic in code?
anguyen Aug 31, 2005 7:40 PM (in response to jason1)Can you post your jboss.xml from your ejb jar?
-
3. Re: client-side invoker load-balance logic in code?
jason1 Sep 1, 2005 10:55 AM (in response to jason1)Here it is. The EJB in question is DelegateSLSBean. It has a configured container of "DelegateSLSBean Clustered Container" which extends a clustered container in standardjboss.xml.
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE jboss PUBLIC "-//JBoss//DTD JBOSS 4.0//EN" "http://www.jboss.org/j2ee/dtd/jboss_4_0.dtd"> <jboss> <unauthenticatedPrincipal>guest</unauthenticatedPrincipal> <enterprise-beans> <message-driven> <ejb-name>DelegateTopicChannelMDB</ejb-name> <destination-jndi-name>topic/DelegateTopic</destination-jndi-name> <mdb-user>GUEST</mdb-user> <mdb-passwd>password</mdb-passwd> <configuration-name>DelegateTopicChannelMDB Container</configuration-name> <resource-ref> <res-ref-name>mail/MailSession</res-ref-name> <jndi-name>java:/Mail</jndi-name> </resource-ref> </message-driven> <message-driven> <ejb-name>DelegateQueueChannelMDB</ejb-name> <destination-jndi-name>queue/DelegateQueue</destination-jndi-name> <mdb-user>GUEST</mdb-user> <mdb-passwd>password</mdb-passwd> <configuration-name>DelegateQueueChannelMDB Container</configuration-name> <resource-ref> <res-ref-name>mail/MailSession</res-ref-name> <jndi-name>java:/Mail</jndi-name> </resource-ref> </message-driven> <message-driven> <ejb-name>CommChannelMDB</ejb-name> <destination-jndi-name>queue/CommServerQueue</destination-jndi-name> <mdb-user>GUEST</mdb-user> <mdb-passwd>password</mdb-passwd> <configuration-name>CommChannelMDB Container</configuration-name> <ejb-local-ref> <ejb-ref-name>ejb/Delegate</ejb-ref-name> <jndi-name>DelegateSLSBeanLocal</jndi-name> </ejb-local-ref> </message-driven> <message-driven> <ejb-name>LogChannelMDB</ejb-name> <destination-jndi-name>queue/LogQueue</destination-jndi-name> <mdb-user>GUEST</mdb-user> <mdb-passwd>password</mdb-passwd> <configuration-name>LogChannelMDB Container</configuration-name> <ejb-local-ref> <ejb-ref-name>ejb/Log</ejb-ref-name> <local-jndi-name>LogSLSBean</local-jndi-name> </ejb-local-ref> <depends>application.system:service=UniqueIDGenerator</depends> </message-driven> <message-driven> <ejb-name>RtmsResponseChannelMDB</ejb-name> <destination-jndi-name>queue/RtmsResponseQueue</destination-jndi-name> <mdb-user>GUEST</mdb-user> <mdb-passwd>password</mdb-passwd> <configuration-name>RtmsResponseChannelMDB Container</configuration-name> <depends>application.system:service=UniqueIDGenerator</depends> </message-driven> <message-driven> <ejb-name>RmResponseChannelMDB</ejb-name> <destination-jndi-name>queue/RmResponseQueue</destination-jndi-name> <mdb-user>GUEST</mdb-user> <mdb-passwd>password</mdb-passwd> <configuration-name>RmResponseChannelMDB Container</configuration-name> <depends>application.system:service=UniqueIDGenerator</depends> </message-driven> <session> <ejb-name>cdot.ctms.layer.delegate.facade.DelegateSLSBean</ejb-name> <jndi-name>cdot/ctms/layer/delegate/facade/DelegateSLSBean</jndi-name> <local-jndi-name>DelegateSLSBeanLocal</local-jndi-name> <configuration-name>DelegateSLSBean Clustered Container</configuration-name> <method-attributes> </method-attributes> </session> <session> <ejb-name>DelegateAsyncSLSBean</ejb-name> <local-jndi-name>DelegateAsyncSLSBeanLocal</local-jndi-name> <configuration-name>DelegateAsyncSLSBean Container</configuration-name> <method-attributes> </method-attributes> </session> </enterprise-beans> <resource-managers> </resource-managers> <container-configurations> <!-- These are registered in the respective EJB's .java file using XDoclet --> <container-configuration extends="Standard Stateless SessionBean"> <container-name>DelegateSLSBean Container</container-name> <security-domain>java:/jaas/CTMS-server-security-domain</security-domain> <instance-cache>10</instance-cache> </container-configuration> <container-configuration extends="Clustered Stateless SessionBean"> <container-name>DelegateSLSBean Clustered Container</container-name> <security-domain>java:/jaas/CTMS-server-security-domain</security-domain> <instance-cache>10</instance-cache> </container-configuration> <container-configuration extends="Standard Stateless SessionBean"> <container-name>DelegateAsyncSLSBean Container</container-name> <instance-cache>10</instance-cache> </container-configuration> <!-- Message-Driven Bean Containers. These are registred in jboss-beans.xml --> <container-configuration extends="Standard Message Driven Bean"> <container-name>DelegateTopicChannelMDB Container</container-name> <instance-cache>10</instance-cache> </container-configuration> <container-configuration extends="Standard Message Driven Bean"> <container-name>DelegateQueueChannelMDB Container</container-name> <instance-cache>10</instance-cache> </container-configuration> <container-configuration extends="Standard Message Driven Bean"> <container-name>CommChannelMDB Container</container-name> <instance-cache>10</instance-cache> </container-configuration> <container-configuration extends="Standard Message Driven Bean"> <container-name>LogChannelMDB Container</container-name> <instance-cache>10</instance-cache> </container-configuration> <container-configuration extends="Standard Message Driven Bean"> <container-name>RtmsResponseChannelMDB Container</container-name> <instance-cache>10</instance-cache> </container-configuration> <container-configuration extends="Standard Message Driven Bean"> <container-name>RmResponseChannelMDB Container</container-name> <instance-cache>10</instance-cache> </container-configuration> </container-configurations> </jboss>
-
4. Re: client-side invoker load-balance logic in code?
anguyen Sep 1, 2005 11:56 AM (in response to jason1)Try this:
<session> <ejb-name>cdot.ctms.layer.delegate.facade.DelegateSLSBean</ejb-name> <jndi-name>cdot/ctms/layer/delegate/facade/DelegateSLSBean</jndi-name> <local-jndi-name>DelegateSLSBeanLocal</local-jndi-name> <configuration-name>DelegateSLSBean Clustered Container</configuration-name> <clustered>true</clustered> <cluster-config> <partition-name>DefaultPartition</partition-name> <home-load-balance-policy>org.jboss.ha.framework.interfaces.RoundRobin</home-load-balance-policy> <bean-load-balance-policy>org.jboss.ha.framework.interfaces.RoundRobin</bean-load-balance-policy> </cluster-config> <method-attributes> </method-attributes> </session>
-
5. Re: client-side invoker load-balance logic in code?
jason1 Sep 1, 2005 12:42 PM (in response to jason1)first test.... worked! Thanks! I will verify and post a true confirmation. I always thought that simply extending a "clustered" container configuration from the standardjboss.xml file would ensure that my EJB was also clustered.
-
6. Re: client-side invoker load-balance logic in code?
jason1 Sep 2, 2005 11:29 AM (in response to jason1)confirmed. I will always use true ... etc., etc. from here on out and not rely on extending a particular container for clustered attributes... thanks again.