[jboss-cvs] JBossAS SVN: r85163 - projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Mar 3 08:11:47 EST 2009
Author: thomas.diesler at jboss.com
Date: 2009-03-03 08:11:47 -0500 (Tue, 03 Mar 2009)
New Revision: 85163
Modified:
projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer/BundleStartStopDeployer.java
Log:
Add documentation
Modified: projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer/BundleStartStopDeployer.java
===================================================================
--- projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer/BundleStartStopDeployer.java 2009-03-03 13:08:22 UTC (rev 85162)
+++ projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer/BundleStartStopDeployer.java 2009-03-03 13:11:47 UTC (rev 85163)
@@ -21,6 +21,8 @@
*/
package org.jboss.osgi.deployer;
+// $Id: $
+
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
@@ -38,11 +40,15 @@
* This is the Bundle start/stop Deployer
*
* @author Ales.Justin at jboss.org
+ * @author Thomas.Diesler at jboss.com
+ * @since 27-Feb-2009
*/
public class BundleStartStopDeployer extends AbstractSimpleRealDeployer<Bundle>
{
private BundleContext systemContext;
private PackageAdmin packageAdmin;
+
+ // The list of unresolved bundles
private List<Bundle> unresolvedBundles = new ArrayList<Bundle>();
public BundleStartStopDeployer()
@@ -57,6 +63,7 @@
public void deploy(DeploymentUnit unit, Bundle bundle) throws DeploymentException
{
+ // Get the required dependency on the PackageAdmin service
if (packageAdmin == null)
{
ServiceReference sref = systemContext.getServiceReference(PackageAdmin.class.getName());
@@ -74,6 +81,7 @@
// Try to resolve the bundles
packageAdmin.resolveBundles(bundleArr);
+ // Find resolved bundles and start them
Iterator<Bundle> it = unresolvedBundles.iterator();
while(it.hasNext())
{
@@ -94,6 +102,7 @@
}
}
+ // Report unresolved bundles
if (unresolvedBundles.size() > 0)
log.info("Unresolved: " + unresolvedBundles);
}
More information about the jboss-cvs-commits
mailing list