[jboss-user] [EJB/JBoss] - Re: Deploy with two beans have same names inside two package

2007-09-13 Thread waynebaylor
right, which is completely normal. you can't map a JNDI name to two classes. since JBoss does not use the package name as part of the default JNDI name, you will need to override it so your two classes get different JNDI names. View the original post :

[jboss-user] [EJB/JBoss] - Re: Deploy with two beans have same names inside two package

2007-09-11 Thread waynebaylor
what is the fully qualified class name of BeanA in both clients? i think the lookup is returning one version and you are casting it to the other version. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4083071#4083071 Reply to the post :

[jboss-user] [EJB/JBoss] - Re: Deploy with two beans have same names inside two package

2007-09-11 Thread changemylife
Hi ! The first client: my.com.BeanA The second client: john.com.BeanA I were tried: InitialContext ctx = new InitialContext(); | my.com.BeanA bean = (my.com.BeanA)ctx.lookup(BeanABean/remote); | bean.hello(); --- Ok! but: InitialContext ctx1 = new InitialContext(); |

[jboss-user] [EJB/JBoss] - Re: Deploy with two beans have same names inside two package

2007-09-10 Thread waynebaylor
if they have different package names, then they are considered different classes. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4082609#4082609 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4082609

[jboss-user] [EJB/JBoss] - Re: Deploy with two beans have same names inside two package

2007-09-10 Thread changemylife
Hi! Assume that both of clients call lookup method: BeanA bean = (BeanA)context.lookup(BeanABean/remote); | bean.add(1,2); The first of client is ok, but the second of client is fail and received some errors: .anonymous wrote : Exception in thread main java.lang.ClassCastException: