[jboss-user] [JCA/JBoss] - Re: TransactionLocal: How to use it?
adrian@jboss.org
do-not-reply at jboss.com
Mon Mar 19 14:01:39 EDT 2007
"ypsilon" wrote : Can you point me to a scenario where the classloader would lead to a ClassCastException? Does this only occur upon redeployments?
|
Correct, in general
| public class DoesntGetRedeployed
| {
| public static Collection staticCollection = ...;
| }
|
| public class CodeThatGetsRedeployed
| {
| public void doSomethingBeforeRedeploy()
| {
| DoesntGetRedeployed.add(this);
| }
|
| public void doSomethingAfterRedeploy()
| {
| Object x = DoesntGetRedeployed.get();
| // x instanceof CodeThatGetsRedeployed == false
| }
| }
|
Although, I'd be impressed if you could come up with such a situation
WITHIN A TRANSACTION! :-)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4029419#4029419
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4029419
More information about the jboss-user
mailing list