[Design of POJO Server] - Re: Deploying content installed after server start
by bstansberry@jboss.com
Just a follow up on this for the record. I got HASingletonDeploymentScanner to work with the repository based profile service as well, well enough at least for AS 5 CR1.
Basically, the HASingletonDeploymentScanner has the ProfileService and the MainDeployer injected. When the ProfileService is injected, it checks if it exposes a DeploymentManager. If yes, when it becomes master or stops being master it deploys/undeploys content via the DeploymentManager API (distibute, getRepositoryNames, start, stop, undeploy). The getRepositoryNames() method Scott added yesterday was most helpful. :)
If no DeploymentManager (i.e. the basic profile service) it deploys/undeploys by calling add/removeDeployment on the ProfileService and the MainDeployer and then tells the MainDeployer to process().
That's a temporary solution, but restores the feature, has educated Brian, and means there's now at least a unit test of deploy-hasingleton; never was one before.
http://jira.jboss.com/jira/browse/JBAS-5682
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4161194#4161194
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4161194
15 years, 10 months
[Design of AOP on JBoss (Aspects/JBoss)] - Re: Translatable ClassLoaders
by kabir.khan@jboss.com
Translatable is for integration with the UnifiedClassLoader in JBoss 4.x and with the RealClassLoader in JBoss 5. Basically, they will call AspectManager.transform() once a class is loaded. So basically Translatable means it is a JBoss AS classloader.
We haven't really done many tests with clever classloader stuff outside of JBoss, so I guess this is why we haven't picked this up before. I think the method shown should be this instead:
| public ClassPool findClassPool(ClassLoader cl)
| {
| if (!(cl instanceof Translatable))
| {
| // findClassPool has problems with boot and system classes.
| if (cl == null)
| {
| return registerClassLoader(SecurityActions.getContextClassLoader());
| }
| }
| return registerClassLoader(cl);
| }
|
| |
| | For boot and system classes Class.getClassLoader() will return null, and I think that might be what the comment refers to?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4161191#4161191
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4161191
15 years, 10 months