aries-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dav...@apache.org
Subject svn commit: r1232390 - in /aries/trunk/jndi: jndi-core/ jndi-core/src/main/java/org/apache/aries/jndi/startup/ jndi-rmi/ jndi-rmi/src/main/java/org/apache/aries/jndi/rmi/ jndi-url-itest/ jndi-url-itest/src/test/java/org/apache/aries/jndi/itests/ jndi-u...
Date Tue, 17 Jan 2012 11:35:57 GMT
Author: davidb
Date: Tue Jan 17 11:35:56 2012
New Revision: 1232390

URL: http://svn.apache.org/viewvc?rev=1232390&view=rev
Log:
Remove dependency on SLF4J. This functionality is now provided by the OSGi LogService.

Modified:
    aries/trunk/jndi/jndi-core/pom.xml
    aries/trunk/jndi/jndi-core/src/main/java/org/apache/aries/jndi/startup/Activator.java
    aries/trunk/jndi/jndi-rmi/pom.xml
    aries/trunk/jndi/jndi-rmi/src/main/java/org/apache/aries/jndi/rmi/Activator.java
    aries/trunk/jndi/jndi-url-itest/pom.xml
    aries/trunk/jndi/jndi-url-itest/src/test/java/org/apache/aries/jndi/itests/JndiUrlIntegrationTest.java
    aries/trunk/jndi/jndi-url/pom.xml
    aries/trunk/jndi/jndi-url/src/main/java/org/apache/aries/jndi/url/Activator.java

Modified: aries/trunk/jndi/jndi-core/pom.xml
URL: http://svn.apache.org/viewvc/aries/trunk/jndi/jndi-core/pom.xml?rev=1232390&r1=1232389&r2=1232390&view=diff
==============================================================================
--- aries/trunk/jndi/jndi-core/pom.xml (original)
+++ aries/trunk/jndi/jndi-core/pom.xml Tue Jan 17 11:35:56 2012
@@ -79,22 +79,12 @@
             <scope>provided</scope>
         </dependency>
         <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
             <groupId>org.apache.aries.testsupport</groupId>
             <artifactId>org.apache.aries.testsupport.unit</artifactId>
             <scope>test</scope>
             <version>0.3</version>
         </dependency>
         <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-simple</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
             <groupId>junit</groupId>
             <artifactId>junit</artifactId>
             <scope>test</scope>
@@ -102,7 +92,7 @@
         <dependency>
             <groupId>org.apache.aries</groupId>
             <artifactId>org.apache.aries.util</artifactId>
-            <version>0.4</version>
+            <version>0.5-SNAPSHOT</version>
         </dependency>
 
     </dependencies>

Modified: aries/trunk/jndi/jndi-core/src/main/java/org/apache/aries/jndi/startup/Activator.java
URL: http://svn.apache.org/viewvc/aries/trunk/jndi/jndi-core/src/main/java/org/apache/aries/jndi/startup/Activator.java?rev=1232390&r1=1232389&r2=1232390&view=diff
==============================================================================
--- aries/trunk/jndi/jndi-core/src/main/java/org/apache/aries/jndi/startup/Activator.java
(original)
+++ aries/trunk/jndi/jndi-core/src/main/java/org/apache/aries/jndi/startup/Activator.java
Tue Jan 17 11:35:56 2012
@@ -37,23 +37,22 @@ import org.apache.aries.jndi.Utils;
 import org.apache.aries.jndi.spi.EnvironmentAugmentation;
 import org.apache.aries.jndi.tracker.ServiceTrackerCustomizers;
 import org.apache.aries.jndi.urls.URLObjectFactoryFinder;
+import org.apache.aries.util.log.Logger;
 import org.osgi.framework.BundleActivator;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.ServiceReference;
 import org.osgi.service.jndi.JNDIContextManager;
 import org.osgi.service.jndi.JNDIProviderAdmin;
+import org.osgi.service.log.LogService;
 import org.osgi.util.tracker.ServiceTracker;
 import org.osgi.util.tracker.ServiceTrackerCustomizer;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 /**
  * The activator for this bundle makes sure the static classes in it are
  * driven so they can do their magic stuff properly.
  */
 public class Activator implements BundleActivator {
-
-    private static final Logger LOGGER = LoggerFactory.getLogger(Activator.class.getName());
+    private static Logger logger;
 
     private OSGiInitialContextFactoryBuilder icfBuilder;
     private OSGiObjectFactoryBuilder ofBuilder;
@@ -64,6 +63,8 @@ public class Activator implements Bundle
     private static ServiceTracker environmentAugmentors;
 
     public void start(BundleContext context) {
+        logger = new Logger(context);
+        logger.open();
 
         initialContextFactories = initServiceTracker(context, InitialContextFactory.class,
ServiceTrackerCustomizers.ICF_CACHE);
         objectFactories = initServiceTracker(context, ObjectFactory.class, ServiceTrackerCustomizers.URL_FACTORY_CACHE);
@@ -76,9 +77,9 @@ public class Activator implements Bundle
             NamingManager.setInitialContextFactoryBuilder(builder);
             icfBuilder = builder;
         } catch (NamingException e) {
-            LOGGER.info(Utils.MESSAGES.getMessage("unable.to.set.static.ICFB"), e);
+            logger.log(LogService.LOG_INFO, Utils.MESSAGES.getMessage("unable.to.set.static.ICFB"),
e);
         } catch (IllegalStateException e) {
-            LOGGER.info(Utils.MESSAGES.getMessage("unable.to.set.static.ICFB.already.exists",
getClassName(InitialContextFactoryBuilder.class)), e);
+            logger.log(LogService.LOG_INFO, Utils.MESSAGES.getMessage("unable.to.set.static.ICFB.already.exists",
getClassName(InitialContextFactoryBuilder.class)), e);
         }
 
         try {
@@ -86,9 +87,9 @@ public class Activator implements Bundle
             NamingManager.setObjectFactoryBuilder(builder);
             ofBuilder = builder;
         } catch (NamingException e) {
-            LOGGER.info(Utils.MESSAGES.getMessage("unable.to.set.static.OFB"), e);
+            logger.log(LogService.LOG_INFO, Utils.MESSAGES.getMessage("unable.to.set.static.OFB"),
e);
         } catch (IllegalStateException e) {
-            LOGGER.info(Utils.MESSAGES.getMessage("unable.to.set.static.OFB.already.exists",
getClassName(InitialContextFactoryBuilder.class)), e);
+            logger.log(LogService.LOG_INFO, Utils.MESSAGES.getMessage("unable.to.set.static.OFB.already.exists",
getClassName(InitialContextFactoryBuilder.class)), e);
         }
 
         context.registerService(JNDIProviderAdmin.class.getName(),
@@ -145,6 +146,9 @@ public class Activator implements Bundle
         objectFactories.close();
         initialContextFactories.close();
         environmentAugmentors.close();
+
+        if (logger != null)
+            logger.close();
     }
 
     /*
@@ -160,8 +164,8 @@ public class Activator implements Bundle
                 }
             }
         } catch (Throwable t) {
-            // Ignore
-            LOGGER.debug("Error setting field.", t);
+            if (logger != null)
+                logger.log(LogService.LOG_DEBUG, "Error setting field.", t);
         }
     }
 

Modified: aries/trunk/jndi/jndi-rmi/pom.xml
URL: http://svn.apache.org/viewvc/aries/trunk/jndi/jndi-rmi/pom.xml?rev=1232390&r1=1232389&r2=1232390&view=diff
==============================================================================
--- aries/trunk/jndi/jndi-rmi/pom.xml (original)
+++ aries/trunk/jndi/jndi-rmi/pom.xml Tue Jan 17 11:35:56 2012
@@ -69,7 +69,7 @@
         <dependency>
             <groupId>org.apache.aries</groupId>
             <artifactId>org.apache.aries.util</artifactId>
-            <version>0.4</version>
+            <version>0.5-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>org.osgi</groupId>
@@ -77,8 +77,8 @@
             <scope>provided</scope>
         </dependency>
         <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.compendium</artifactId>
             <scope>provided</scope>
         </dependency>
     </dependencies>

Modified: aries/trunk/jndi/jndi-rmi/src/main/java/org/apache/aries/jndi/rmi/Activator.java
URL: http://svn.apache.org/viewvc/aries/trunk/jndi/jndi-rmi/src/main/java/org/apache/aries/jndi/rmi/Activator.java?rev=1232390&r1=1232389&r2=1232390&view=diff
==============================================================================
--- aries/trunk/jndi/jndi-rmi/src/main/java/org/apache/aries/jndi/rmi/Activator.java (original)
+++ aries/trunk/jndi/jndi-rmi/src/main/java/org/apache/aries/jndi/rmi/Activator.java Tue Jan
17 11:35:56 2012
@@ -23,23 +23,21 @@ import java.util.Hashtable;
 import javax.naming.spi.ObjectFactory;
 
 import org.apache.aries.util.AriesFrameworkUtil;
+import org.apache.aries.util.log.Logger;
 import org.apache.aries.util.nls.MessageUtil;
 import org.osgi.framework.BundleActivator;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.ServiceRegistration;
 import org.osgi.service.jndi.JNDIConstants;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.osgi.service.log.LogService;
 
 public class Activator implements BundleActivator {
-
+    private Logger logger;
     private ServiceRegistration reg;
 
-    private static final Logger LOGGER = LoggerFactory.getLogger(Activator.class.getName());
-
     public void start(BundleContext context) {
-
-        LOGGER.debug("Registering RMI url handler");
+        logger = new Logger(context);
+        logger.open();
 
         try {
             Hashtable<Object, Object> props = new Hashtable<Object, Object>();
@@ -48,16 +46,20 @@ public class Activator implements Bundle
                         ObjectFactory.class.getName(),
                         ClassLoader.getSystemClassLoader().loadClass("com.sun.jndi.url.rmi.rmiURLContextFactory").newInstance(),
                         props);
+
+            logger.log(LogService.LOG_DEBUG, "Registered RMI url handler");
         }
         catch (Exception e)
         {
             MessageUtil msg = MessageUtil.createMessageUtil(Activator.class, "org.apache.aries.jndi.nls.jndiRmiMessages");
-            LOGGER.info(msg.getMessage("rmi.factory.creation.failed"), e);
+            logger.log(LogService.LOG_INFO, msg.getMessage("rmi.factory.creation.failed"),
e);
         }
     }
 
     public void stop(BundleContext context) {
         AriesFrameworkUtil.safeUnregisterService(reg);
-    }
 
+        if (logger != null)
+            logger.close();
+    }
 }

Modified: aries/trunk/jndi/jndi-url-itest/pom.xml
URL: http://svn.apache.org/viewvc/aries/trunk/jndi/jndi-url-itest/pom.xml?rev=1232390&r1=1232389&r2=1232390&view=diff
==============================================================================
--- aries/trunk/jndi/jndi-url-itest/pom.xml (original)
+++ aries/trunk/jndi/jndi-url-itest/pom.xml Tue Jan 17 11:35:56 2012
@@ -76,7 +76,7 @@
             <groupId>org.apache.aries</groupId>
             <artifactId>org.apache.aries.util</artifactId>
             <scope>test</scope>
-            <version>0.4</version>
+            <version>0.5-SNAPSHOT</version>
         </dependency>
 
         <dependency>
@@ -171,17 +171,17 @@
             <version>3.2</version>
         </dependency>
 
-		<dependency>
-			<groupId>org.eclipse.equinox</groupId>
-			<artifactId>cm</artifactId>
+        <dependency>
+            <groupId>org.eclipse.equinox</groupId>
+            <artifactId>cm</artifactId>
             <scope>test</scope>
-		</dependency>
+        </dependency>
 
-		<dependency>
-			<groupId>org.eclipse.osgi</groupId>
-			<artifactId>services</artifactId>
+        <dependency>
+            <groupId>org.eclipse.osgi</groupId>
+            <artifactId>services</artifactId>
             <scope>test</scope>
-		</dependency>
+        </dependency>
 
         <dependency>
             <groupId>org.apache.geronimo.specs</groupId>
@@ -190,32 +190,32 @@
             <version>1.2</version>
         </dependency>
             
-		<dependency>
-			<groupId>org.ops4j.pax.web</groupId>
-			<artifactId>pax-web-extender-war</artifactId>
+        <dependency>
+            <groupId>org.ops4j.pax.web</groupId>
+            <artifactId>pax-web-extender-war</artifactId>
             <scope>test</scope>
             <version>0.8.1</version>
-		</dependency>
-		<dependency>
-			<groupId>org.ops4j.pax.web</groupId>
-			<artifactId>pax-web-jetty-bundle</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.ops4j.pax.web</groupId>
+            <artifactId>pax-web-jetty-bundle</artifactId>
             <scope>test</scope>
             <version>0.8.1</version>
-		</dependency>
+        </dependency>
 
-		<dependency>
-			<groupId>org.apache.felix</groupId>
-			<artifactId>org.apache.felix.fileinstall</artifactId>
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.fileinstall</artifactId>
             <scope>test</scope>
             <version>2.0.8</version>
-		</dependency>
+        </dependency>
         
-		<dependency>
-			<groupId>org.apache.aries.jndi</groupId>
-			<artifactId>org.apache.aries.jndi</artifactId>
+        <dependency>
+            <groupId>org.apache.aries.jndi</groupId>
+            <artifactId>org.apache.aries.jndi</artifactId>
             <scope>test</scope>
             <version>0.3.2-SNAPSHOT</version>
-		</dependency>
+        </dependency>
 
         <dependency>
             <groupId>org.apache.aries.jndi</groupId>
@@ -230,7 +230,6 @@
           <version>0.4</version>
           <scope>test</scope>
         </dependency>
-
     </dependencies>
 
      <build>

Modified: aries/trunk/jndi/jndi-url-itest/src/test/java/org/apache/aries/jndi/itests/JndiUrlIntegrationTest.java
URL: http://svn.apache.org/viewvc/aries/trunk/jndi/jndi-url-itest/src/test/java/org/apache/aries/jndi/itests/JndiUrlIntegrationTest.java?rev=1232390&r1=1232389&r2=1232390&view=diff
==============================================================================
--- aries/trunk/jndi/jndi-url-itest/src/test/java/org/apache/aries/jndi/itests/JndiUrlIntegrationTest.java
(original)
+++ aries/trunk/jndi/jndi-url-itest/src/test/java/org/apache/aries/jndi/itests/JndiUrlIntegrationTest.java
Tue Jan 17 11:35:56 2012
@@ -19,10 +19,13 @@
 
 package org.apache.aries.jndi.itests;
 
+import static org.apache.aries.itest.ExtraOptions.mavenBundle;
+import static org.apache.aries.itest.ExtraOptions.paxLogging;
+import static org.apache.aries.itest.ExtraOptions.testOptions;
+import static org.apache.aries.itest.ExtraOptions.transactionBootDelegation;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 import static org.ops4j.pax.exam.CoreOptions.equinox;
-import static org.apache.aries.itest.ExtraOptions.*;
 
 import java.io.BufferedReader;
 import java.io.IOException;
@@ -41,64 +44,64 @@ import org.osgi.framework.Bundle;
 public class JndiUrlIntegrationTest extends AbstractIntegrationTest {
 
   private static final int CONNECTION_TIMEOUT = 10000;
-    
+
   /**
    * This test exercises the blueprint:comp/ jndi namespace by driving
    * a Servlet which then looks up some blueprint components from its own
-   * bundle, including a reference which it uses to call a service from a 
-   * second bundle.  
+   * bundle, including a reference which it uses to call a service from a
+   * second bundle.
    * @throws Exception
    */
   @Test
-  public void testBlueprintCompNamespaceWorks() throws Exception { 
+  public void testBlueprintCompNamespaceWorks() throws Exception {
 
     Bundle bBiz = context().getBundleByName("org.apache.aries.jndi.url.itest.biz");
     assertNotNull(bBiz);
-    
+
     Bundle bweb = context().getBundleByName("org.apache.aries.jndi.url.itest.web");
     assertNotNull(bweb);
-    
+
     printBundleStatus ("Before making web request");
-    try { 
+    try {
       Thread.sleep(5000);
     } catch (InterruptedException ix) {}
-    
+
     System.out.println("In test and trying to get connection....");
     String response = getTestServletResponse();
     System.out.println("Got response `" + response + "`");
     assertEquals("ITest servlet response wrong", "Mark.2.0.three", response);
   }
-  
-  private void printBundleStatus (String msg) { 
+
+  private void printBundleStatus (String msg) {
     System.out.println("-----\nprintBundleStatus: " + msg + "\n-----");
-    for (Bundle b : bundleContext.getBundles()) { 
+    for (Bundle b : bundleContext.getBundles()) {
       System.out.println (b.getSymbolicName() + " " + "state=" + formatState(b.getState()));
     }
     System.out.println();
   }
-  
+
   private String formatState (int state) {
     String result = Integer.toString(state);
-    switch (state) { 
-    case Bundle.ACTIVE: 
+    switch (state) {
+    case Bundle.ACTIVE:
       result = "Active";
       break;
-    case Bundle.INSTALLED: 
+    case Bundle.INSTALLED:
       result = "Installed";
       break;
-    case Bundle.RESOLVED: 
+    case Bundle.RESOLVED:
       result = "Resolved";
       break;
     }
     return result;
   }
-  
-  private String getTestServletResponse() throws IOException { 
+
+  private String getTestServletResponse() throws IOException {
     HttpURLConnection conn = makeConnection("http://localhost:8080/jndiUrlItest/ITestServlet");
     String response = getHTTPResponse(conn).trim();
     return response;
   }
-  
+
   private static HttpURLConnection makeConnection(String contextPath) throws IOException
   {
     URL url = new URL(contextPath);
@@ -109,7 +112,7 @@ public class JndiUrlIntegrationTest exte
 
     return conn;
   }
-  
+
   private static String getHTTPResponse(HttpURLConnection conn) throws IOException
   {
     StringBuilder response = new StringBuilder();
@@ -124,14 +127,14 @@ public class JndiUrlIntegrationTest exte
 
     return response.toString();
   }
-  
+
   @org.ops4j.pax.exam.junit.Configuration
   public static Option[] configuration()
   {
     return testOptions(
         paxLogging("DEBUG"),
-        transactionBootDelegation(), 
-        
+        transactionBootDelegation(),
+
         // Bundles
         mavenBundle("org.eclipse.equinox", "cm"),
         mavenBundle("org.eclipse.osgi", "services"),
@@ -139,25 +142,20 @@ public class JndiUrlIntegrationTest exte
 
         mavenBundle("org.ops4j.pax.web", "pax-web-extender-war"),
         mavenBundle("org.ops4j.pax.web", "pax-web-jetty-bundle"),
-        
+
         mavenBundle("org.apache.aries.blueprint", "org.apache.aries.blueprint.api"),
         mavenBundle("org.apache.aries.blueprint", "org.apache.aries.blueprint.core"),
         mavenBundle("org.apache.aries.proxy", "org.apache.aries.proxy"),
         mavenBundle("org.apache.aries", "org.apache.aries.util"),
         mavenBundle("org.apache.aries.jndi", "org.apache.aries.jndi"),
-      
+
         mavenBundle("org.apache.aries.jndi", "org.apache.aries.jndi.url.itest.web"),
         mavenBundle("org.apache.aries.jndi", "org.apache.aries.jndi.url.itest.biz"),
         mavenBundle("asm", "asm-all"),
-        
+
         /* For debugging, uncomment the next two lines */
-        // vmOption("-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=7777"),
-        // waitForFrameworkStartup(),
-        /*
-         * For debugging, add these imports: 
-         * import static org.ops4j.pax.exam.CoreOptions.waitForFrameworkStartup; 
-         * import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.vmOption;
-         */
+        // org.ops4j.pax.exam.container.def.PaxRunnerOptions.vmOption("-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=7777"),
+        // org.ops4j.pax.exam.CoreOptions.waitForFrameworkStartup(),
         equinox().version("3.5.0"));
   }
 }

Modified: aries/trunk/jndi/jndi-url/pom.xml
URL: http://svn.apache.org/viewvc/aries/trunk/jndi/jndi-url/pom.xml?rev=1232390&r1=1232389&r2=1232390&view=diff
==============================================================================
--- aries/trunk/jndi/jndi-url/pom.xml (original)
+++ aries/trunk/jndi/jndi-url/pom.xml Tue Jan 17 11:35:56 2012
@@ -73,7 +73,7 @@
         <dependency>
             <groupId>org.apache.aries</groupId>
             <artifactId>org.apache.aries.util</artifactId>
-            <version>0.4</version>
+            <version>0.5-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>org.apache.aries.proxy</groupId>
@@ -103,11 +103,6 @@
             <version>0.4</version>
         </dependency>
         <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-simple</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
             <groupId>junit</groupId>
             <artifactId>junit</artifactId>
             <scope>test</scope>

Modified: aries/trunk/jndi/jndi-url/src/main/java/org/apache/aries/jndi/url/Activator.java
URL: http://svn.apache.org/viewvc/aries/trunk/jndi/jndi-url/src/main/java/org/apache/aries/jndi/url/Activator.java?rev=1232390&r1=1232389&r2=1232390&view=diff
==============================================================================
--- aries/trunk/jndi/jndi-url/src/main/java/org/apache/aries/jndi/url/Activator.java (original)
+++ aries/trunk/jndi/jndi-url/src/main/java/org/apache/aries/jndi/url/Activator.java Tue Jan
17 11:35:56 2012
@@ -24,24 +24,30 @@ import javax.naming.spi.ObjectFactory;
 
 import org.apache.aries.proxy.ProxyManager;
 import org.apache.aries.util.AriesFrameworkUtil;
+import org.apache.aries.util.log.Logger;
 import org.apache.aries.util.tracker.SingleServiceTracker;
 import org.apache.aries.util.tracker.SingleServiceTracker.SingleServiceListener;
 import org.osgi.framework.BundleActivator;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.ServiceRegistration;
 import org.osgi.service.jndi.JNDIConstants;
+import org.osgi.service.log.LogService;
 
-public class Activator implements BundleActivator, SingleServiceListener 
+public class Activator implements BundleActivator, SingleServiceListener
 {
     private BundleContext ctx;
+    private Logger logger;
     private volatile ServiceRegistration osgiUrlReg = null;
     private volatile ServiceRegistration blueprintUrlReg = null;
     private static SingleServiceTracker<ProxyManager> proxyManager;
 
     @Override
-    public void start(BundleContext context) 
+    public void start(BundleContext context)
     {
         ctx = context;
+        logger = new Logger(context);
+        logger.open();
+
         proxyManager = new SingleServiceTracker<ProxyManager>(context, ProxyManager.class,
this);
         proxyManager.open();
         // Blueprint URL scheme requires access to the BlueprintContainer service.
@@ -56,7 +62,7 @@ public class Activator implements Bundle
               new BlueprintURLContextServiceFactory(), blueprintURlSchemeProps);
         } catch (ClassNotFoundException cnfe) {
           // The blueprint packages aren't available, so do nothing. That's fine.
-          cnfe.printStackTrace();
+          logger.log(LogService.LOG_INFO, "Blueprint is not available, therefore the blueprint
URL scheme is not registered.", cnfe);
         }
     }
 
@@ -65,11 +71,14 @@ public class Activator implements Bundle
       proxyManager.close();
       AriesFrameworkUtil.safeUnregisterService(osgiUrlReg);
       AriesFrameworkUtil.safeUnregisterService(blueprintUrlReg);
+
+      if (logger != null)
+          logger.close();
     }
-  
+
 
   @Override
-  public void serviceFound() 
+  public void serviceFound()
   {
     Hashtable<Object, Object> osgiUrlprops = new Hashtable<Object, Object>();
     osgiUrlprops.put(JNDIConstants.JNDI_URLSCHEME, new String[] { "osgi", "aries" });
@@ -78,18 +87,18 @@ public class Activator implements Bundle
   }
 
   @Override
-  public void serviceLost() 
+  public void serviceLost()
   {
     AriesFrameworkUtil.safeUnregisterService(osgiUrlReg);
     osgiUrlReg = null;
   }
 
   @Override
-  public void serviceReplaced() 
+  public void serviceReplaced()
   {
-    
+
   }
-    
+
   public static ProxyManager getProxyManager()
   {
     return proxyManager == null ? null : proxyManager.getService();



Mime
View raw message