[jboss-cvs] JBossAS SVN: r88025 - in projects/jboss-osgi/trunk: bundle/deployment and 3 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Apr 29 16:47:30 EDT 2009


Author: thomas.diesler at jboss.com
Date: 2009-04-29 16:47:30 -0400 (Wed, 29 Apr 2009)
New Revision: 88025

Modified:
   projects/jboss-osgi/trunk/bundle/deployment/pom.xml
   projects/jboss-osgi/trunk/bundle/deployment/src/main/java/org/jboss/osgi/deployment/internal/DeployersActivator.java
   projects/jboss-osgi/trunk/bundle/microcontainer/pom.xml
   projects/jboss-osgi/trunk/bundle/microcontainer/src/main/java/org/jboss/osgi/microcontainer/internal/MicrocontainerServiceImpl.java
   projects/jboss-osgi/trunk/pom.xml
Log:
Use DynamicImport-Packages

Modified: projects/jboss-osgi/trunk/bundle/deployment/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/bundle/deployment/pom.xml	2009-04-29 20:35:04 UTC (rev 88024)
+++ projects/jboss-osgi/trunk/bundle/deployment/pom.xml	2009-04-29 20:47:30 UTC (rev 88025)
@@ -81,13 +81,11 @@
               <!-- import -->
               org.jboss.dependency*, 
               org.jboss.deployers*,
-              org.jboss.deployers.plugins.attachments, 
               org.jboss.logging,
               org.jboss.osgi.common.log, 
               org.jboss.osgi.microcontainer, 
               org.jboss.osgi.spi.management,
               org.jboss.virtual*, 
-              org.jboss.virtual.plugins.registry,
               
               <!-- osgi -->
               org.osgi.framework, 

Modified: projects/jboss-osgi/trunk/bundle/deployment/src/main/java/org/jboss/osgi/deployment/internal/DeployersActivator.java
===================================================================
--- projects/jboss-osgi/trunk/bundle/deployment/src/main/java/org/jboss/osgi/deployment/internal/DeployersActivator.java	2009-04-29 20:35:04 UTC (rev 88024)
+++ projects/jboss-osgi/trunk/bundle/deployment/src/main/java/org/jboss/osgi/deployment/internal/DeployersActivator.java	2009-04-29 20:47:30 UTC (rev 88025)
@@ -49,10 +49,8 @@
       if (service == null)
          throw new IllegalStateException("MicrocontainerService not available");
       
-      ClassLoader ctxLoader = Thread.currentThread().getContextClassLoader();
       try
       {
-         Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
          deployersURL = new File("../deployment/src/main/resources/META-INF/jboss-osgi-deployers.xml").toURL();
          service.deploy(deployersURL);
       }
@@ -60,10 +58,6 @@
       {
          throw new IllegalStateException("Cannot deploy: " + deployersURL, ex);
       }
-      finally
-      {
-         Thread.currentThread().setContextClassLoader(ctxLoader);
-      }
    }
 
    public void stop(BundleContext context)

Modified: projects/jboss-osgi/trunk/bundle/microcontainer/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/bundle/microcontainer/pom.xml	2009-04-29 20:35:04 UTC (rev 88024)
+++ projects/jboss-osgi/trunk/bundle/microcontainer/pom.xml	2009-04-29 20:47:30 UTC (rev 88025)
@@ -119,6 +119,7 @@
               !org.jboss.test.*,
               !junit*,
             </Import-Package>
+            <DynamicImport-Package>*</DynamicImport-Package>
             <Embed-Transitive>true</Embed-Transitive>
             <Embed-Dependency>
               jboss-classloader;inline=false,

Modified: projects/jboss-osgi/trunk/bundle/microcontainer/src/main/java/org/jboss/osgi/microcontainer/internal/MicrocontainerServiceImpl.java
===================================================================
--- projects/jboss-osgi/trunk/bundle/microcontainer/src/main/java/org/jboss/osgi/microcontainer/internal/MicrocontainerServiceImpl.java	2009-04-29 20:35:04 UTC (rev 88024)
+++ projects/jboss-osgi/trunk/bundle/microcontainer/src/main/java/org/jboss/osgi/microcontainer/internal/MicrocontainerServiceImpl.java	2009-04-29 20:47:30 UTC (rev 88025)
@@ -71,7 +71,7 @@
    private MBeanServerTracker mbeanServerTracker;
    private ServiceRegistration registration;
    private LogService log;
-   
+
    private VFSDeploymentFactory deploymentFactory = VFSDeploymentFactory.getInstance();
    private Map<URL, String> contextMap = Collections.synchronizedMap(new HashMap<URL, String>());
 
@@ -107,8 +107,11 @@
 
    public void deploy(URL url) throws DeploymentException
    {
+      ClassLoader ctxLoader = Thread.currentThread().getContextClassLoader();
       try
       {
+         Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
+
          MainDeployer mainDeployer = (MainDeployer)getRegisteredBean(BEAN_MAIN_DEPLOYER);
          VirtualFile file = VFS.createNewRoot(url);
          VFSDeployment deployment = deploymentFactory.createVFSDeployment(file);
@@ -122,6 +125,10 @@
       {
          DeploymentException.rethrowAsDeploymentException("Cannot deploy: " + url, ex);
       }
+      finally
+      {
+         Thread.currentThread().setContextClassLoader(ctxLoader);
+      }
    }
 
    public void undeploy(URL url)

Modified: projects/jboss-osgi/trunk/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/pom.xml	2009-04-29 20:35:04 UTC (rev 88024)
+++ projects/jboss-osgi/trunk/pom.xml	2009-04-29 20:47:30 UTC (rev 88025)
@@ -325,6 +325,10 @@
           <failIfNoTests>false</failIfNoTests>
           <systemProperties>
             <property>
+              <name>org.apache.xerces.xni.parser.XMLParserConfiguration</name>
+              <value>org.apache.xerces.parsers.XIncludeAwareParserConfiguration</value>
+            </property>
+            <property>
               <name>test.archive.directory</name>
               <value>${project.build.directory}/test-libs</value>
             </property>




More information about the jboss-cvs-commits mailing list