[jboss-osgi-commits] JBoss-OSGI SVN: r99116 - projects/jboss-osgi/projects/runtime/deployment/trunk/src/main/java/org/jboss/osgi/deployment/internal.
jboss-osgi-commits at lists.jboss.org
jboss-osgi-commits at lists.jboss.org
Thu Jan 7 09:30:54 EST 2010
Author: thomas.diesler at jboss.com
Date: 2010-01-07 09:30:54 -0500 (Thu, 07 Jan 2010)
New Revision: 99116
Modified:
projects/jboss-osgi/projects/runtime/deployment/trunk/src/main/java/org/jboss/osgi/deployment/internal/SystemDeployerService.java
Log:
Throw BundleException on install failure
Modified: projects/jboss-osgi/projects/runtime/deployment/trunk/src/main/java/org/jboss/osgi/deployment/internal/SystemDeployerService.java
===================================================================
--- projects/jboss-osgi/projects/runtime/deployment/trunk/src/main/java/org/jboss/osgi/deployment/internal/SystemDeployerService.java 2010-01-07 14:29:54 UTC (rev 99115)
+++ projects/jboss-osgi/projects/runtime/deployment/trunk/src/main/java/org/jboss/osgi/deployment/internal/SystemDeployerService.java 2010-01-07 14:30:54 UTC (rev 99116)
@@ -60,7 +60,7 @@
{
// Provide logging
private Logger log = LoggerFactory.getLogger(SystemDeployerService.class);
-
+
private BundleContext context;
private ServiceTracker startLevelTracker;
@@ -96,26 +96,19 @@
List<Bundle> resolvableBundles = new ArrayList<Bundle>();
Map<Deployment, Bundle> bundleMap = new HashMap<Deployment, Bundle>();
-
+
for (Deployment dep : depArr)
{
- try
- {
- log.debug("Install: " + dep.getLocation());
-
- String location = dep.getLocation();
- Bundle bundle = context.installBundle(location);
+ log.debug("Install: " + dep.getLocation());
- bundleMap.put(dep, bundle);
- if (dep.isAutoStart())
- resolvableBundles.add(bundle);
+ String location = dep.getLocation();
+ Bundle bundle = context.installBundle(location);
- registry.registerDeployment(dep);
- }
- catch (BundleException ex)
- {
- log.error("Cannot install bundle: " + dep, ex);
- }
+ bundleMap.put(dep, bundle);
+ if (dep.isAutoStart())
+ resolvableBundles.add(bundle);
+
+ registry.registerDeployment(dep);
}
// Resolve the installed bundles through the PackageAdmin
@@ -127,7 +120,7 @@
resolvableBundles.toArray(resolvableBundleArr);
packageAdmin.resolveBundles(resolvableBundleArr);
}
-
+
// Start the installed bundles
for (Entry<Deployment, Bundle> entry : bundleMap.entrySet())
{
@@ -177,7 +170,7 @@
if (bundle != null)
{
log.debug("Uninstall: " + bundle);
-
+
registry.unregisterDeployment(dep);
bundle.uninstall();
@@ -235,7 +228,7 @@
ServiceReference sref = context.getServiceReference(DeploymentRegistryService.class.getName());
if (sref == null)
throw new IllegalStateException("Cannot obtain DeploymentRegistryService");
-
+
return (DeploymentRegistryService)context.getService(sref);
}
More information about the jboss-osgi-commits
mailing list