I have 2 nodes in a cluster (JBOSS_A and JBOSS_B) and a load balance machine 
using apache 2.0.x (APACHE).

All works fine, but i have a little problem about "shared jndi".

I try to explain it better.

JBOSS_A and JBOSS_B deploy the same EAR (i try also the hot deploy feature).

in my ear, i have a JSP (in the war) that bind a object to the JNDI.
(i'm using JNDI insted JSP application scope because a ejb must retrieve it and 
i don't want use Stateful session bean)

If the first user request the JSP the object is bind and if they request if is 
binded the response is "yes" (in the same session and so in the same node, for 
example in node JBOSS_A).

Now if the same request id forward to the secondo node (JBOSS_B), JNDI
reply that the object is not binded! instead this is just bind from the first 
request on node JBOSS_B.

So seem that JNDI is not shared between JBOSS_A and JBOSS_B

To verify it i have write a simple JSP.

Maybe i haven't configure JBoss correctly. or is it not possible?

Any idea?

Thank You
Roberto


  | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
  | <%@ page import="java.io.*,javax.naming.*"%>
  | <HTML>
  | <BODY>
  | <%
  | System.out.println("**** hello! i'm executing on this server!");
  | Object object = null;
  | try
  | {
  | object = new InitialContext().lookup("myinformation");
  | }
  | catch(Exception vErr)
  | {}
  | if(object == null)
  | {
  | out.println("<br> object not bound! i bound it now");
  | new InitialContext().bind("myinformation", "Hello. How are u?");
  | }
  | else
  | out.println("<br> object found with value: " + object);
  | %>
  | </BODY>
  | </HTML>
  | 


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

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


-------------------------------------------------------
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
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to