Hello,
I want to test JBoss' clustering features and it is not showing the wanted
behavior.
I have an stateless ejb called from a Jsp as follows:
| <%@ page import ="javax.ejb.*" %>
| <%@ page import ="javax.naming.*" %>
| <%@ page import ="java.util.*" %>
| <%@ page import ="java.rmi.*" %>
| <%@ page import ="com.mycompany.*" %>
|
|
| <%
| try{
| Properties p = new Properties();
|
p.put(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory");
| p.put(Context.PROVIDER_URL,"127.0.0.1:1099");
| p.put(Context.SECURITY_PRINCIPAL,"sa");
| p.put(Context.SECURITY_CREDENTIALS,"");
| Context context = new InitialContext(p);
| EJBTwoHome home = (EJBTwoHome) context.lookup("EJBTwoHome_R");
| EJBTwo ejbtwo = home.create();
| ejbtwo.print();
| }
| catch(CreateException e){
| e.printStackTrace();
| }
|
| catch(RemoteException e){
| e.printStackTrace();
| }
|
| %>
|
|
I have the following DD
| <?xml version="1.0" encoding="UTF-8"?>
|
| <jboss>
| <enterprise-beans>
| <session>
| <ejb-name>EJBTwo</ejb-name>
| <local-jndi-name>EJBTwoHome_L</local-jndi-name>
| <jndi-name>EJBTwoHome_R</jndi-name>
| <clustered>true</clustered>
| </session>
| </enterprise-beans>
| </jboss>
|
|
I have two jboss instances running on the same machine without port conflicts.
When I point to http://localhost:8080/webTwo/index.jsp the system.out.println
always prints in the same console and I does not appear to be doing load
balancing.
Can anyone help please?
Thanks in advance,
Julien Martin.
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3869597#3869597
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3869597
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user