-
1. Have you tried redeploying the web apps, too?
spoonman464 Apr 7, 2005 11:42 PM (in response to funkyhippy)I find that whenever I redeploy an EJB-JAR, any web apps that had already been using those EJBs also need to be redeployed. I don't know the true technical reasons for it but it seems pretty consistent to me.
If it's true, the reason why it all seems to work after restarting the JBoss server is that restarting undeploys and redeploys everything.
Maybe you could try redeploying the EAR with the EJBs, try a web app that fails, redeploy that one web app to see if it begins working and then you'll have your answer.
There might be some way to deal with this problem without redeploying the web apps but I haven't found one yet.
Spoon -
2. Re: EJB deployment problems
vashistvishal Apr 8, 2005 6:08 AM (in response to funkyhippy)This is the classical classloading problem disccused in JBoss Admin Guide under section.
2.2.2.1. ClassCastExceptions - I'm Not Your Type
It says and solution is provided.This type of error is common when redeploying an application to which other applications are holding references to classes from the redeployed application. For example, a standalone WAR accessing an EJB. If you are redeploying an application, all dependent applications must flush their class references. Typically this requires that the dependent applications themselves be redeployed.
An alternate means of allowing independent deployments to interact in the presence of redeployment would be to isolate the deployments by configuring the EJB layer to use the standard call-by-value semantics rather than the call-by-reference JBoss will default to for components collocated in the same VM. An example of how to enable call-by-value semantics is presented in Chapter 5, EJBs on JBoss
I hope this helps. -
3. Excellent answer!
spoonman464 Apr 8, 2005 10:06 AM (in response to funkyhippy)Nice work, Vishal. I will give that a try. Just like everything else in J2EE, there's probably some downside to going this route. I'll check out the doc but do you know of anything 'bad' about using this technique?
Spoon