You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@aries.apache.org by ga...@apache.org on 2011/04/26 21:25:33 UTC
svn commit: r1096861 -
/aries/trunk/application/application-management/src/main/java/org/apache/aries/application/management/impl/AriesApplicationManagerImpl.java
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