Hi everyone. I have a problem where I'm trying to get a new instance of a stateful bean. The situation is that I have Bean A doing some processing that I want to cancel. Rather than trying to stop it in its tracks, I simply give the client program a new copy of that bean, call it Bean B. The client now listens to messages sent from Bean B, and is unaware that Bean A is still finishing its server side processing (at which point it will no longer be used).
I try to lookup the bean with Object ref = jndiContext.look("MyBeanClassImpl/remote"); MyBeanClass b = (MyBeanClass) PortableRemoteObject.narrow(ref,MyBeanClass.class)
When I do an == comparison on Bean A and Bean B, it returns true and then I get errors about concurrent calls on the bean. Essentially, the users reference to the MyBeanClass object should now be pointing to B, which should be different than A. Can someone explain to me why it is not different and how I can make it be different?
Thank you, Jeff
Joined: Oct 09, 2006
I realized this was NOT what was happening and the problem was elsewhere - problem solved.