[jboss-user] [Clustering/JBoss] - Re: Load balancing and dev environment
bstansberry@jboss.com
do-not-reply at jboss.com
Tue Mar 4 14:12:32 EST 2008
For EJB2, you can change the defaults in the conf/standardjboss.xml file. File contains a number of "container-configuration" elements; search for those that include a "cluster-config" subelement. Each is the default for a particular type of clustered EJB.
| <cluster-config>
| <partition-name>${jboss.partition.name:DefaultPartition}</partition-name>
| </cluster-config>
You can change the default load balance polices by adding sub-elements:
| <cluster-config>
| <partition-name>${jboss.partition.name:DefaultPartition}</partition-name>
| <home-load-balance-policy>org.jboss.ha.framework.interfaces.FirstAvailableIdenticalAllProxies</home-load-balance-policy>
| <bean-load-balance-policy>org.jboss.ha.framework.interfaces.FirstAvailableIdenticalAllProxies</bean-load-balance-policy>
| </cluster-config>
|
For EJB3 I don't see a clean way to override the default. It's configured via the deploy/ejb3-interceptors-aop.xml file. There's two sections
| <domain name="Stateless Bean">
| ......
| </domain>
|
and
| <domain name="Stateful Bean">
| ......
| </domain>
|
where perhaps you could try adding something like:
| <annotation expr="class(@org.jboss.annotation.ejb.Clustered)">
| @org.jboss.annotation.ejb.Clustered(loadBalancePolicy=org.jboss.ha.framework.interfaces.FirstAvailableIdenticalAllProxies.class)
| </annotation>
|
i.e. attempt to override the annotation value for beans that have @Clustered. Don't know if that would work. If it does work it will remove the ability to annotate a particular class with different values from what you specify here.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4134031#4134031
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4134031
More information about the jboss-user
mailing list