Hi all!
I use jboss-4.0.5.GA and EJB3.0
I write two beans that have same name (called BeanA). Example:
Inside package: my.com has a bean called BeanA and exported to "my.jar"
Inside package: john.com has a bean called Bean A and exported to "john.jar"
import my.com.BeanA; ... Context ctx = new InitialContext(); BeanA b = (BeanA)ctx.lookup(BeanABean/remote); b.add(1,2);
import john.com.BeanA; .. Context ctx = new InitialContext(); BeanA b = (BeanA)ctx.lookup(BeanABean/remote); b.add(1,2);
Exception in thread "main" java.lang.ClassCastException: $Proxy0 at client.ClientTest1.main(ClientTest1.java:18)
BeanA b = (BeanA)ctx.lookup(BeanABean/remote);