aries-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r1096861 - /aries/trunk/application/application-management/src/main/java/org/apache/aries/application/management/impl/AriesApplicationManagerImpl.java
Date Tue, 26 Apr 2011 19:25:33 GMT
Author: gawor
Date: Tue Apr 26 19:25:33 2011
New Revision: 1096861

URL: http://svn.apache.org/viewvc?rev=1096861&view=rev
Log:
ARIES-638: Logging improvements for AriesApplicationManagerImpl

Modified:
    aries/trunk/application/application-management/src/main/java/org/apache/aries/application/management/impl/AriesApplicationManagerImpl.java

Modified: aries/trunk/application/application-management/src/main/java/org/apache/aries/application/management/impl/AriesApplicationManagerImpl.java
URL: http://svn.apache.org/viewvc/aries/trunk/application/application-management/src/main/java/org/apache/aries/application/management/impl/AriesApplicationManagerImpl.java?rev=1096861&r1=1096860&r2=1096861&view=diff
==============================================================================
--- aries/trunk/application/application-management/src/main/java/org/apache/aries/application/management/impl/AriesApplicationManagerImpl.java
(original)
+++ aries/trunk/application/application-management/src/main/java/org/apache/aries/application/management/impl/AriesApplicationManagerImpl.java
Tue Apr 26 19:25:33 2011
@@ -157,8 +157,10 @@ public class AriesApplicationManagerImpl
         BundleManifest bm = getBundleManifest (f);
         if (bm != null) {
           if (bm.isValid()) {
+            _logger.debug("File {} is a valid bundle. Adding it to bundle list.", f.getName());
             extraBundlesInfo.add(new SimpleBundleInfo(bm, f.toURL().toExternalForm()));
           } else if (deploymentManifest == null) { 
+            _logger.debug("File {} is not a valid bundle. Attempting to convert it.", f.getName());
             // We have a jar that needs converting to a bundle, or a war to migrate to a
WAB 
             // We only do this if a DEPLOYMENT.MF does not exist.
             BundleConversion convertedBinary = null;
@@ -166,7 +168,9 @@ public class AriesApplicationManagerImpl
             List<ConversionException> conversionExceptions = Collections.emptyList();
             while (converters.hasNext() && convertedBinary == null) { 
               try {
-                convertedBinary = converters.next().convert(ebaFile, f);
+            	BundleConverter converter = converters.next();
+            	_logger.debug("Converting file using {} converter", converter);
+                convertedBinary = converter.convert(ebaFile, f);
               } catch (ServiceException sx) {
                 // We'll get this if our optional BundleConverter has not been injected.

               } catch (ConversionException cx) { 
@@ -180,11 +184,18 @@ public class AriesApplicationManagerImpl
               throw new ManagementException (MessageUtil.getMessage("APPMANAGEMENT0005E",
appName));
             }
             if (convertedBinary != null) { 
+              _logger.debug("File {} was successfully converted. Adding it to bundle list.",
f.getName());
               modifiedBundles.put (f.getName(), convertedBinary);             
               extraBundlesInfo.add(convertedBinary.getBundleInfo());
-            } 
+            } else {
+              _logger.debug("File {} was not converted.", f.getName());
+            }
+          } else {
+            _logger.debug("File {} was ignored. It is not a valid bundle and DEPLOYMENT.MF
is present", f.getName());
           }
-        } 
+        } else {
+          _logger.debug("File {} was ignored. It has no manifest file.", f.getName());
+        }
       }
  
       // if Application-Content header was not specified build it based on the bundles included
by value



Mime
View raw message