james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b...@apache.org
Subject svn commit: r382410 - in /james/server/trunk/src: conf/ java/org/apache/james/ java/org/apache/james/remotemanager/ java/org/apache/james/transport/matchers/
Date Thu, 02 Mar 2006 15:27:27 GMT
Author: bago
Date: Thu Mar  2 07:27:24 2006
New Revision: 382410

URL: http://svn.apache.org/viewcvs?rev=382410&view=rev
Log:
"LocalUsers" user repository should be wired in the assembly and not hardcoded in components
(JAMES-450)
AbstractStorageQuota: removed dependency on UserStore and hardcoded "LocalUsers", and replaced
with a dependency on the UsersRepository block (inherithed by the James block)
James: removed the hardcoded lookup to "LocalUsers" and added a new dependency that can be
externally configured (assembly.xml)
RemoteManager: idem (we still have a dependency on "localusers" in RemoteManagerHandler)

Modified:
    james/server/trunk/src/conf/james-assembly.xml
    james/server/trunk/src/java/org/apache/james/James.java
    james/server/trunk/src/java/org/apache/james/James.xinfo
    james/server/trunk/src/java/org/apache/james/remotemanager/RemoteManager.java
    james/server/trunk/src/java/org/apache/james/remotemanager/RemoteManager.xinfo
    james/server/trunk/src/java/org/apache/james/transport/matchers/AbstractStorageQuota.java

Modified: james/server/trunk/src/conf/james-assembly.xml
URL: http://svn.apache.org/viewcvs/james/server/trunk/src/conf/james-assembly.xml?rev=382410&r1=382409&r2=382410&view=diff
==============================================================================
--- james/server/trunk/src/conf/james-assembly.xml (original)
+++ james/server/trunk/src/conf/james-assembly.xml Thu Mar  2 07:27:24 2006
@@ -27,6 +27,7 @@
     <provide name="dnsserver" role="org.apache.james.services.DNSServer"/>
     <provide name="mailstore" role="org.apache.avalon.cornerstone.services.store.Store"/>
     <provide name="users-store" role="org.apache.james.services.UsersStore"/>
+    <provide name="localusersrepository" role="org.apache.james.services.UsersRepository"/>
     <provide name="spoolrepository" role="org.apache.james.services.SpoolRepository"/>
     <provide name="sockets"
              role="org.apache.avalon.cornerstone.services.sockets.SocketManager"/>
@@ -55,6 +56,7 @@
 
   <block name="remotemanager" class="org.apache.james.remotemanager.RemoteManager" >
     <provide name="users-store" role="org.apache.james.services.UsersStore"/>
+    <provide name="localusersrepository" role="org.apache.james.services.UsersRepository"/>
     <provide name="sockets"
              role="org.apache.avalon.cornerstone.services.sockets.SocketManager"/>
     <provide name="connections"

Modified: james/server/trunk/src/java/org/apache/james/James.java
URL: http://svn.apache.org/viewcvs/james/server/trunk/src/java/org/apache/james/James.java?rev=382410&r1=382409&r2=382410&view=diff
==============================================================================
--- james/server/trunk/src/java/org/apache/james/James.java (original)
+++ james/server/trunk/src/java/org/apache/james/James.java Thu Mar  2 07:27:24 2006
@@ -342,7 +342,7 @@
 
         //Get localusers
         try {
-            localusers = usersStore.getRepository("LocalUsers");
+            localusers = (UsersRepository) compMgr.lookup(UsersRepository.ROLE);
         } catch (Exception e) {
             getLogger().error("Cannot open private UserRepository");
             throw e;

Modified: james/server/trunk/src/java/org/apache/james/James.xinfo
URL: http://svn.apache.org/viewcvs/james/server/trunk/src/java/org/apache/james/James.xinfo?rev=382410&r1=382409&r2=382410&view=diff
==============================================================================
--- james/server/trunk/src/java/org/apache/james/James.xinfo (original)
+++ james/server/trunk/src/java/org/apache/james/James.xinfo Thu Mar  2 07:27:24 2006
@@ -30,6 +30,9 @@
       <service name="org.apache.james.services.UsersStore" version="1.0"/>
     </dependency>
     <dependency>
+      <service name="org.apache.james.services.UsersRepository" version="1.0"/>
+    </dependency>
+    <dependency>
       <service name="org.apache.james.services.SpoolRepository" version="1.0"/>
     </dependency>
     <dependency>

Modified: james/server/trunk/src/java/org/apache/james/remotemanager/RemoteManager.java
URL: http://svn.apache.org/viewcvs/james/server/trunk/src/java/org/apache/james/remotemanager/RemoteManager.java?rev=382410&r1=382409&r2=382410&view=diff
==============================================================================
--- james/server/trunk/src/java/org/apache/james/remotemanager/RemoteManager.java (original)
+++ james/server/trunk/src/java/org/apache/james/remotemanager/RemoteManager.java Thu Mar
 2 07:27:24 2006
@@ -106,7 +106,7 @@
             lookup( "org.apache.james.services.MailServer" );
         usersStore = (UsersStore)componentManager.
             lookup( "org.apache.james.services.UsersStore" );
-        users = usersStore.getRepository("LocalUsers");
+        users = (UsersRepository) componentManager.lookup(UsersRepository.ROLE);
         if (users == null) {
             throw new ServiceException("","The user repository could not be found.");
         }

Modified: james/server/trunk/src/java/org/apache/james/remotemanager/RemoteManager.xinfo
URL: http://svn.apache.org/viewcvs/james/server/trunk/src/java/org/apache/james/remotemanager/RemoteManager.xinfo?rev=382410&r1=382409&r2=382410&view=diff
==============================================================================
--- james/server/trunk/src/java/org/apache/james/remotemanager/RemoteManager.xinfo (original)
+++ james/server/trunk/src/java/org/apache/james/remotemanager/RemoteManager.xinfo Thu Mar
 2 07:27:24 2006
@@ -17,6 +17,9 @@
       <service name="org.apache.james.services.UsersStore" version="1.0"/>
     </dependency>
     <dependency>
+      <service name="org.apache.james.services.UsersRepository" version="1.0"/>
+    </dependency>
+    <dependency>
       <service name="org.apache.james.services.JamesConnectionManager" version="1.0"/>
     </dependency>
     <dependency>

Modified: james/server/trunk/src/java/org/apache/james/transport/matchers/AbstractStorageQuota.java
URL: http://svn.apache.org/viewcvs/james/server/trunk/src/java/org/apache/james/transport/matchers/AbstractStorageQuota.java?rev=382410&r1=382409&r2=382410&view=diff
==============================================================================
--- james/server/trunk/src/java/org/apache/james/transport/matchers/AbstractStorageQuota.java
(original)
+++ james/server/trunk/src/java/org/apache/james/transport/matchers/AbstractStorageQuota.java
Thu Mar  2 07:27:24 2006
@@ -24,7 +24,6 @@
 import org.apache.james.services.MailRepository;
 import org.apache.james.services.MailServer;
 import org.apache.james.services.UsersRepository;
-import org.apache.james.services.UsersStore;
 import org.apache.mailet.Mail;
 import org.apache.mailet.MailAddress;
 import org.apache.mailet.MailetContext;
@@ -46,9 +45,6 @@
 
     private MailServer mailServer;
 
-    /** The store containing the local user repository. */
-    private UsersStore usersStore;
-
     /** The user repository for this mail server.  Contains all the users with inboxes
      * on this server.
      */
@@ -65,13 +61,12 @@
             mailServer = (MailServer) compMgr.lookup(MailServer.ROLE);
         } catch (ServiceException e) {
             log("Exception in getting the MailServer: " + e.getMessage() + e.getKey());
-        }        
+        }
         try {
-            usersStore = (UsersStore)compMgr.lookup(UsersStore.ROLE);
+            localusers = (UsersRepository) compMgr.lookup(UsersRepository.ROLE);
         } catch (ServiceException e) {
             log("Exception in getting the UsersStore: " + e.getMessage() + e.getKey());
-        }        
-        localusers = (UsersRepository)usersStore.getRepository("LocalUsers");
+        }
     }
 
     /** 



---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message