james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n...@apache.org
Subject svn commit: r168022 - in /james/server/branches/merge_v2_and_trunk/src/java/org/apache/james: mailrepository/ transport/mailets/
Date Tue, 03 May 2005 23:43:15 GMT
Author: noel
Date: Tue May  3 16:43:14 2005
New Revision: 168022

URL: http://svn.apache.org/viewcvs?rev=168022&view=rev
Log:
merger.  more avalon updates.  Component -> Service

Modified:
    james/server/branches/merge_v2_and_trunk/src/java/org/apache/james/mailrepository/AvalonMailRepository.java
    james/server/branches/merge_v2_and_trunk/src/java/org/apache/james/mailrepository/JDBCMailRepository.java
    james/server/branches/merge_v2_and_trunk/src/java/org/apache/james/mailrepository/MBoxMailRepository.java
    james/server/branches/merge_v2_and_trunk/src/java/org/apache/james/transport/mailets/AvalonListserv.java
    james/server/branches/merge_v2_and_trunk/src/java/org/apache/james/transport/mailets/AvalonListservManager.java
    james/server/branches/merge_v2_and_trunk/src/java/org/apache/james/transport/mailets/CommandListservManager.java
    james/server/branches/merge_v2_and_trunk/src/java/org/apache/james/transport/mailets/CommandListservProcessor.java
    james/server/branches/merge_v2_and_trunk/src/java/org/apache/james/transport/mailets/FromRepository.java
    james/server/branches/merge_v2_and_trunk/src/java/org/apache/james/transport/mailets/JDBCAlias.java
    james/server/branches/merge_v2_and_trunk/src/java/org/apache/james/transport/mailets/JDBCListserv.java
    james/server/branches/merge_v2_and_trunk/src/java/org/apache/james/transport/mailets/JDBCVirtualUserTable.java
    james/server/branches/merge_v2_and_trunk/src/java/org/apache/james/transport/mailets/RemoteDelivery.java
    james/server/branches/merge_v2_and_trunk/src/java/org/apache/james/transport/mailets/ToRepository.java

Modified: james/server/branches/merge_v2_and_trunk/src/java/org/apache/james/mailrepository/AvalonMailRepository.java
URL: http://svn.apache.org/viewcvs/james/server/branches/merge_v2_and_trunk/src/java/org/apache/james/mailrepository/AvalonMailRepository.java?rev=168022&r1=168021&r2=168022&view=diff
==============================================================================
--- james/server/branches/merge_v2_and_trunk/src/java/org/apache/james/mailrepository/AvalonMailRepository.java
(original)
+++ james/server/branches/merge_v2_and_trunk/src/java/org/apache/james/mailrepository/AvalonMailRepository.java
Tue May  3 16:43:14 2005
@@ -21,10 +21,9 @@
 import org.apache.avalon.cornerstone.services.store.Store;
 import org.apache.avalon.cornerstone.services.store.StreamRepository;
 import org.apache.avalon.framework.activity.Initializable;
-import org.apache.avalon.framework.component.Component;
-import org.apache.avalon.framework.component.ComponentException;
-import org.apache.avalon.framework.component.ComponentManager;
-import org.apache.avalon.framework.component.Composable;
+import org.apache.avalon.framework.service.ServiceException;
+import org.apache.avalon.framework.service.ServiceManager;
+import org.apache.avalon.framework.service.Serviceable;
 import org.apache.avalon.framework.configuration.Configurable;
 import org.apache.avalon.framework.configuration.Configuration;
 import org.apache.avalon.framework.configuration.ConfigurationException;
@@ -52,7 +51,7 @@
  */
 public class AvalonMailRepository
     extends AbstractLogEnabled
-    implements MailRepository, Component, Configurable, Composable, Initializable {
+    implements MailRepository, Configurable, Serviceable, Initializable {
 
     /**
      * Whether 'deep debugging' is turned on.
@@ -71,10 +70,10 @@
     private boolean cacheKeys; // experimental: for use with write mostly repositories such
as spam and error
 
     /**
-     * @see org.apache.avalon.framework.component.Composable#compose(ComponentManager)
+     * @see org.apache.avalon.framework.service.Serviceable#compose(ServiceManager )
      */
-    public void compose( final ComponentManager componentManager )
-            throws ComponentException {
+    public void service( final ServiceManager componentManager )
+            throws ServiceException {
         store = (Store)componentManager.
         lookup( "org.apache.avalon.cornerstone.services.store.Store" );
     }

Modified: james/server/branches/merge_v2_and_trunk/src/java/org/apache/james/mailrepository/JDBCMailRepository.java
URL: http://svn.apache.org/viewcvs/james/server/branches/merge_v2_and_trunk/src/java/org/apache/james/mailrepository/JDBCMailRepository.java?rev=168022&r1=168021&r2=168022&view=diff
==============================================================================
--- james/server/branches/merge_v2_and_trunk/src/java/org/apache/james/mailrepository/JDBCMailRepository.java
(original)
+++ james/server/branches/merge_v2_and_trunk/src/java/org/apache/james/mailrepository/JDBCMailRepository.java
Tue May  3 16:43:14 2005
@@ -22,10 +22,9 @@
 import org.apache.avalon.cornerstone.services.store.StreamRepository;
 import org.apache.avalon.excalibur.datasource.DataSourceComponent;
 import org.apache.avalon.framework.activity.Initializable;
-import org.apache.avalon.framework.component.Component;
-import org.apache.avalon.framework.component.ComponentException;
-import org.apache.avalon.framework.component.ComponentManager;
-import org.apache.avalon.framework.component.Composable;
+import org.apache.avalon.framework.service.Serviceable;
+import org.apache.avalon.framework.service.ServiceManager;
+import org.apache.avalon.framework.service.ServiceException;
 import org.apache.avalon.framework.configuration.Configurable;
 import org.apache.avalon.framework.configuration.Configuration;
 import org.apache.avalon.framework.configuration.ConfigurationException;
@@ -73,7 +72,7 @@
  */
 public class JDBCMailRepository
     extends AbstractLogEnabled
-    implements MailRepository, Component, Contextualizable, Composable, Configurable, Initializable
{
+    implements MailRepository, Contextualizable, Serviceable, Configurable, Initializable
{
 
     /**
      * Whether 'deep debugging' is turned on.
@@ -83,7 +82,7 @@
     /**
      * The Avalon componentManager used by the instance
      */
-    private ComponentManager componentManager;
+    private ServiceManager componentManager;
 
     /**
      * The Avalon context used by the instance
@@ -169,10 +168,10 @@
     }
 
     /**
-     * @see org.apache.avalon.framework.component.Composable#compose(ComponentManager)
+     * @see org.apache.avalon.framework.service.Servicable#service(ServiceManager)
      */
-    public void compose( final ComponentManager componentManager )
-        throws ComponentException {
+    public void service( final ServiceManager componentManager )
+        throws ServiceException {
         StringBuffer logBuffer = null;
         if (getLogger().isDebugEnabled()) {
             logBuffer =

Modified: james/server/branches/merge_v2_and_trunk/src/java/org/apache/james/mailrepository/MBoxMailRepository.java
URL: http://svn.apache.org/viewcvs/james/server/branches/merge_v2_and_trunk/src/java/org/apache/james/mailrepository/MBoxMailRepository.java?rev=168022&r1=168021&r2=168022&view=diff
==============================================================================
--- james/server/branches/merge_v2_and_trunk/src/java/org/apache/james/mailrepository/MBoxMailRepository.java
(original)
+++ james/server/branches/merge_v2_and_trunk/src/java/org/apache/james/mailrepository/MBoxMailRepository.java
Tue May  3 16:43:14 2005
@@ -1,5 +1,5 @@
 /***********************************************************************
- * Copyright (c) 2000-2004 The Apache Software Foundation.             *
+ * Copyright (c) 2000-2005 The Apache Software Foundation.             *
  * All rights reserved.                                                *
  * ------------------------------------------------------------------- *
  * Licensed under the Apache License, Version 2.0 (the "License"); you *
@@ -45,16 +45,12 @@
 package org.apache.james.mailrepository;
 
 import org.apache.avalon.framework.activity.Initializable;
-import org.apache.avalon.framework.component.Component;
-import org.apache.avalon.framework.component.ComponentException;
-import org.apache.avalon.framework.component.ComponentManager;
-import org.apache.avalon.framework.component.Composable;
+import org.apache.avalon.framework.service.ServiceException;
+import org.apache.avalon.framework.service.ServiceManager;
+import org.apache.avalon.framework.service.Serviceable;
 import org.apache.avalon.framework.configuration.Configurable;
 import org.apache.avalon.framework.configuration.Configuration;
 import org.apache.avalon.framework.configuration.ConfigurationException;
-import org.apache.avalon.framework.context.Context;
-import org.apache.avalon.framework.context.ContextException;
-import org.apache.avalon.framework.context.Contextualizable;
 import org.apache.avalon.framework.logger.AbstractLogEnabled;
 import org.apache.james.core.MailImpl;
 import org.apache.james.services.MailRepository;
@@ -105,7 +101,7 @@
 
 public class MBoxMailRepository
         extends AbstractLogEnabled
-            implements MailRepository, Component, Contextualizable, Composable, Configurable,
Initializable {
+            implements MailRepository, Serviceable, Configurable, Initializable {
 
 
     static final SimpleDateFormat dy = new SimpleDateFormat("EE MMM dd HH:mm:ss yyyy", Locale.US);
@@ -127,11 +123,6 @@
     private static final boolean DEEP_DEBUG = true;
 
     /**
-     * The Avalon context used by the instance
-     */
-    private Context context;
-
-    /**
      * The internal list of the emails
      * The key is an adapted MD5 checksum of the mail
      */
@@ -490,14 +481,6 @@
 
 
     /**
-     * @see org.apache.avalon.framework.context.Contextualizable#contextualize(org.apache.avalon.framework.context.Context)
-     */
-    public void contextualize(final Context context)
-            throws ContextException {
-        this.context = context;
-    }
-
-    /**
      * Store the given email in the current mbox file
      * @param mc The mail to store
      */
@@ -786,7 +769,11 @@
     }
 
 
-    public void compose(ComponentManager componentManager) throws ComponentException {
+    /**
+     * @see org.apache.avalon.framework.service.Serviceable#compose(ServiceManager )
+     */
+    public void service( final ServiceManager componentManager )
+            throws ServiceException {
     }
 
     /**

Modified: james/server/branches/merge_v2_and_trunk/src/java/org/apache/james/transport/mailets/AvalonListserv.java
URL: http://svn.apache.org/viewcvs/james/server/branches/merge_v2_and_trunk/src/java/org/apache/james/transport/mailets/AvalonListserv.java?rev=168022&r1=168021&r2=168022&view=diff
==============================================================================
--- james/server/branches/merge_v2_and_trunk/src/java/org/apache/james/transport/mailets/AvalonListserv.java
(original)
+++ james/server/branches/merge_v2_and_trunk/src/java/org/apache/james/transport/mailets/AvalonListserv.java
Tue May  3 16:43:14 2005
@@ -1,5 +1,5 @@
 /***********************************************************************
- * Copyright (c) 2000-2004 The Apache Software Foundation.             *
+ * Copyright (c) 2000-2005 The Apache Software Foundation.             *
  * All rights reserved.                                                *
  * ------------------------------------------------------------------- *
  * Licensed under the Apache License, Version 2.0 (the "License"); you *
@@ -17,8 +17,8 @@
 
 package org.apache.james.transport.mailets;
 
-import org.apache.avalon.framework.component.ComponentException;
-import org.apache.avalon.framework.component.ComponentManager;
+import org.apache.avalon.framework.service.ServiceException;
+import org.apache.avalon.framework.service.ServiceManager;
 import org.apache.james.Constants;
 import org.apache.james.services.UsersRepository;
 import org.apache.james.services.UsersStore;
@@ -123,13 +123,13 @@
             // Ignore any exceptions, default to true
         }
 
-        ComponentManager compMgr = (ComponentManager)getMailetContext().getAttribute(Constants.AVALON_COMPONENT_MANAGER);
+        ServiceManager compMgr = (ServiceManager)getMailetContext().getAttribute(Constants.AVALON_COMPONENT_MANAGER);
         try {
             UsersStore usersStore = (UsersStore)compMgr.lookup("org.apache.james.services.UsersStore");
             String repName = getInitParameter("repositoryName");
 
             members = (UsersRepository)usersStore.getRepository( repName );
-        } catch (ComponentException cnfe) {
+        } catch (ServiceException cnfe) {
             log("Failed to retrieve Store component:" + cnfe.getMessage());
         } catch (Exception e) {
             log("Failed to retrieve Store component:" + e.getMessage());

Modified: james/server/branches/merge_v2_and_trunk/src/java/org/apache/james/transport/mailets/AvalonListservManager.java
URL: http://svn.apache.org/viewcvs/james/server/branches/merge_v2_and_trunk/src/java/org/apache/james/transport/mailets/AvalonListservManager.java?rev=168022&r1=168021&r2=168022&view=diff
==============================================================================
--- james/server/branches/merge_v2_and_trunk/src/java/org/apache/james/transport/mailets/AvalonListservManager.java
(original)
+++ james/server/branches/merge_v2_and_trunk/src/java/org/apache/james/transport/mailets/AvalonListservManager.java
Tue May  3 16:43:14 2005
@@ -1,5 +1,5 @@
 /***********************************************************************
- * Copyright (c) 2000-2004 The Apache Software Foundation.             *
+ * Copyright (c) 2000-2005 The Apache Software Foundation.             *
  * All rights reserved.                                                *
  * ------------------------------------------------------------------- *
  * Licensed under the Apache License, Version 2.0 (the "License"); you *
@@ -17,8 +17,8 @@
 
 package org.apache.james.transport.mailets;
 
-import org.apache.avalon.framework.component.ComponentException;
-import org.apache.avalon.framework.component.ComponentManager;
+import org.apache.avalon.framework.service.ServiceException;
+import org.apache.avalon.framework.service.ServiceManager;
 import org.apache.james.Constants;
 import org.apache.james.services.UsersRepository;
 import org.apache.james.services.UsersStore;
@@ -42,13 +42,13 @@
      * Initialize the mailet
      */
     public void init() {
-        ComponentManager compMgr = (ComponentManager)getMailetContext().getAttribute(Constants.AVALON_COMPONENT_MANAGER);
+        ServiceManager compMgr = (ServiceManager)getMailetContext().getAttribute(Constants.AVALON_COMPONENT_MANAGER);
         try {
             UsersStore usersStore = (UsersStore) compMgr.lookup("org.apache.james.services.UsersStore");
             String repName = getInitParameter("repositoryName");
 
             members = (UsersRepository) usersStore.getRepository(repName);
-        } catch (ComponentException cnfe) {
+        } catch (ServiceException cnfe) {
             log("Failed to retrieve Store component:" + cnfe.getMessage());
         } catch (Exception e) {
             log("Failed to retrieve Store component:" + e.getMessage());

Modified: james/server/branches/merge_v2_and_trunk/src/java/org/apache/james/transport/mailets/CommandListservManager.java
URL: http://svn.apache.org/viewcvs/james/server/branches/merge_v2_and_trunk/src/java/org/apache/james/transport/mailets/CommandListservManager.java?rev=168022&r1=168021&r2=168022&view=diff
==============================================================================
--- james/server/branches/merge_v2_and_trunk/src/java/org/apache/james/transport/mailets/CommandListservManager.java
(original)
+++ james/server/branches/merge_v2_and_trunk/src/java/org/apache/james/transport/mailets/CommandListservManager.java
Tue May  3 16:43:14 2005
@@ -1,5 +1,5 @@
 /***********************************************************************
- * Copyright (c) 2000-2004 The Apache Software Foundation.             *
+ * Copyright (c) 2000-2005 The Apache Software Foundation.             *
  * All rights reserved.                                                *
  * ------------------------------------------------------------------- *
  * Licensed under the Apache License, Version 2.0 (the "License"); you *
@@ -17,7 +17,7 @@
 
 package org.apache.james.transport.mailets;
 
-import org.apache.avalon.framework.component.ComponentManager;
+import org.apache.avalon.framework.service.ServiceManager;
 import org.apache.avalon.framework.configuration.Configuration;
 import org.apache.avalon.framework.configuration.ConfigurationException;
 import org.apache.james.Constants;
@@ -322,7 +322,7 @@
      * Fetch the repository of users
      */
     protected void initUsersRepository() {
-        ComponentManager compMgr = (ComponentManager) getMailetContext().getAttribute(Constants.AVALON_COMPONENT_MANAGER);
+        ServiceManager compMgr = (ServiceManager) getMailetContext().getAttribute(Constants.AVALON_COMPONENT_MANAGER);
         try {
             UsersStore usersStore = (UsersStore) compMgr.lookup("org.apache.james.services.UsersStore");
             String repName = getInitParameter("repositoryName");

Modified: james/server/branches/merge_v2_and_trunk/src/java/org/apache/james/transport/mailets/CommandListservProcessor.java
URL: http://svn.apache.org/viewcvs/james/server/branches/merge_v2_and_trunk/src/java/org/apache/james/transport/mailets/CommandListservProcessor.java?rev=168022&r1=168021&r2=168022&view=diff
==============================================================================
--- james/server/branches/merge_v2_and_trunk/src/java/org/apache/james/transport/mailets/CommandListservProcessor.java
(original)
+++ james/server/branches/merge_v2_and_trunk/src/java/org/apache/james/transport/mailets/CommandListservProcessor.java
Tue May  3 16:43:14 2005
@@ -17,7 +17,7 @@
 
 package org.apache.james.transport.mailets;
 
-import org.apache.avalon.framework.component.ComponentManager;
+import org.apache.avalon.framework.service.ServiceManager;
 import org.apache.avalon.framework.configuration.Configuration;
 import org.apache.james.Constants;
 import org.apache.james.services.UsersRepository;
@@ -404,7 +404,7 @@
      * Fetch the repository of users
      */
     protected void initUsersRepository() throws Exception {
-        ComponentManager compMgr = (ComponentManager) getMailetContext().getAttribute(Constants.AVALON_COMPONENT_MANAGER);
+        ServiceManager compMgr = (ServiceManager) getMailetContext().getAttribute(Constants.AVALON_COMPONENT_MANAGER);
         UsersStore usersStore = (UsersStore) compMgr.lookup("org.apache.james.services.UsersStore");
         String repName = getInitParameter("repositoryName");
 

Modified: james/server/branches/merge_v2_and_trunk/src/java/org/apache/james/transport/mailets/FromRepository.java
URL: http://svn.apache.org/viewcvs/james/server/branches/merge_v2_and_trunk/src/java/org/apache/james/transport/mailets/FromRepository.java?rev=168022&r1=168021&r2=168022&view=diff
==============================================================================
--- james/server/branches/merge_v2_and_trunk/src/java/org/apache/james/transport/mailets/FromRepository.java
(original)
+++ james/server/branches/merge_v2_and_trunk/src/java/org/apache/james/transport/mailets/FromRepository.java
Tue May  3 16:43:14 2005
@@ -17,8 +17,8 @@
 
 package org.apache.james.transport.mailets;
 
-import org.apache.avalon.framework.component.ComponentException;
-import org.apache.avalon.framework.component.ComponentManager;
+import org.apache.avalon.framework.service.ServiceException;
+import org.apache.avalon.framework.service.ServiceManager;
 import org.apache.avalon.framework.configuration.DefaultConfiguration;
 import org.apache.james.Constants;
 import org.apache.james.core.MailImpl;
@@ -78,7 +78,7 @@
             // Ignore exception, default to false
         }
 
-        ComponentManager compMgr = (ComponentManager)getMailetContext().getAttribute(Constants.AVALON_COMPONENT_MANAGER);
+        ServiceManager compMgr = (ServiceManager)getMailetContext().getAttribute(Constants.AVALON_COMPONENT_MANAGER);
         try {
             MailStore mailstore = (MailStore) compMgr.lookup("org.apache.james.services.MailStore");
             DefaultConfiguration mailConf
@@ -86,7 +86,7 @@
             mailConf.setAttribute("destinationURL", repositoryPath);
             mailConf.setAttribute("type", "MAIL");
             repository = (MailRepository) mailstore.select(mailConf);
-        } catch (ComponentException cnfe) {
+        } catch (ServiceException cnfe) {
             log("Failed to retrieve Store component:" + cnfe.getMessage());
         } catch (Exception e) {
             log("Failed to retrieve Store component:" + e.getMessage());

Modified: james/server/branches/merge_v2_and_trunk/src/java/org/apache/james/transport/mailets/JDBCAlias.java
URL: http://svn.apache.org/viewcvs/james/server/branches/merge_v2_and_trunk/src/java/org/apache/james/transport/mailets/JDBCAlias.java?rev=168022&r1=168021&r2=168022&view=diff
==============================================================================
--- james/server/branches/merge_v2_and_trunk/src/java/org/apache/james/transport/mailets/JDBCAlias.java
(original)
+++ james/server/branches/merge_v2_and_trunk/src/java/org/apache/james/transport/mailets/JDBCAlias.java
Tue May  3 16:43:14 2005
@@ -1,5 +1,5 @@
 /***********************************************************************
- * Copyright (c) 2000-2004 The Apache Software Foundation.             *
+ * Copyright (c) 2000-2005 The Apache Software Foundation.             *
  * All rights reserved.                                                *
  * ------------------------------------------------------------------- *
  * Licensed under the Apache License, Version 2.0 (the "License"); you *
@@ -19,7 +19,7 @@
 
 import org.apache.avalon.cornerstone.services.datasources.DataSourceSelector;
 import org.apache.avalon.excalibur.datasource.DataSourceComponent;
-import org.apache.avalon.framework.component.ComponentManager;
+import org.apache.avalon.framework.service.ServiceManager;
 import org.apache.james.Constants;
 import org.apache.james.util.JDBCUtil;
 import org.apache.mailet.GenericMailet;
@@ -79,7 +79,7 @@
             throw new MailetException("target_column not specified for JDBCAlias");
         }
         try {
-            ComponentManager componentManager = (ComponentManager)getMailetContext().getAttribute(Constants.AVALON_COMPONENT_MANAGER);
+            ServiceManager componentManager = (ServiceManager)getMailetContext().getAttribute(Constants.AVALON_COMPONENT_MANAGER);
             // Get the DataSourceSelector service
             DataSourceSelector datasources = (DataSourceSelector)componentManager.lookup(DataSourceSelector.ROLE);
             // Get the data-source required.

Modified: james/server/branches/merge_v2_and_trunk/src/java/org/apache/james/transport/mailets/JDBCListserv.java
URL: http://svn.apache.org/viewcvs/james/server/branches/merge_v2_and_trunk/src/java/org/apache/james/transport/mailets/JDBCListserv.java?rev=168022&r1=168021&r2=168022&view=diff
==============================================================================
--- james/server/branches/merge_v2_and_trunk/src/java/org/apache/james/transport/mailets/JDBCListserv.java
(original)
+++ james/server/branches/merge_v2_and_trunk/src/java/org/apache/james/transport/mailets/JDBCListserv.java
Tue May  3 16:43:14 2005
@@ -1,5 +1,5 @@
 /***********************************************************************
- * Copyright (c) 2000-2004 The Apache Software Foundation.             *
+ * Copyright (c) 2000-2005 The Apache Software Foundation.             *
  * All rights reserved.                                                *
  * ------------------------------------------------------------------- *
  * Licensed under the Apache License, Version 2.0 (the "License"); you *
@@ -19,7 +19,7 @@
 
 import org.apache.avalon.cornerstone.services.datasources.DataSourceSelector;
 import org.apache.avalon.excalibur.datasource.DataSourceComponent;
-import org.apache.avalon.framework.component.ComponentManager;
+import org.apache.avalon.framework.service.ServiceManager;
 import org.apache.james.Constants;
 import org.apache.james.util.JDBCUtil;
 import org.apache.mailet.MailAddress;
@@ -112,7 +112,7 @@
         Connection conn = null;
 
         try {
-            ComponentManager componentManager = (ComponentManager)getMailetContext().getAttribute(Constants.AVALON_COMPONENT_MANAGER);
+            ServiceManager componentManager = (ServiceManager)getMailetContext().getAttribute(Constants.AVALON_COMPONENT_MANAGER);
             // Get the DataSourceSelector service
             DataSourceSelector datasources = (DataSourceSelector)componentManager.lookup(DataSourceSelector.ROLE);
             // Get the data-source required.

Modified: james/server/branches/merge_v2_and_trunk/src/java/org/apache/james/transport/mailets/JDBCVirtualUserTable.java
URL: http://svn.apache.org/viewcvs/james/server/branches/merge_v2_and_trunk/src/java/org/apache/james/transport/mailets/JDBCVirtualUserTable.java?rev=168022&r1=168021&r2=168022&view=diff
==============================================================================
--- james/server/branches/merge_v2_and_trunk/src/java/org/apache/james/transport/mailets/JDBCVirtualUserTable.java
(original)
+++ james/server/branches/merge_v2_and_trunk/src/java/org/apache/james/transport/mailets/JDBCVirtualUserTable.java
Tue May  3 16:43:14 2005
@@ -1,5 +1,5 @@
 /***********************************************************************
- * Copyright (c) 2000-2004 The Apache Software Foundation.             *
+ * Copyright (c) 2000-2005 The Apache Software Foundation.             *
  * All rights reserved.                                                *
  * ------------------------------------------------------------------- *
  * Licensed under the Apache License, Version 2.0 (the "License"); you *
@@ -19,7 +19,7 @@
 
 import org.apache.avalon.cornerstone.services.datasources.DataSourceSelector;
 import org.apache.avalon.excalibur.datasource.DataSourceComponent;
-import org.apache.avalon.framework.component.ComponentManager;
+import org.apache.avalon.framework.service.ServiceManager;
 import org.apache.james.Constants;
 import org.apache.james.util.JDBCUtil;
 import org.apache.mailet.MailAddress;
@@ -122,7 +122,7 @@
         Connection conn = null;
 
         try {
-            ComponentManager componentManager = (ComponentManager)getMailetContext().getAttribute(Constants.AVALON_COMPONENT_MANAGER);
+            ServiceManager componentManager = (ServiceManager)getMailetContext().getAttribute(Constants.AVALON_COMPONENT_MANAGER);
             // Get the DataSourceSelector service
             DataSourceSelector datasources = (DataSourceSelector)componentManager.lookup(DataSourceSelector.ROLE);
             // Get the data-source required.

Modified: james/server/branches/merge_v2_and_trunk/src/java/org/apache/james/transport/mailets/RemoteDelivery.java
URL: http://svn.apache.org/viewcvs/james/server/branches/merge_v2_and_trunk/src/java/org/apache/james/transport/mailets/RemoteDelivery.java?rev=168022&r1=168021&r2=168022&view=diff
==============================================================================
--- james/server/branches/merge_v2_and_trunk/src/java/org/apache/james/transport/mailets/RemoteDelivery.java
(original)
+++ james/server/branches/merge_v2_and_trunk/src/java/org/apache/james/transport/mailets/RemoteDelivery.java
Tue May  3 16:43:14 2005
@@ -1,5 +1,5 @@
 /***********************************************************************
- * Copyright (c) 2000-2004 The Apache Software Foundation.             *
+ * Copyright (c) 2000-2005 The Apache Software Foundation.             *
  * All rights reserved.                                                *
  * ------------------------------------------------------------------- *
  * Licensed under the Apache License, Version 2.0 (the "License"); you *
@@ -46,8 +46,8 @@
 import javax.mail.internet.MimeMessage;
 import javax.mail.internet.ParseException;
 
-import org.apache.avalon.framework.component.ComponentException;
-import org.apache.avalon.framework.component.ComponentManager;
+import org.apache.avalon.framework.service.ServiceException;
+import org.apache.avalon.framework.service.ServiceManager;
 import org.apache.avalon.framework.configuration.DefaultConfiguration;
 import org.apache.james.Constants;
 import org.apache.james.core.MailImpl;
@@ -301,7 +301,7 @@
             }
         }
 
-        ComponentManager compMgr = (ComponentManager)getMailetContext().getAttribute(Constants.AVALON_COMPONENT_MANAGER);
+        ServiceManager compMgr = (ServiceManager)getMailetContext().getAttribute(Constants.AVALON_COMPONENT_MANAGER);
         String outgoingPath = getInitParameter("outgoing");
         if (outgoingPath == null) {
             outgoingPath = "file:///../var/mail/outgoing";
@@ -316,7 +316,7 @@
             spoolConf.setAttribute("destinationURL", outgoingPath);
             spoolConf.setAttribute("type", "SPOOL");
             outgoing = (SpoolRepository) mailstore.select(spoolConf);
-        } catch (ComponentException cnfe) {
+        } catch (ServiceException cnfe) {
             log("Failed to retrieve Store component:" + cnfe.getMessage());
         } catch (Exception e) {
             log("Failed to retrieve Store component:" + e.getMessage());

Modified: james/server/branches/merge_v2_and_trunk/src/java/org/apache/james/transport/mailets/ToRepository.java
URL: http://svn.apache.org/viewcvs/james/server/branches/merge_v2_and_trunk/src/java/org/apache/james/transport/mailets/ToRepository.java?rev=168022&r1=168021&r2=168022&view=diff
==============================================================================
--- james/server/branches/merge_v2_and_trunk/src/java/org/apache/james/transport/mailets/ToRepository.java
(original)
+++ james/server/branches/merge_v2_and_trunk/src/java/org/apache/james/transport/mailets/ToRepository.java
Tue May  3 16:43:14 2005
@@ -1,5 +1,5 @@
 /***********************************************************************
- * Copyright (c) 1999-2004 The Apache Software Foundation.             *
+ * Copyright (c) 1999-2005 The Apache Software Foundation.             *
  * All rights reserved.                                                *
  * ------------------------------------------------------------------- *
  * Licensed under the Apache License, Version 2.0 (the "License"); you *
@@ -17,8 +17,8 @@
 
 package org.apache.james.transport.mailets;
 
-import org.apache.avalon.framework.component.ComponentException;
-import org.apache.avalon.framework.component.ComponentManager;
+import org.apache.avalon.framework.service.ServiceException;
+import org.apache.avalon.framework.service.ServiceManager;
 import org.apache.avalon.framework.configuration.DefaultConfiguration;
 import org.apache.james.Constants;
 import org.apache.james.core.MailImpl;
@@ -64,7 +64,7 @@
             // Ignore exception, default to false
         }
 
-        ComponentManager compMgr = (ComponentManager)getMailetContext().getAttribute(Constants.AVALON_COMPONENT_MANAGER);
+        ServiceManager compMgr = (ServiceManager)getMailetContext().getAttribute(Constants.AVALON_COMPONENT_MANAGER);
         try {
             MailStore mailstore = (MailStore) compMgr.lookup("org.apache.james.services.MailStore");
             DefaultConfiguration mailConf
@@ -73,7 +73,7 @@
             mailConf.setAttribute("type", "MAIL");
             mailConf.setAttribute("CACHEKEYS", getInitParameter("CACHEKEYS") == null ? "TRUE"
: getInitParameter("CACHEKEYS"));
             repository = (MailRepository) mailstore.select(mailConf);
-        } catch (ComponentException cnfe) {
+        } catch (ServiceException cnfe) {
             log("Failed to retrieve Store component:" + cnfe.getMessage());
         } catch (Exception e) {
             log("Failed to retrieve Store component:" + e.getMessage());



---------------------------------------------------------------------
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