So here's what I've done:
I have JBoss 3.0.8 running on RedHat 7.3 with JDK 1.4.2_10. I have a client
that connects to JBoss with the following code:
Properties props = new Properties();
| props.put(Context.INITIAL_CONTEXT_FACTORY,
"org.jnp.interfaces.NamingContextFactory");
| props.put(Context.PROVIDER_URL, "jnp://yeager:1099");
|
| System.out.println("In remote call");
| InitialContext ic = new InitialContext(props);
| System.out.println("ic: " + ic);
| Object obj = ic.lookup("jmx/rmi/RMIAdaptor");
| System.out.println("obj: " + obj.getClass().getName());
| org.jboss.jmx.adaptor.rmi.RMIAdaptorImpl_Stub server = (
org.jboss.jmx.adaptor.rmi.RMIAdaptorImpl_Stub) obj;
| System.out.println("server: " + server);
|
| ObjectName objName = new ObjectName("jboss.j2ee:jndiName=" + name +
",service=EJB");
| System.out.println("objName: " + objName);
| server.invoke(...);
When the client runs on the same box as the JBoss server, everything works
fine. When I move the client to a Windows XP box running JDK 1.4.2_10, I get
the following output that ends in a ClassCastException:
In remote call
ic: [EMAIL PROTECTED]
obj: org.jboss.jmx.adaptor.rmi.RMIAdaptorImpl_Stub
As you can see, the object coming back from the InitialContext is an
RMIAdaptorImpl_Stub and that's what I cast it to, but I still get the
ClassCastException.
What's going on here?
Thanx in advance.
Norton
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3929405#3929405
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3929405
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user