MySession s = (MySession)ctx.lookup();
I have the same problem and I couldnt get things working.
When I typecast the object returned by the lookup (a Proxy),
I get ClassCastException and I really don't understand why.
The callByValue is set true.
And, the only place where my interfaces are is in the ejb-jar
which is deployed inside an ear file.
I also have a ejb-client jar with only the interfaces and it
is located at server/default/lib so JBoss can load the interfaces.
What am I doing wrong?
have you set callbyvalue for JNDI? its in conf/jboss-service.xml
That was it!
As Im using version 4.0.4, it is in deploy/naming-service.xml