"adrian(a)jboss.org" wrote :
| And the test passes with the following output on redeploy
|
Just for clarification purposes, JBMICROCONT-234 is not required to fix the problem.
The fix is to use the deployment classloader as the initiating classloader.
But I've applied it anyway since it will resolve some other problems.
So a temporary workaround without updating the MC code in trunk would be
to replace the BeanMetaDataDeployer (configured in bootstrap-beans.xml)
with something like:
| package org.jboss.system.deployers;
|
| import org.jboss.beans.metadata.spi.BeanMetaData;
| import org.jboss.deployers.spi.DeploymentException;
| import org.jboss.deployers.structure.spi.DeploymentUnit;
| import org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer;
| import org.jboss.kernel.Kernel;
|
| /**
| * A version of the POJO deployer that sets the context classloader to the deployment
classloader
| *
| * @author <a href="adrian(a)jboss.com">Adrian Brock</a>
| * @version $Revision: 1.1 $
| */
| public class TempBeanMetaDataDeployer extends BeanMetaDataDeployer
| {
| public TempBeanMetaDataDeployer(Kernel kernel)
| {
| super(kernel);
| }
|
| public void deploy(DeploymentUnit unit, BeanMetaData deployment) throws
DeploymentException
| {
| ClassLoader old = Thread.currentThread().getContextClassLoader();
| Thread.currentThread().setContextClassLoader(unit.getClassLoader());
| try
| {
| super.deploy(unit, deployment);
| }
| finally
| {
| Thread.currentThread().setContextClassLoader(old);
| }
| }
| }
|
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4126772#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...