[Design of POJO Server] - Unrecognised deployments
by adrian@jboss.org
We need to come up with a fix for the problem
that I mentioned on a different thread (I think in the user forums since I can't find it?)
Basically what is happening is if I add a
my.rubbish
file to the deploy directory it is getting deployed and it is marked as being
processed because the default classloading rules deployer is adding a
ClassLoadingMetaData as an attachment
which goes through this processing in AbstractDeploymentContext
| public Object addAttachment(String name, Object attachment)
| {
| DeploymentContext deploymentContext = getDeploymentContext();
| deploymentContext.deployed(); // HERE THIS MARKS IT AS DEPLOYED
| return deploymentContext.getTransientAttachments().addAttachment(name, attachment);
| }
|
In principle the simplest fix would be to just remove that line (and some others
related to transient attachment retrieval), except this change:
http://viewvc.jboss.org/cgi-bin/viewvc.cgi/jbossas?view=rev&revision=67299
modified the logic to include an invalid check for whether the deployment
reached the DEPLOYED state.
It will reach that state unless a deployer throws an error.
But even then, I don't think it is as simple as it was before.
e.g. you can now have a deployment that is correctly deployed without any
TransientManagedObjects, e.g. if it is only scanned for annotations.
There's also a few places now that invoke methods on the DeploymentUnit
that would actually make it deployed anyway. e.g. AOP always asking for the classloader.
If you add to that the hack (which I can't find anymore?) that used to let
.jar files get through the isDeployed() check
this whole area has become a lot more complicated. :-)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4191914#4191914
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4191914
15 years, 10 months