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

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

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


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to