[jboss-cvs] JBossAS SVN: r98041 - projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/deployers.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Sun Dec 20 03:40:51 EST 2009


Author: thomas.diesler at jboss.com
Date: 2009-12-20 03:40:51 -0500 (Sun, 20 Dec 2009)
New Revision: 98041

Modified:
   projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/deployers/OSGiBundleNativeCodeDeployer.java
Log:
javadoc

Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/deployers/OSGiBundleNativeCodeDeployer.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/deployers/OSGiBundleNativeCodeDeployer.java	2009-12-20 08:39:02 UTC (rev 98040)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/deployers/OSGiBundleNativeCodeDeployer.java	2009-12-20 08:40:51 UTC (rev 98041)
@@ -205,10 +205,6 @@
       if (entryURL == null)
          throw new DeploymentException("Cannot find native library: " + nativeLib);
 
-      // Get the library name key
-      String libfile = new File(nativeLib).getName();
-      String libname = libfile.substring(0, libfile.lastIndexOf('.'));
-      
       // Copy the native library to the bundle storage area
       File nativeFileCopy;
       try
@@ -225,6 +221,10 @@
          throw new DeploymentException("Cannot copy native library: " + nativeLib, ex);
       }
       
+      // Generate the key for the library mapping
+      String libfile = new File(nativeLib).getName();
+      String libname = libfile.substring(0, libfile.lastIndexOf('.'));
+      
       // Add the native library mapping to the OSGiClassLoaderPolicy
       OSGiClassLoaderPolicy policy = (OSGiClassLoaderPolicy)unit.getAttachment(ClassLoaderPolicy.class);
       policy.addLibraryMapping(libname, nativeFileCopy);




More information about the jboss-cvs-commits mailing list