I have an interesting problem. The short version is: when I try to invoke a method on my remote object from inside of my servlet (running under JBOSS3.0.4/Tomcat4.1), the method takes _FOREVER_ (800ms). However, when I invoke that same method from a standalone test application, it is zippy (less than 20ms).
"Server" - an RMI server running under JBOSS3.0.4; the RMI server object has registered itself with the JBOSS naming directory (JNDI) ... This is a seperate machine (let's call it Server A)
"ClientA" - a plain HTTP servlet running under JBOSS3.0.4/Tomcat4.1; let's call this Server B
"ClientB" - a plain Java application running from the command prompt; (also running on Server B)
When I packet sniff the call from ClientA to the RMI server, the size of the packet that gets sent is in the 40Kilobyte!! range ... The data inside this packet appears to be a lot of the classpath stuff ... the JBOSS deploy directories; the names of the JARs that are currently deployed (database driver JARs, external library JARs, etc...)
When I packet sniff the call from ClientB to the RMI server, the size of the packet is normal; just the serialized objects that are being passed to the server as the method arguments ... The total size of the method arrguments are like 10 or 15 bytes ... (a few longs, a few ints, a couple of short Strings)
So what's going on inside of the Servlet? Why is JBOSS/Tomcat smacking all of this stuff onto the call? I have tried using both remote class loading (for my Stub) as well as packaging it on the client side ...
Here's a snippet of the 40k worth of stuff that's being sent from the client to the server:
/deploy/tomcat-4.1.x/server/lib/commons-logging.jar/55.commons-logging.jar file:/C:/jdk1.3/lib/tools.jar file:/C:/jboss-3.0.4-tomcat/server/default/tmp/deploy/server/default/lib/jts.jar/19.jts.jar file:/C:/jboss-3.0.4-tomcat/server/default/tmp/deploy/server/default/lib/scheduler-plugin-example.jar/7.scheduler-plugin-example.jar file:/C:/jboss-3.0.4-tomcat/server/default/tmp/deploy/server/default/deploy/mail-service.xml/47.mail-service.xml file:/C:/jdk1.3/jre/lib/ext/US_export_policy.jar file:/C:/jboss-3.0.4-tomcat/server/default/tmp/deploy/server/default/deploy/counter-service.xml/41.counter-service.xml file:/C:/jboss-3.0.4-tomcat/tomcat-4.1.x/work/MainEngine/localhost/testjms/WEB-INF/classes/ file:/C:/jdk1.3/jre/lib/ext/jnet.jar file:/C:/jboss-3.0.4-tomcat/server/default/tmp/deploy/tomcat-4.1.x/common/lib/jasper-compiler.jar/69.jasper-compiler.jar file:/C:/jboss-3.0.4-tomcat/server/default/tmp/deploy/server/default/lib/jboss.jar/32.jboss.jar file:/C:/jboss-3.0.4-tomcat/server/default/tmp/deploy/tomcat-4.1.x/server/lib/commons-digester.jar/83.commons-digester.jar file:/C:/jboss-3.0.4-tomcat/bin/ file:/C:/jboss-3.0.4-tomcat/server/default/tmp/deploy/server/default/lib/jbosssx.jar/8.jbosssx.jar file:/C:/jboss-3.0.4-tomcat/server/default/tmp/deploy/tomcat-4.1.x/server/lib/servlets-default.jar
Thanks in advance,