[jboss-cvs] JBossAS SVN: r59612 - projects/osgi/trunk/deployment/src/main/org/jboss/osgi/deployers.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Sat Jan 13 04:44:08 EST 2007


Author: alesj
Date: 2007-01-13 04:44:06 -0500 (Sat, 13 Jan 2007)
New Revision: 59612

Modified:
   projects/osgi/trunk/deployment/src/main/org/jboss/osgi/deployers/BundleDeployer.java
Log:
bundle input stream

Modified: projects/osgi/trunk/deployment/src/main/org/jboss/osgi/deployers/BundleDeployer.java
===================================================================
--- projects/osgi/trunk/deployment/src/main/org/jboss/osgi/deployers/BundleDeployer.java	2007-01-13 02:47:24 UTC (rev 59611)
+++ projects/osgi/trunk/deployment/src/main/org/jboss/osgi/deployers/BundleDeployer.java	2007-01-13 09:44:06 UTC (rev 59612)
@@ -21,6 +21,8 @@
 */
 package org.jboss.osgi.deployers;
 
+import java.io.InputStream;
+
 import org.jboss.deployers.plugins.deployer.AbstractSimpleDeployer;
 import org.jboss.deployers.spi.DeploymentException;
 import org.jboss.deployers.spi.deployer.DeploymentUnit;
@@ -50,8 +52,16 @@
          VirtualFile root = unit.getFile("");
          if (isBundle(unit, root))
          {
-            BundleAdapter bundleAdapter = platform.installBundle(root.getPathName(), null);
-            unit.getTransientManagedObjects().addAttachment(BundleAdapter.class, bundleAdapter);
+            InputStream is = root.openStream();
+            try
+            {
+               BundleAdapter bundleAdapter = platform.installBundle(root.getName(), is);
+               unit.getTransientManagedObjects().addAttachment(BundleAdapter.class, bundleAdapter);
+            }
+            finally
+            {
+               is.close();
+            }
          }
       }
       catch (Exception e)




More information about the jboss-cvs-commits mailing list