[jboss-cvs] JBossAS SVN: r95261 - in projects/jboss-osgi/trunk: distribution/installer/src/main/resources/installer and 4 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Oct 21 01:46:07 EDT 2009
Author: thomas.diesler at jboss.com
Date: 2009-10-21 01:46:07 -0400 (Wed, 21 Oct 2009)
New Revision: 95261
Modified:
projects/jboss-osgi/trunk/distribution/installer/scripts/assembly-deploy-artifacts.xml
projects/jboss-osgi/trunk/distribution/installer/src/main/resources/installer/install-definition.xml
projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/conf/jboss-osgi-equinox.properties
projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/conf/jboss-osgi-felix.properties
projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/server/conf/jboss-osgi-felix-all.properties
projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/server/conf/jboss-osgi-felix-default.properties
projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/server/conf/jboss-osgi-felix-minimal.properties
projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/server/conf/jboss-osgi-felix-web.properties
projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/internal/DeploymentServicesActivator.java
projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/internal/SystemDeployerService.java
projects/jboss-osgi/trunk/reactor/framework/src/main/java/org/jboss/osgi/framework/service/internal/DeployerServiceImpl.java
Log:
Fix jbossmc runtime
Modified: projects/jboss-osgi/trunk/distribution/installer/scripts/assembly-deploy-artifacts.xml
===================================================================
--- projects/jboss-osgi/trunk/distribution/installer/scripts/assembly-deploy-artifacts.xml 2009-10-21 05:27:09 UTC (rev 95260)
+++ projects/jboss-osgi/trunk/distribution/installer/scripts/assembly-deploy-artifacts.xml 2009-10-21 05:46:07 UTC (rev 95261)
@@ -32,17 +32,6 @@
<unpack>false</unpack>
</dependencySet>
<dependencySet>
- <outputDirectory>lib/org.apache.felix</outputDirectory>
- <outputFileNameMapping>${artifact.artifactId}${dashClassifier?}.${artifact.extension}</outputFileNameMapping>
- <useStrictFiltering>true</useStrictFiltering>
- <includes>
- <include>org.apache.felix:org.osgi.compendium:jar</include>
- <include>org.apache.felix:org.osgi.core:jar</include>
- </includes>
- <scope>compile</scope>
- <unpack>false</unpack>
- </dependencySet>
- <dependencySet>
<outputDirectory>lib/org.osgi</outputDirectory>
<outputFileNameMapping>${artifact.artifactId}${dashClassifier?}.${artifact.extension}</outputFileNameMapping>
<useStrictFiltering>true</useStrictFiltering>
Modified: projects/jboss-osgi/trunk/distribution/installer/src/main/resources/installer/install-definition.xml
===================================================================
--- projects/jboss-osgi/trunk/distribution/installer/src/main/resources/installer/install-definition.xml 2009-10-21 05:27:09 UTC (rev 95260)
+++ projects/jboss-osgi/trunk/distribution/installer/src/main/resources/installer/install-definition.xml 2009-10-21 05:46:07 UTC (rev 95261)
@@ -254,11 +254,11 @@
<singlefile condition="isFelix" src="@{runtime.dir}/server/conf/jboss-osgi-felix-all.properties" target="$INSTALL_PATH/runtime/server/all/conf/jboss-osgi-extra.properties"
override="true" />
<fileset condition="isFelix" dir="@{deploy.artifacts.dir}/lib" targetdir="$INSTALL_PATH/runtime/lib" override="true">
- <include name="jboss-osgi-deployment.jar" />
<include name="jboss-osgi-runtime-felix.jar" />
<include name="org.apache.felix.framework.jar" />
</fileset>
- <fileset condition="isFelix" dir="@{deploy.artifacts.dir}/lib/org.apache.felix" targetdir="$INSTALL_PATH/runtime/server/minimal/deploy" override="true">
+ <fileset condition="isFelix" dir="@{deploy.artifacts.dir}/lib/org.osgi" targetdir="$INSTALL_PATH/runtime/server/minimal/deploy" override="true">
+ <include name="jboss-osgi-deployment.jar" />
<include name="org.osgi.compendium.jar" />
</fileset>
<fileset condition="isFelix" dir="@{deploy.artifacts.dir}/lib" targetdir="$INSTALL_PATH/runtime/server/all/deploy" override="true">
@@ -276,6 +276,7 @@
<include name="org.eclipse.osgi.jar" />
</fileset>
<fileset condition="isEquinox" dir="@{deploy.artifacts.dir}/lib" targetdir="$INSTALL_PATH/runtime/server/minimal/deploy" override="true">
+ <include name="jboss-osgi-deployment.jar" />
<include name="org.eclipse.osgi.services.jar" />
</fileset>
<fileset condition="isEquinox" dir="@{deploy.artifacts.dir}/lib" targetdir="$INSTALL_PATH/runtime/server/all/deploy" override="true">
@@ -398,7 +399,7 @@
<include name="org.apache.felix.configadmin.jar" />
<include name="org.apache.felix.metatype.jar" />
</fileset>
- <fileset condition="isFelix" dir="@{deploy.artifacts.dir}/lib/org.apache.felix" targetdir="${jbossInstallPath}/server/${jbossTargetServer}/deploy/osgi"
+ <fileset condition="isFelix" dir="@{deploy.artifacts.dir}/lib/org.osgi" targetdir="${jbossInstallPath}/server/${jbossTargetServer}/deploy/osgi"
override="true">
<include name="org.osgi.compendium.jar" />
</fileset>
Modified: projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/conf/jboss-osgi-equinox.properties
===================================================================
--- projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/conf/jboss-osgi-equinox.properties 2009-10-21 05:27:09 UTC (rev 95260)
+++ projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/conf/jboss-osgi-equinox.properties 2009-10-21 05:46:07 UTC (rev 95261)
@@ -94,4 +94,5 @@
org.jboss.osgi.spi.framework.autoStart=\
file://${osgi.home}/server/minimal/deploy/org.apache.felix.log.jar \
file://${osgi.home}/server/minimal/deploy/jboss-osgi-common.jar \
+ file://${osgi.home}/server/minimal/deploy/jboss-osgi-deployment.jar \
file://${osgi.home}/server/minimal/deploy/jboss-osgi-hotdeploy.jar
\ No newline at end of file
Modified: projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/conf/jboss-osgi-felix.properties
===================================================================
--- projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/conf/jboss-osgi-felix.properties 2009-10-21 05:27:09 UTC (rev 95260)
+++ projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/conf/jboss-osgi-felix.properties 2009-10-21 05:46:07 UTC (rev 95261)
@@ -22,6 +22,7 @@
org.jboss.osgi.spi.framework.autoStart=\
file://${osgi.home}/server/minimal/deploy/org.apache.felix.log.jar \
file://${osgi.home}/server/minimal/deploy/jboss-osgi-common.jar \
+ file://${osgi.home}/server/minimal/deploy/jboss-osgi-deployment.jar \
file://${osgi.home}/server/minimal/deploy/jboss-osgi-hotdeploy.jar
\ No newline at end of file
Modified: projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/server/conf/jboss-osgi-felix-all.properties
===================================================================
--- projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/server/conf/jboss-osgi-felix-all.properties 2009-10-21 05:27:09 UTC (rev 95260)
+++ projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/server/conf/jboss-osgi-felix-all.properties 2009-10-21 05:46:07 UTC (rev 95261)
@@ -30,6 +30,8 @@
org.apache.log4j;version=1.2, \
org.jboss.logging, \
org.jboss.net.protocol, \
+ org.jboss.osgi.deployment.common;version=1.0, \
+ org.jboss.osgi.deployment.deployer;version=1.0, \
org.jboss.osgi.spi;version=1.0, \
org.jboss.osgi.spi.capability;version=1.0, \
org.jboss.osgi.spi.framework;version=1.0, \
Modified: projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/server/conf/jboss-osgi-felix-default.properties
===================================================================
--- projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/server/conf/jboss-osgi-felix-default.properties 2009-10-21 05:27:09 UTC (rev 95260)
+++ projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/server/conf/jboss-osgi-felix-default.properties 2009-10-21 05:46:07 UTC (rev 95261)
@@ -24,6 +24,8 @@
org.apache.log4j;version=1.2, \
org.jboss.logging, \
org.jboss.net.protocol, \
+ org.jboss.osgi.deployment.common;version=1.0, \
+ org.jboss.osgi.deployment.deployer;version=1.0, \
org.jboss.osgi.spi;version=1.0, \
org.jboss.osgi.spi.capability;version=1.0, \
org.jboss.osgi.spi.framework;version=1.0, \
Modified: projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/server/conf/jboss-osgi-felix-minimal.properties
===================================================================
--- projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/server/conf/jboss-osgi-felix-minimal.properties 2009-10-21 05:27:09 UTC (rev 95260)
+++ projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/server/conf/jboss-osgi-felix-minimal.properties 2009-10-21 05:46:07 UTC (rev 95261)
@@ -10,6 +10,8 @@
org.osgi.framework.system.packages.extra=\
org.apache.log4j;version=1.2, \
org.jboss.logging, \
+ org.jboss.osgi.deployment.common;version=1.0, \
+ org.jboss.osgi.deployment.deployer;version=1.0, \
org.jboss.osgi.spi;version=1.0, \
org.jboss.osgi.spi.capability;version=1.0, \
org.jboss.osgi.spi.framework;version=1.0, \
Modified: projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/server/conf/jboss-osgi-felix-web.properties
===================================================================
--- projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/server/conf/jboss-osgi-felix-web.properties 2009-10-21 05:27:09 UTC (rev 95260)
+++ projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/server/conf/jboss-osgi-felix-web.properties 2009-10-21 05:46:07 UTC (rev 95261)
@@ -30,6 +30,8 @@
org.apache.log4j;version=1.2, \
org.jboss.logging, \
org.jboss.net.protocol, \
+ org.jboss.osgi.deployment.common;version=1.0, \
+ org.jboss.osgi.deployment.deployer;version=1.0, \
org.jboss.osgi.spi;version=1.0, \
org.jboss.osgi.spi.capability;version=1.0, \
org.jboss.osgi.spi.framework;version=1.0, \
Modified: projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/internal/DeploymentServicesActivator.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/internal/DeploymentServicesActivator.java 2009-10-21 05:27:09 UTC (rev 95260)
+++ projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/internal/DeploymentServicesActivator.java 2009-10-21 05:46:07 UTC (rev 95261)
@@ -25,9 +25,7 @@
import java.util.Properties;
-import javax.management.JMException;
import javax.management.MBeanServer;
-import javax.management.StandardMBean;
import org.jboss.osgi.deployment.deployer.DeployerService;
import org.jboss.osgi.deployment.deployer.DeploymentRegistryService;
@@ -36,8 +34,6 @@
import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceReference;
import org.osgi.util.tracker.ServiceTracker;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
/**
* The deployers activator
@@ -47,9 +43,6 @@
*/
public class DeploymentServicesActivator implements BundleActivator
{
- // Provide logging
- private Logger log = LoggerFactory.getLogger(DeploymentServicesActivator.class);
-
public void start(BundleContext context) throws Exception
{
// Register the deployer related services
@@ -73,31 +66,10 @@
// Register the SystemDeployerService
Properties props = new Properties();
props.put("provider", "system");
- SystemDeployerService deployerService = new SystemDeployerService(context);
+ final SystemDeployerService deployerService = new SystemDeployerService(context);
context.registerService(DeployerService.class.getName(), deployerService, props);
- // Track the MBeanServer and register the DeployerService
- ServiceTracker jmxTracker = new ServiceTracker(context, MBeanServer.class.getName(), null)
- {
- @Override
- public Object addingService(ServiceReference reference)
- {
- MBeanServer mbeanServer = (MBeanServer)super.addingService(reference);
- registerDeployerServiceMBean(context, mbeanServer);
- return mbeanServer;
- }
-
- @Override
- public void removedService(ServiceReference reference, Object service)
- {
- MBeanServer mbeanServer = (MBeanServer)service;
- unregisterDeployerServiceMBean(mbeanServer);
- super.removedService(reference, service);
- }
- };
- jmxTracker.open();
-
- // Track the DeployerService and register it as an MBean
+ // Track other DeployerService implementations and register as MBean
ServiceTracker serviceTracker = new ServiceTracker(context, DeployerService.class.getName(), null)
{
@Override
@@ -108,7 +80,7 @@
if (sref != null)
{
MBeanServer mbeanServer = (MBeanServer)context.getService(sref);
- registerDeployerServiceMBean(context, mbeanServer);
+ deployerService.registerDeployerServiceMBean(context, mbeanServer);
}
return service;
}
@@ -120,48 +92,11 @@
if (sref != null)
{
MBeanServer mbeanServer = (MBeanServer)context.getService(sref);
- unregisterDeployerServiceMBean(mbeanServer);
+ deployerService.unregisterDeployerServiceMBean(mbeanServer);
}
super.removedService(reference, service);
}
};
serviceTracker.open();
}
-
- private void registerDeployerServiceMBean(BundleContext context, MBeanServer mbeanServer)
- {
- try
- {
- // Get the DeployerService with the highest ranking
- ServiceReference sref = context.getServiceReference(DeployerService.class.getName());
- if (sref == null)
- throw new IllegalStateException("Cannot obtain deployer service");
-
- // Unregister the DeployerService with a potentialy lower ranking
- if (mbeanServer.isRegistered(DeployerService.MBEAN_DEPLOYER_SERVICE))
- mbeanServer.unregisterMBean(DeployerService.MBEAN_DEPLOYER_SERVICE);
-
- // Register the DeployerService with the highest ranking
- DeployerService service = (DeployerService)context.getService(sref);
- StandardMBean mbean = new StandardMBean(service, DeployerService.class);
- mbeanServer.registerMBean(mbean, DeployerService.MBEAN_DEPLOYER_SERVICE);
- }
- catch (JMException ex)
- {
- throw new IllegalStateException("Cannot register DeployerService MBean", ex);
- }
- }
-
- private void unregisterDeployerServiceMBean(MBeanServer mbeanServer)
- {
- try
- {
- if (mbeanServer.isRegistered(DeployerService.MBEAN_DEPLOYER_SERVICE))
- mbeanServer.unregisterMBean(DeployerService.MBEAN_DEPLOYER_SERVICE);
- }
- catch (JMException ex)
- {
- log.error("Cannot unregister DeployerService MBean", ex);
- }
- }
}
\ No newline at end of file
Modified: projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/internal/SystemDeployerService.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/internal/SystemDeployerService.java 2009-10-21 05:27:09 UTC (rev 95260)
+++ projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/internal/SystemDeployerService.java 2009-10-21 05:46:07 UTC (rev 95261)
@@ -30,6 +30,10 @@
import java.util.Map;
import java.util.Map.Entry;
+import javax.management.JMException;
+import javax.management.MBeanServer;
+import javax.management.StandardMBean;
+
import org.jboss.osgi.deployment.common.Deployment;
import org.jboss.osgi.deployment.deployer.DeployerService;
import org.jboss.osgi.deployment.deployer.AbstractDeployerService;
@@ -48,7 +52,7 @@
import org.slf4j.LoggerFactory;
/**
- * A {@link DeployerService} that installs/uninstalls the bundles directly on the OSGi framework without going through the MC registered deployers.
+ * A {@link DeployerService} that installs/uninstalls the bundles directly on the OSGi framework.
*
* @author thomas.diesler at jboss.com
* @since 27-May-2009
@@ -59,12 +63,32 @@
private Logger log = LoggerFactory.getLogger(SystemDeployerService.class);
private BundleContext context;
- private ServiceTracker registryTracker;
private ServiceTracker startLevelTracker;
public SystemDeployerService(BundleContext context)
{
this.context = context;
+
+ // Track the MBeanServer and register the DeployerService
+ ServiceTracker jmxTracker = new ServiceTracker(context, MBeanServer.class.getName(), null)
+ {
+ @Override
+ public Object addingService(ServiceReference reference)
+ {
+ MBeanServer mbeanServer = (MBeanServer)super.addingService(reference);
+ registerDeployerServiceMBean(context, mbeanServer);
+ return mbeanServer;
+ }
+
+ @Override
+ public void removedService(ServiceReference reference, Object service)
+ {
+ MBeanServer mbeanServer = (MBeanServer)service;
+ unregisterDeployerServiceMBean(mbeanServer);
+ super.removedService(reference, service);
+ }
+ };
+ jmxTracker.open();
}
public void deploy(Deployment[] depArr) throws BundleException
@@ -78,9 +102,10 @@
{
try
{
+ log.debug("Install: " + dep.getLocation());
+
String location = dep.getLocation().toExternalForm();
Bundle bundle = context.installBundle(location);
- log.info("Installed: " + bundle);
registerManagedBundle(bundle);
@@ -133,7 +158,6 @@
bundle.start();
- log.info("Started: " + bundle);
ExportedPackageHelper packageHelper = new ExportedPackageHelper(context);
packageHelper.logExportedPackages(bundle);
}
@@ -155,11 +179,12 @@
Bundle bundle = getBundle(dep);
if (bundle != null)
{
+ log.debug("Uninstall: " + bundle);
+
registry.unregisterDeployment(dep);
unregisterManagedBundle(bundle);
bundle.uninstall();
- log.info("Uninstalled: " + bundle);
}
else
{
@@ -239,12 +264,11 @@
private DeploymentRegistryService getDeploymentRegistry()
{
- if (registryTracker == null)
- {
- registryTracker = new ServiceTracker(context, DeploymentRegistryService.class.getName(), null);
- registryTracker.open();
- }
- return (DeploymentRegistryService)registryTracker.getService();
+ ServiceReference sref = context.getServiceReference(DeploymentRegistryService.class.getName());
+ if (sref == null)
+ throw new IllegalStateException("Cannot obtain DeploymentRegistryService");
+
+ return (DeploymentRegistryService)context.getService(sref);
}
private StartLevel getStartLevel()
@@ -256,4 +280,41 @@
}
return (StartLevel)startLevelTracker.getService();
}
+
+ void registerDeployerServiceMBean(BundleContext context, MBeanServer mbeanServer)
+ {
+ try
+ {
+ // Get the DeployerService with the highest ranking
+ ServiceReference sref = context.getServiceReference(DeployerService.class.getName());
+ if (sref == null)
+ throw new IllegalStateException("Cannot obtain deployer service");
+
+ // Unregister the DeployerService with a potentialy lower ranking
+ if (mbeanServer.isRegistered(DeployerService.MBEAN_DEPLOYER_SERVICE))
+ mbeanServer.unregisterMBean(DeployerService.MBEAN_DEPLOYER_SERVICE);
+
+ // Register the DeployerService with the highest ranking
+ DeployerService service = (DeployerService)context.getService(sref);
+ StandardMBean mbean = new StandardMBean(service, DeployerService.class);
+ mbeanServer.registerMBean(mbean, DeployerService.MBEAN_DEPLOYER_SERVICE);
+ }
+ catch (JMException ex)
+ {
+ throw new IllegalStateException("Cannot register DeployerService MBean", ex);
+ }
+ }
+
+ void unregisterDeployerServiceMBean(MBeanServer mbeanServer)
+ {
+ try
+ {
+ if (mbeanServer.isRegistered(DeployerService.MBEAN_DEPLOYER_SERVICE))
+ mbeanServer.unregisterMBean(DeployerService.MBEAN_DEPLOYER_SERVICE);
+ }
+ catch (JMException ex)
+ {
+ log.error("Cannot unregister DeployerService MBean", ex);
+ }
+ }
}
\ No newline at end of file
Modified: projects/jboss-osgi/trunk/reactor/framework/src/main/java/org/jboss/osgi/framework/service/internal/DeployerServiceImpl.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/framework/src/main/java/org/jboss/osgi/framework/service/internal/DeployerServiceImpl.java 2009-10-21 05:27:09 UTC (rev 95260)
+++ projects/jboss-osgi/trunk/reactor/framework/src/main/java/org/jboss/osgi/framework/service/internal/DeployerServiceImpl.java 2009-10-21 05:46:07 UTC (rev 95261)
@@ -24,19 +24,19 @@
//$Id$
import java.net.URL;
+import java.util.Properties;
import org.jboss.logging.Logger;
import org.jboss.osgi.deployment.common.Deployment;
import org.jboss.osgi.deployment.deployer.DeployerService;
-import org.jboss.osgi.deployment.internal.DeploymentImpl;
+import org.jboss.osgi.deployment.deployer.DeploymentRegistryService;
+import org.jboss.osgi.deployment.internal.DeploymentRegistryServiceImpl;
+import org.jboss.osgi.deployment.internal.SystemDeployerService;
import org.jboss.osgi.framework.bundle.OSGiBundleManager;
import org.jboss.osgi.framework.plugins.DeployerServicePlugin;
import org.jboss.osgi.framework.plugins.internal.AbstractServicePluginImpl;
-import org.jboss.osgi.spi.util.BundleInfo;
-import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
import org.osgi.framework.BundleException;
-import org.osgi.framework.ServiceRegistration;
/**
* A plugin that manages bundle deployments.
@@ -49,7 +49,7 @@
// Provide logging
final Logger log = Logger.getLogger(DeployerServiceImpl.class);
- private ServiceRegistration registration;
+ private DeployerService delegate;
public DeployerServiceImpl(OSGiBundleManager bundleManager)
{
@@ -59,80 +59,43 @@
public void startService()
{
BundleContext context = getSystemContext();
- registration = context.registerService(DeployerService.class.getName(), this, null);
+
+ DeploymentRegistryService registry = new DeploymentRegistryServiceImpl(context);
+ context.registerService(DeploymentRegistryService.class.getName(), registry, null);
+
+ Properties props = new Properties();
+ props.put("provider", "system");
+ delegate = new SystemDeployerService(context);
+ context.registerService(DeployerService.class.getName(), this, props);
}
public void stopService()
{
- if (registration != null)
- {
- registration.unregister();
- registration = null;
- }
+ // do nothing
}
public Deployment createDeployment(URL url) throws BundleException
{
- BundleInfo info = BundleInfo.createBundleInfo(url);
- return new DeploymentImpl(info);
+ return delegate.createDeployment(url);
}
- public void deploy(URL url) throws BundleException
+ public void deploy(Deployment[] bundleDeps) throws BundleException
{
- bundleManager.install(url);
+ delegate.deploy(bundleDeps);
}
- public void undeploy(URL url) throws BundleException
+ public void deploy(URL url) throws BundleException
{
- Bundle bundle = bundleManager.getBundleByLocation(url.toExternalForm());
- if (bundle != null)
- bundle.uninstall();
+ delegate.deploy(url);
}
-
- public void deploy(Deployment[] depArr) throws BundleException
+
+ public void undeploy(Deployment[] bundleDeps) throws BundleException
{
- for (Deployment dep : depArr)
- {
- try
- {
- Bundle bundle = bundleManager.install(dep.getRoot());
- dep.addAttachment(Bundle.class, bundle);
- }
- catch (Exception ex)
- {
- log.warn("Cannot install bundle: " + dep.getLocation(), ex);
- }
- }
-
- for (Deployment dep : depArr)
- {
- try
- {
- Bundle bundle = dep.getAttachment(Bundle.class);
- if (bundle != null)
- bundle.start();
- }
- catch (Exception ex)
- {
- log.warn("Cannot start bundle: " + dep.getLocation(), ex);
- }
- }
+ delegate.undeploy(bundleDeps);
}
- public void undeploy(Deployment[] depArr) throws BundleException
+ public void undeploy(URL url) throws BundleException
{
- for (Deployment dep : depArr)
- {
- try
- {
- Bundle bundle = dep.getAttachment(Bundle.class);
- if (bundle != null)
- bundle.uninstall();
- }
- catch (Exception ex)
- {
- log.warn("Cannot uninstall bundle: " + dep.getLocation(), ex);
- }
- }
+ delegate.undeploy(url);
}
}
\ No newline at end of file
More information about the jboss-cvs-commits
mailing list