directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r1075726 - in /directory: shared/branches/milestones/ldap/net/mina/ shared/branches/milestones/ldap/net/mina/src/main/java/org/apache/directory/shared/ldap/codec/protocol/mina/ studio/branches/milestones/plugins/connection.core/src/main/jav...
Date Tue, 01 Mar 2011 09:03:58 GMT
Author: pamarcelot
Date: Tue Mar  1 09:03:57 2011
New Revision: 1075726

URL: http://svn.apache.org/viewvc?rev=1075726&view=rev
Log:
Renamed DefaultActivator to LdapProtocolCodecActivator.
Cleaner method for triggering the start of the bundle.

Added:
    directory/shared/branches/milestones/ldap/net/mina/src/main/java/org/apache/directory/shared/ldap/codec/protocol/mina/LdapProtocolCodecActivator.java
      - copied, changed from r1075690, directory/shared/branches/milestones/ldap/net/mina/src/main/java/org/apache/directory/shared/ldap/codec/protocol/mina/DefaultActivator.java
Removed:
    directory/shared/branches/milestones/ldap/net/mina/src/main/java/org/apache/directory/shared/ldap/codec/protocol/mina/DefaultActivator.java
Modified:
    directory/shared/branches/milestones/ldap/net/mina/pom.xml
    directory/studio/branches/milestones/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/api/DirectoryApiConnectionWrapper.java

Modified: directory/shared/branches/milestones/ldap/net/mina/pom.xml
URL: http://svn.apache.org/viewvc/directory/shared/branches/milestones/ldap/net/mina/pom.xml?rev=1075726&r1=1075725&r2=1075726&view=diff
==============================================================================
--- directory/shared/branches/milestones/ldap/net/mina/pom.xml (original)
+++ directory/shared/branches/milestones/ldap/net/mina/pom.xml Tue Mar  1 09:03:57 2011
@@ -67,7 +67,7 @@
             <Bundle-SymbolicName>${project.groupId}.ldap.protocol.codec</Bundle-SymbolicName>
             <Bundle-ActivationPolicy>lazy</Bundle-ActivationPolicy>
             <Bundle-Activator>
-              org.apache.directory.shared.ldap.codec.protocol.mina.DefaultActivator
+              org.apache.directory.shared.ldap.codec.protocol.mina.LdapProtocolCodecActivator
             </Bundle-Activator>
           </instructions>
         </configuration>

Copied: directory/shared/branches/milestones/ldap/net/mina/src/main/java/org/apache/directory/shared/ldap/codec/protocol/mina/LdapProtocolCodecActivator.java
(from r1075690, directory/shared/branches/milestones/ldap/net/mina/src/main/java/org/apache/directory/shared/ldap/codec/protocol/mina/DefaultActivator.java)
URL: http://svn.apache.org/viewvc/directory/shared/branches/milestones/ldap/net/mina/src/main/java/org/apache/directory/shared/ldap/codec/protocol/mina/LdapProtocolCodecActivator.java?p2=directory/shared/branches/milestones/ldap/net/mina/src/main/java/org/apache/directory/shared/ldap/codec/protocol/mina/LdapProtocolCodecActivator.java&p1=directory/shared/branches/milestones/ldap/net/mina/src/main/java/org/apache/directory/shared/ldap/codec/protocol/mina/DefaultActivator.java&r1=1075690&r2=1075726&rev=1075726&view=diff
==============================================================================
--- directory/shared/branches/milestones/ldap/net/mina/src/main/java/org/apache/directory/shared/ldap/codec/protocol/mina/DefaultActivator.java
(original)
+++ directory/shared/branches/milestones/ldap/net/mina/src/main/java/org/apache/directory/shared/ldap/codec/protocol/mina/LdapProtocolCodecActivator.java
Tue Mar  1 09:03:57 2011
@@ -31,20 +31,32 @@ import org.osgi.framework.ServiceRegistr
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-@SuppressWarnings({"UnusedDeclaration"})
-public class DefaultActivator implements BundleActivator
+@SuppressWarnings(
+    { "UnusedDeclaration" })
+public class LdapProtocolCodecActivator implements BundleActivator
 {
     private LdapProtocolCodecFactory factory;
     private ServiceRegistration registration;
 
 
-    @SuppressWarnings({"UnusedDeclaration"})
-    public DefaultActivator()
+    @SuppressWarnings(
+        { "UnusedDeclaration" })
+    public LdapProtocolCodecActivator()
     {
         this.factory = new LdapProtocolCodecFactory();
     }
-    
-    
+
+
+    /**
+     * This class does nothing. It's just a nasty hack to force the bundle
+     * to get started lazy by calling this method.
+     */
+    public static void lazyStart()
+    {
+        // Does nothing
+    }
+
+
     /**
      * {@inheritDoc}
      */
@@ -53,7 +65,7 @@ public class DefaultActivator implements
         registration = bundleContext.registerService( LdapProtocolCodecFactory.class.getName(),
factory, null );
         LdapCodecServiceFactory.getSingleton().registerProtocolCodecFactory( factory );
     }
-    
+
 
     /**
      * {@inheritDoc}

Modified: directory/studio/branches/milestones/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/api/DirectoryApiConnectionWrapper.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/milestones/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/api/DirectoryApiConnectionWrapper.java?rev=1075726&r1=1075725&r2=1075726&view=diff
==============================================================================
--- directory/studio/branches/milestones/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/api/DirectoryApiConnectionWrapper.java
(original)
+++ directory/studio/branches/milestones/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/api/DirectoryApiConnectionWrapper.java
Tue Mar  1 09:03:57 2011
@@ -46,7 +46,7 @@ import org.apache.directory.ldap.client.
 import org.apache.directory.ldap.client.api.LdapConnectionConfig;
 import org.apache.directory.ldap.client.api.LdapNetworkConnection;
 import org.apache.directory.ldap.client.api.exception.InvalidConnectionException;
-import org.apache.directory.shared.ldap.codec.protocol.mina.LdapProtocolCodecFactory;
+import org.apache.directory.shared.ldap.codec.protocol.mina.LdapProtocolCodecActivator;
 import org.apache.directory.shared.ldap.model.cursor.SearchCursor;
 import org.apache.directory.shared.ldap.model.entry.AttributeUtils;
 import org.apache.directory.shared.ldap.model.entry.DefaultModification;
@@ -138,7 +138,7 @@ public class DirectoryApiConnectionWrapp
         // Instantiating one of this bundle class will trigger the start of the bundle
         // thanks to the lazy activation policy
         // DO NOT REMOVE
-        new LdapProtocolCodecFactory();
+        LdapProtocolCodecActivator.lazyStart();
     }
 
 



Mime
View raw message