this is normal behavior of the jboss classloader. 

when your jsps invoke the ejbs for the first time, it gets a reference to the 
interface from the class loader. if you modify the classes contained inside the ejb 
and redeploy, the classloader assigns it a new reference and the previous one held by 
the jsp becomes stale, hence the ClassCastException. 

you have two options to deal w/ this.

1) every time you redeploy the ejb, "touch" the archive that contains the jsps. this 
will cause it to refind the reference to the ejb when it is invoked.

2) extract the interfaces for the ejbs into their own jar file. if you make a change 
to "business logic" and redeploy just the "ejb impl", then the reference held by the 
jsp does not go stale. 

of course, if you add a new method to the ejb, then you need to go back and perform 
the steps in #1 as well. 

this topic is heavily discussed in chap 2 of the jboss admin book, and is talked about 
in many places in the forums. 

let me know if you have further questions. 

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3834353#3834353

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3834353


-------------------------------------------------------
This SF.Net email is sponsored by Sleepycat Software
Learn developer strategies Cisco, Motorola, Ericsson & Lucent use to 
deliver higher performing products faster, at low TCO.
http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3
_______________________________________________
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to