Hi all,

We currently have a somewhat major issue with JBoss clusters and NamingContexts.

Currently, if a client connects to HAJNDI and the server(s) are restarted in between 
client requests, the client handle gets invalidated.

as in:
1) Client A creates an initialcontext for DefaultPartition
2) Server B answers back, handing him the HARMI stub
3) Client A waits for user input
4) Server B gets stopped and restarted (the JVM)
5) Client A attempts to do JNDI lookup

At this point, the HARMI stub is invalid as it only knows of a connection to the 
previous RMI server.

Looking at NamingContext, it retains a weak reference cache that holds all server 
stubs.  Which basically means that if I create another InitialContext, it still does 
not function since it uses the Naming object (rmi stub) from cache.  and that one is 
invalid.

There is IOException handling that seems to purge the cache of that server entry.  But 
that seems to not be functioning properly.

If you wait long enough, the weak ref will get purged and you can then create a new 
InitialContext and all works normally.

That delay is about a minute or so, so doesn't exactly work for us (our servers handle 
several hundred requests per second)

Anyone have an idea on how to get around this?

My solution is to make a dynamic proxy for NamingContext in org.jnp.interfaces, that 
blows away the entire cache every time a CommunicationsException is received.  (my 
proxy is in that package so i can access the package protected static cache)

This works, but I was hoping Was hoping there was a more normal way.

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

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


-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to