I try to reach a session bean remotly.
The code is rather simple:
InitialContext ctx = new InitialContext();
Object o = ctx.lookup("DummyBean");
o.getClass().getName()
tells me that this object imlements the NamingContext interface.
All howtos explain that a simple cast to the remote Interface should be enough. But whenever i try to cast to DummyBean it fails with a ClassCastException.
When i use the same .ejb3 deployment with glassfish it works well without any hassles.
Differences i noticed between jboss and glassfish:
When i lookup to glassfish the syntax is ctx.lookup("thetest.DummyBean");
But with jboss it seems like its ctx.lookup("DummyBean") works.
When i try to cast the glassfish object to the RemoteInterface it works well. But when i try to cast the jboss object to the remote interface or to the bean itself it simple fails.
The deployment line from the logfile:
15:48:23,625 INFO [Ejb3AnnotationHandler] found EJB3: ejbName=DummyOneBean, class=thetest.DummyOneBean, type=STATELESS
Im quite new to jboss, so help would be really great
thx
Bernhard Neuhauser