Skip to Content
0
Former Member
Dec 28, 2007 at 05:10 AM

How to rebind a bean object programmatically in EJB 3.0

79 Views

hi,

There is a bean object (EJB 3.0) which i want to rebind. How can I do it through another application running under same netweaver server.

For eg,

one session bean object is bound to "java:comp/env/Converter" jndi name by one application. Here, i need to modify this object and rebind to the same jndi name. so i used as follows,

context.rebind("java:comp/env/converter", beanobj );

//'beanobj' is the modified bean (modified attribute's value)

it was bound successfully, but when i look up the bean object, i got the ClassCastException,

like "java.lang.ClassCastException : $Proxy5_1001 at ......"

can anybody help me?

regards,

Panneer.