[jboss-user] [EJB 3.0 Users] - Clustered Session Beans with additional HTTP Remote Proxies

jkonieczny do-not-reply at jboss.com
Fri Oct 30 21:04:17 EDT 2009

Bumped into the following issue, not sure if I'm doing something silly, or if I've wandered into an interesting pothole...

We have a number of stateless session beans that we're using two remote proxies for, one RMI and one HTTPS. They deploy initially just fine and work as expected. When we attempt to redeploy them, the redeploy fails on a NameAlreadyBoundException on the HTTPS bind point. 

Narrowed it to a simplified test case and the problem seems to be the combination of clustering and the HTTP or HTTPS remoting proxy. 

Test case is a single EJB with no meaningful logic (echo method that round-trips a String) packaged in a jar packaged in an ear. Server is 5.1.0.GA

The jboss.xml for the jar is:

  | <?xml version="1.0"?>
  | <jboss xmlns="http://www.jboss.com/xml/ns/javaee"
  |         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  |         xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee
  | http://www.jboss.org/j2ee/schema/jboss_5_1.xsd"
  |         version="3.0">
  |   <enterprise-beans>
  |     <session>
  |       <ejb-name>TestBean</ejb-name>
  |       <remote-binding>
  |         <jndi-name>TestBean/remote</jndi-name>
  |       </remote-binding>
  |       <remote-binding>
  |         <jndi-name>TestBean/remotehttps</jndi-name>
  |         <client-bind-url>
  |                   https://${public.firewall.address}/servlet-invoker/SSLServerInvokerServlet
  |         </client-bind-url>
  |       </remote-binding>
  |       <clustered>true</clustered>
  |     </session>
  |   </enterprise-beans>
  | </jboss>

Granted clustering doesn't add anything to the HTTP remoting (fail-over and load balancing are performed upstream), but we do need it for the RMI proxies.

Remove the clustered annotation and you can deploy/undeploy/redeploy till the cows come home. Ditto with leaving the clustered but taking out the https binding.

Is there a way to have the clustering only apply to certain remote bindings, or alternatively to have the same bean listed multiple times in the jboss.xml file (other than to transparently subclass the bean implementing the same interfaces)?

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4263280#4263280

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4263280

More information about the jboss-user mailing list