
Originally Posted by
dejanp
Classloading issues with local ejbs are an old, long and sad story. What it boils down to is that you have 2 classloaders for your local interface and you cannot assign instance created in one classloader to a variable in other classloader. (Classes in different classloaders can never be the same class, no matter if they have the same qname or not - that's exactly why we have different classloaders)
Usually there is an option in your app server to turn off the local interface pass-by-ref optimization and use pass-by-value. (Let's ignore the fact that app server is fully aware of all the classloaders it created and could do this on it's own, if needed)