[jboss-cvs] JBossAS SVN: r104693 - in projects/bootstrap/trunk: impl-as and 3 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue May 11 15:20:49 EDT 2010
Author: ALRubinger
Date: 2010-05-11 15:20:48 -0400 (Tue, 11 May 2010)
New Revision: 104693
Modified:
projects/bootstrap/trunk/build/pom.xml
projects/bootstrap/trunk/impl-as/pom.xml
projects/bootstrap/trunk/impl-mc/pom.xml
projects/bootstrap/trunk/impl-mc/src/main/java/org/jboss/bootstrap/impl/mc/server/AbstractMCServerBase.java
projects/bootstrap/trunk/spi-test/pom.xml
Log:
[JBBOO-134] Add ClassPool support from Kabir
Modified: projects/bootstrap/trunk/build/pom.xml
===================================================================
--- projects/bootstrap/trunk/build/pom.xml 2010-05-11 18:19:53 UTC (rev 104692)
+++ projects/bootstrap/trunk/build/pom.xml 2010-05-11 19:20:48 UTC (rev 104693)
@@ -29,8 +29,12 @@
<!-- Versioning -->
<version.org.jboss.logging_jboss.logging.log4j>2.2.0.CR1</version.org.jboss.logging_jboss.logging.log4j>
<version.org.jboss.logging_jboss.logging.spi>2.2.0.CR1</version.org.jboss.logging_jboss.logging.spi>
- <version.org.jboss.kernel_jboss.kernel>2.2.0.Alpha2</version.org.jboss.kernel_jboss.kernel>
- <version.org.jboss_jbossxb>2.0.2.Beta3</version.org.jboss_jbossxb>
+ <version.org.jboss.kernel_jboss.kernel>2.2.0-SNAPSHOT</version.org.jboss.kernel_jboss.kernel>
+ <version.org.jboss_jbossxb>2.0.2.Beta7</version.org.jboss_jbossxb>
+ <version.javassist_javassist>3.12.0.GA</version.javassist_javassist>
+ <version.org.jboss.classpool_jboss.classpool>1.0.0.Alpha6</version.org.jboss.classpool_jboss.classpool>
+ <version.org.jboss.reflect_jboss.reflect>2.2.0.Alpha4</version.org.jboss.reflect_jboss.reflect>
+ <version.org.jboss.cl_jboss.classloading>2.2.0.Alpha4</version.org.jboss.cl_jboss.classloading>
<version.org.jboss_jboss.common.core>2.2.17.GA</version.org.jboss_jboss.common.core>
<version.org.jboss_jboss.mdr>2.2.0.Alpha1</version.org.jboss_jboss.mdr>
<version.junit_junit>4.7</version.junit_junit>
@@ -171,6 +175,12 @@
</dependency>
<dependency>
+ <groupId>org.jboss.kernel</groupId>
+ <artifactId>jboss-aop-mc-int</artifactId>
+ <version>${version.org.jboss.kernel_jboss.kernel}</version>
+ </dependency>
+
+ <dependency>
<groupId>org.jboss</groupId>
<artifactId>jboss-common-core</artifactId>
<version>${version.org.jboss_jboss.common.core}</version>
@@ -182,6 +192,43 @@
<version>${version.org.jboss_jboss.mdr}</version>
</dependency>
+ <dependency>
+ <groupId>org.jboss</groupId>
+ <artifactId>jboss-reflect</artifactId>
+ <version>${version.org.jboss.reflect_jboss.reflect}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>javassist</groupId>
+ <artifactId>javassist</artifactId>
+ <version>${version.javassist_javassist}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>javassist</groupId>
+ <artifactId>javassist</artifactId>
+ <version>${version.javassist_javassist}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.classpool</groupId>
+ <artifactId>jboss-classpool</artifactId>
+ <version>${version.org.jboss.classpool_jboss.classpool}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.classpool</groupId>
+ <artifactId>jboss-classpool-jbosscl</artifactId>
+ <version>${version.org.jboss.classpool_jboss.classpool}</version>
+ </dependency>
+
+
+ <dependency>
+ <groupId>org.jboss.cl</groupId>
+ <artifactId>jboss-classloading</artifactId>
+ <version>${version.org.jboss.cl_jboss.classloading}</version>
+ </dependency>
+
</dependencies>
</dependencyManagement>
Modified: projects/bootstrap/trunk/impl-as/pom.xml
===================================================================
--- projects/bootstrap/trunk/impl-as/pom.xml 2010-05-11 18:19:53 UTC (rev 104692)
+++ projects/bootstrap/trunk/impl-as/pom.xml 2010-05-11 19:20:48 UTC (rev 104693)
@@ -81,6 +81,12 @@
<version>${version.jetty}</version>
<scope>test</scope>
</dependency>
+
+ <dependency>
+ <groupId>org.jboss.cl</groupId>
+ <artifactId>jboss-classloading</artifactId>
+ <scope>test</scope>
+ </dependency>
</dependencies>
</project>
Modified: projects/bootstrap/trunk/impl-mc/pom.xml
===================================================================
--- projects/bootstrap/trunk/impl-mc/pom.xml 2010-05-11 18:19:53 UTC (rev 104692)
+++ projects/bootstrap/trunk/impl-mc/pom.xml 2010-05-11 19:20:48 UTC (rev 104693)
@@ -86,6 +86,35 @@
<groupId>org.jboss.kernel</groupId>
<artifactId>jboss-kernel</artifactId>
</dependency>
+
+ <!-- javassist:javassist -->
+ <dependency>
+ <groupId>javassist</groupId>
+ <artifactId>javassist</artifactId>
+ </dependency>
+ <!-- org.jboss.classpool:jboss-classpool -->
+ <dependency>
+ <groupId>org.jboss.classpool</groupId>
+ <artifactId>jboss-classpool</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.classpool</groupId>
+ <artifactId>jboss-classpool-jbosscl</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.kernel</groupId>
+ <artifactId>jboss-aop-mc-int</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.cl</groupId>
+ <artifactId>jboss-classloading</artifactId>
+ <scope>test</scope>
+ </dependency>
+
</dependencies>
</project>
Modified: projects/bootstrap/trunk/impl-mc/src/main/java/org/jboss/bootstrap/impl/mc/server/AbstractMCServerBase.java
===================================================================
--- projects/bootstrap/trunk/impl-mc/src/main/java/org/jboss/bootstrap/impl/mc/server/AbstractMCServerBase.java 2010-05-11 18:19:53 UTC (rev 104692)
+++ projects/bootstrap/trunk/impl-mc/src/main/java/org/jboss/bootstrap/impl/mc/server/AbstractMCServerBase.java 2010-05-11 19:20:48 UTC (rev 104693)
@@ -26,6 +26,10 @@
import java.util.List;
import java.util.Map;
+import org.jboss.beans.metadata.api.model.AutowireType;
+import org.jboss.beans.metadata.api.model.InjectOption;
+import org.jboss.beans.metadata.plugins.AbstractInjectionValueMetaData;
+import org.jboss.beans.metadata.spi.ValueMetaData;
import org.jboss.beans.metadata.spi.builder.BeanMetaDataBuilder;
import org.jboss.bootstrap.api.config.InvalidConfigurationException;
import org.jboss.bootstrap.api.config.ServerConfig;
@@ -35,12 +39,15 @@
import org.jboss.bootstrap.impl.base.server.AbstractServer;
import org.jboss.bootstrap.impl.mc.deployer.TempBasicXMLDeployer;
import org.jboss.bootstrap.spi.mc.server.MCBasedServerProvider;
+import org.jboss.classpool.plugins.jbosscl.JBossClClassPoolConfig;
import org.jboss.kernel.Kernel;
import org.jboss.kernel.plugins.bootstrap.basic.BasicBootstrap;
import org.jboss.kernel.spi.dependency.KernelController;
import org.jboss.kernel.spi.deployment.KernelDeployment;
import org.jboss.logging.Logger;
import org.jboss.managed.api.annotation.ManagementProperty;
+import org.jboss.reflect.plugins.javassist.JavassistTypeInfoFactoryImpl;
+import org.jboss.reflect.plugins.javassist.classpool.RepositoryClassPoolFactory;
/**
* AbstractMCServerBase
@@ -129,19 +136,20 @@
// Required Implementations -----------------------------------------------------------||
//-------------------------------------------------------------------------------------||
- /* (non-Javadoc)
+ /**
* @see org.jboss.bootstrap.spi.mc.server.MCServer#getKernel()
*/
+ @Override
@ManagementProperty(ignored = true)
public Kernel getKernel()
{
return this.getBootstrap().getKernel();
}
- /*
- * (non-Javadoc)
+ /**
* @see org.jboss.bootstrap.spi.mc.server.MCBasedServer#getDeployments()
*/
+ @Override
@ManagementProperty(ignored = true)
public Map<String, KernelDeployment> getDeployments()
{
@@ -216,6 +224,14 @@
protected void doInitialize() throws IllegalStateException, InvalidConfigurationException, LifecycleEventException
{
/*
+ * Make sure we have the correct classpools set up
+ */
+ //Initialize jboss-reflect to use the correct classpools
+ JBossClClassPoolConfig config = JBossClClassPoolConfig.getInstance();
+ RepositoryClassPoolFactory factory = new RepositoryClassPoolFactory(config.getClassPoolRepository());
+ JavassistTypeInfoFactoryImpl.setPoolFactory(factory);
+
+ /*
* We need to start the bootstrap here so we can set the kernel
* before we fire start kernel events
*/
@@ -223,6 +239,25 @@
// Call Super implementation
super.doInitialize();
+
+ //Install the bean configuring the classpools
+ BeanMetaDataBuilder builder = BeanMetaDataBuilder.createBuilder("JBossClClassPoolConfig", JBossClClassPoolConfig.class.getName());
+ builder.setFactoryClass(JBossClClassPoolConfig.class.getName());
+ builder.setFactoryMethod("getInstance");
+ ValueMetaData inject = builder.createContextualInject(null, null, AutowireType.BY_NAME, InjectOption.CALLBACK);
+ //TODO add name to BeanMetaDataBuilder
+ ((AbstractInjectionValueMetaData)inject).setValue("ClassLoading");
+ builder.addPropertyMetaData("classLoading", inject);
+
+ try
+ {
+ getKernel().getController().install(builder.getBeanMetaData());
+ }
+ catch (Throwable e)
+ {
+ // AutoGenerated
+ throw new RuntimeException(e);
+ }
}
/* (non-Javadoc)
Modified: projects/bootstrap/trunk/spi-test/pom.xml
===================================================================
--- projects/bootstrap/trunk/spi-test/pom.xml 2010-05-11 18:19:53 UTC (rev 104692)
+++ projects/bootstrap/trunk/spi-test/pom.xml 2010-05-11 19:20:48 UTC (rev 104693)
@@ -32,7 +32,6 @@
<version.org.jboss.kernel_jboss.aop.mc.int>2.2.0.Alpha2</version.org.jboss.kernel_jboss.aop.mc.int>
<version.org.jboss_jbossxb>2.0.2.Beta4</version.org.jboss_jbossxb>
<version.org.jboss_jboss.common.core>2.2.17.GA</version.org.jboss_jboss.common.core>
- <version.org.jboss_jboss.reflect>2.0.0.GA</version.org.jboss_jboss.reflect>
<version.apache_xerces_xml.apis>2.9.1</version.apache_xerces_xml.apis>
<version.apache_xerces_xercesImpl>2.9.1</version.apache_xerces_xercesImpl>
<version.wutka_dtdparser_dtdparser121>1.2.1</version.wutka_dtdparser_dtdparser121>
@@ -124,7 +123,7 @@
<artifactItem>
<groupId>org.jboss</groupId>
<artifactId>jboss-reflect</artifactId>
- <version>${version.org.jboss_jboss.reflect}</version>
+ <version>${version.org.jboss.reflect_jboss.reflect}</version>
</artifactItem>
<artifactItem>
<groupId>apache-xerces</groupId>
@@ -202,6 +201,31 @@
<artifactId>javassist</artifactId>
<version>${version.javassist_javassist}</version>
</artifactItem>
+ <artifactItem>
+ <groupId>org.jboss.classpool</groupId>
+ <artifactId>jboss-classpool</artifactId>
+ <version>${version.org.jboss.classpool_jboss.classpool}</version>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.jboss.classpool</groupId>
+ <artifactId>jboss-classpool-jbosscl</artifactId>
+ <version>${version.org.jboss.classpool_jboss.classpool}</version>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.jboss.classpool</groupId>
+ <artifactId>jboss-classpool-scoped</artifactId>
+ <version>${version.org.jboss.classpool_jboss.classpool}</version>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.jboss.cl</groupId>
+ <artifactId>jboss-classloading</artifactId>
+ <version>${version.org.jboss.cl_jboss.classloading}</version>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.jboss.cl</groupId>
+ <artifactId>jboss-classloader</artifactId>
+ <version>${version.org.jboss.cl_jboss.classloading}</version>
+ </artifactItem>
</artifactItems>
</configuration>
</execution>
More information about the jboss-cvs-commits
mailing list