-
1. Re: How should deployers obtain a propper CL?
alesj Nov 8, 2006 5:21 AM (in response to jason.greene)Look at AbstractTopLevelClassLoaderDeployer (and its test: TestClassLoaderDeployer).
You can define a CL in your -beans.xml for all beans or for a single bean.
And you can probably use the same CL in deployer - for instance through KernelDeployment (see BeanDeployer). -
2. Re: How should deployers obtain a propper CL?
starksm64 Nov 8, 2006 5:56 AM (in response to jason.greene)The class loader should already be defined for all deployers other than class loading deployers and access via the DeploymentUnit.getClassLoader/DeploymentContext.getClassLoader. A class loading deployer should have already run and built the class loader from the classpath(or overriding metadata).
The point of removing the class loader construction out of base functionality of each deployer was to allow for more control over the class loading implementation and integration with deployment lifecycle issues.
However, most deployers are still creating child class loaders of the DeploymentUnit/DeploymentContext class loader, or creating the own class loader just using the DeploymentUnit/DeploymentContext classpath. Extracting this aspect is still a work in progress.