In JBoss we do this with a "pooled" invoker.

http://www.jboss.org/wiki/Wiki.jsp?page=JBossASTuningSliming
http://www.jboss.org/wiki/Wiki.jsp?page=PooledInvokerHA

You could probably replicate what the code does or just embed a trimmed down version of JBoss (see first wiki page) and:

You could do this with an XMBean (which would generate a proxy for the client) or by
calling the JRMPProxyFactory directly. The other thing that this can provide is a way to load balance clients across multiple servers.


Also you could set your VM stack size lower (-Xss or -XX:ThreadStackSize) so that you can have MORE threads.

-Andy

[EMAIL PROTECTED] wrote:

I have the following issue.

A client uses RMI to connect to a server.
Originally developed where a client connects (via RMI) to the server and
bascally says "Hello, my name is client X".  The server then says "Cool,
your id is N".

The problem, when I get to >1000 clients across >100 machines, the server
crashes as RMI runs out of threads.

The clients are pretty robust in that if the RMI registry on the server
had a way to cap the number of threads created and was "not ready", a
client would simply try again.  But there does not seem to be a bona fide
way to limit the number of threads that RMI Registry spawns.

We would like to avoid rolling in some application level solution as this
particular interchange is repeated in many places.

So we need to "fix" RMI or replace it.

Does anyone have any ideas on either?

-Chris

_______________________________________________
Juglist mailing list
[email protected]
http://trijug.org/mailman/listinfo/juglist_trijug.org





_______________________________________________
Juglist mailing list
[email protected]
http://trijug.org/mailman/listinfo/juglist_trijug.org

Reply via email to