james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nor...@apache.org
Subject svn commit: r1142444 - in /james/server/trunk: ./ container-spring/ container-spring/src/main/java/org/apache/james/container/spring/bean/ container-spring/src/main/java/org/apache/james/container/spring/bean/factorypostprocessor/ container-spring/src/...
Date Sun, 03 Jul 2011 14:20:53 GMT
Author: norman
Date: Sun Jul  3 14:20:51 2011
New Revision: 1142444

URL: http://svn.apache.org/viewvc?rev=1142444&view=rev
Log:
create an extra module which is called lifecycle-spring. This also act as fragment bundle
and takes care of adding the lifecycle BeanPostProcessors to the context. 

Added:
    james/server/trunk/lifecycle-spring/   (with props)
    james/server/trunk/lifecycle-spring/pom.xml
    james/server/trunk/lifecycle-spring/src/
    james/server/trunk/lifecycle-spring/src/main/
    james/server/trunk/lifecycle-spring/src/main/java/
    james/server/trunk/lifecycle-spring/src/main/java/org/
    james/server/trunk/lifecycle-spring/src/main/java/org/apache/
    james/server/trunk/lifecycle-spring/src/main/java/org/apache/james/
    james/server/trunk/lifecycle-spring/src/main/java/org/apache/james/container/
    james/server/trunk/lifecycle-spring/src/main/java/org/apache/james/container/spring/
    james/server/trunk/lifecycle-spring/src/main/java/org/apache/james/container/spring/lifecycle/
    james/server/trunk/lifecycle-spring/src/main/java/org/apache/james/container/spring/lifecycle/AbstractLifecycleBeanPostProcessor.java
      - copied, changed from r1141183, james/server/trunk/container-spring/src/main/java/org/apache/james/container/spring/bean/AbstractLifecycleBeanPostProcessor.java
    james/server/trunk/lifecycle-spring/src/main/java/org/apache/james/container/spring/lifecycle/ConfigurableBeanPostProcessor.java
      - copied, changed from r1141183, james/server/trunk/container-spring/src/main/java/org/apache/james/container/spring/bean/postprocessor/ConfigurableBeanPostProcessor.java
    james/server/trunk/lifecycle-spring/src/main/java/org/apache/james/container/spring/lifecycle/ConfigurationProvider.java
      - copied, changed from r1141183, james/server/trunk/container-spring/src/main/java/org/apache/james/container/spring/provider/configuration/ConfigurationProvider.java
    james/server/trunk/lifecycle-spring/src/main/java/org/apache/james/container/spring/lifecycle/ConfigurationProviderImpl.java
      - copied, changed from r1141183, james/server/trunk/container-spring/src/main/java/org/apache/james/container/spring/provider/configuration/ConfigurationProviderImpl.java
    james/server/trunk/lifecycle-spring/src/main/java/org/apache/james/container/spring/lifecycle/LogEnabledBeanPostProcessor.java
      - copied, changed from r1141183, james/server/trunk/container-spring/src/main/java/org/apache/james/container/spring/bean/postprocessor/LogEnabledBeanPostProcessor.java
    james/server/trunk/lifecycle-spring/src/main/java/org/apache/james/container/spring/lifecycle/LogProvider.java
      - copied, changed from r1141183, james/server/trunk/container-spring/src/main/java/org/apache/james/container/spring/provider/log/LogProvider.java
    james/server/trunk/lifecycle-spring/src/main/java/org/apache/james/container/spring/lifecycle/LogProviderImpl.java
      - copied, changed from r1141183, james/server/trunk/container-spring/src/main/java/org/apache/james/container/spring/provider/log/LogProviderImpl.java
    james/server/trunk/lifecycle-spring/src/main/java/org/apache/james/container/spring/lifecycle/LogProviderManagementMBean.java
      - copied, changed from r1141183, james/server/trunk/container-spring/src/main/java/org/apache/james/container/spring/provider/log/LogProviderManagementMBean.java
    james/server/trunk/lifecycle-spring/src/main/java/org/apache/james/container/spring/lifecycle/osgi/
      - copied from r1142304, james/server/trunk/container-spring/src/main/java/org/apache/james/container/spring/osgi/
    james/server/trunk/lifecycle-spring/src/main/java/org/apache/james/container/spring/lifecycle/osgi/OsgiLifecycleBeanFactoryPostProcessor.java
      - copied, changed from r1142431, james/server/trunk/container-spring/src/main/java/org/apache/james/container/spring/osgi/OsgiLifecycleBeanFactoryPostProcessor.java
    james/server/trunk/lifecycle-spring/src/main/resources/
    james/server/trunk/lifecycle-spring/src/main/resources/META-INF/
    james/server/trunk/lifecycle-spring/src/main/resources/META-INF/spring/
    james/server/trunk/lifecycle-spring/src/main/resources/META-INF/spring/extender/
    james/server/trunk/lifecycle-spring/src/main/resources/META-INF/spring/extender/lifecycle-extender.xml
      - copied, changed from r1142431, james/server/trunk/container-spring/src/main/resources/META-INF/spring/extender/james-extender.xml
Removed:
    james/server/trunk/container-spring/src/main/java/org/apache/james/container/spring/bean/AbstractLifecycleBeanPostProcessor.java
    james/server/trunk/container-spring/src/main/java/org/apache/james/container/spring/bean/postprocessor/ConfigurableBeanPostProcessor.java
    james/server/trunk/container-spring/src/main/java/org/apache/james/container/spring/bean/postprocessor/LogEnabledBeanPostProcessor.java
    james/server/trunk/container-spring/src/main/java/org/apache/james/container/spring/osgi/OSGIConfigurationProvider.java
    james/server/trunk/container-spring/src/main/java/org/apache/james/container/spring/osgi/OsgiLifecycleBeanFactoryPostProcessor.java
    james/server/trunk/container-spring/src/main/java/org/apache/james/container/spring/provider/configuration/ConfigurationProvider.java
    james/server/trunk/container-spring/src/main/java/org/apache/james/container/spring/provider/configuration/ConfigurationProviderImpl.java
    james/server/trunk/container-spring/src/main/java/org/apache/james/container/spring/provider/log/LogProvider.java
    james/server/trunk/container-spring/src/main/java/org/apache/james/container/spring/provider/log/LogProviderImpl.java
    james/server/trunk/container-spring/src/main/java/org/apache/james/container/spring/provider/log/LogProviderManagementMBean.java
    james/server/trunk/container-spring/src/main/resources/META-INF/spring/extender/james-extender.xml
    james/server/trunk/lifecycle-spring/src/main/java/org/apache/james/container/spring/lifecycle/osgi/AbstractServiceTracker.java
    james/server/trunk/lifecycle-spring/src/main/java/org/apache/james/container/spring/lifecycle/osgi/DomainListTracker.java
    james/server/trunk/lifecycle-spring/src/main/java/org/apache/james/container/spring/lifecycle/osgi/RecipientRewriteTableTracker.java
    james/server/trunk/lifecycle-spring/src/main/java/org/apache/james/container/spring/lifecycle/osgi/UsersRepositoryTracker.java
Modified:
    james/server/trunk/container-spring/pom.xml
    james/server/trunk/container-spring/src/main/java/org/apache/james/container/spring/bean/factorypostprocessor/ConfigurationBeanFactoryPostProcessor.java
    james/server/trunk/container-spring/src/main/java/org/apache/james/container/spring/bean/factorypostprocessor/MailboxConfigurationBeanFactoryPostProcessor.java
    james/server/trunk/container-spring/src/main/java/org/apache/james/container/spring/osgi/AbstractServiceTracker.java
    james/server/trunk/container-spring/src/main/resources/META-INF/spring/loaders-context.xml
    james/server/trunk/container-spring/src/main/resources/org/apache/james/container/spring/server-context.xml
    james/server/trunk/dnsservice-dnsjava/src/main/resources/META-INF/spring/dns-context.xml
    james/server/trunk/lifecycle-spring/src/main/java/org/apache/james/container/spring/lifecycle/osgi/OSGIConfigurationProvider.java
    james/server/trunk/pom.xml

Modified: james/server/trunk/container-spring/pom.xml
URL: http://svn.apache.org/viewvc/james/server/trunk/container-spring/pom.xml?rev=1142444&r1=1142443&r2=1142444&view=diff
==============================================================================
--- james/server/trunk/container-spring/pom.xml (original)
+++ james/server/trunk/container-spring/pom.xml Sun Jul  3 14:20:51 2011
@@ -84,6 +84,11 @@
   <dependencies>
     <dependency>
       <groupId>org.apache.james</groupId>
+      <artifactId>james-server-lifecycle-spring</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.james</groupId>
       <artifactId>james-server-lifecycle-api</artifactId>
     </dependency>
     <dependency>

Modified: james/server/trunk/container-spring/src/main/java/org/apache/james/container/spring/bean/factorypostprocessor/ConfigurationBeanFactoryPostProcessor.java
URL: http://svn.apache.org/viewvc/james/server/trunk/container-spring/src/main/java/org/apache/james/container/spring/bean/factorypostprocessor/ConfigurationBeanFactoryPostProcessor.java?rev=1142444&r1=1142443&r2=1142444&view=diff
==============================================================================
--- james/server/trunk/container-spring/src/main/java/org/apache/james/container/spring/bean/factorypostprocessor/ConfigurationBeanFactoryPostProcessor.java
(original)
+++ james/server/trunk/container-spring/src/main/java/org/apache/james/container/spring/bean/factorypostprocessor/ConfigurationBeanFactoryPostProcessor.java
Sun Jul  3 14:20:51 2011
@@ -23,7 +23,7 @@ import java.util.Map;
 
 import org.apache.commons.configuration.ConfigurationException;
 import org.apache.commons.configuration.HierarchicalConfiguration;
-import org.apache.james.container.spring.provider.configuration.ConfigurationProvider;
+import org.apache.james.container.spring.lifecycle.ConfigurationProvider;
 import org.springframework.beans.BeansException;
 import org.springframework.beans.FatalBeanException;
 import org.springframework.beans.factory.config.BeanDefinition;

Modified: james/server/trunk/container-spring/src/main/java/org/apache/james/container/spring/bean/factorypostprocessor/MailboxConfigurationBeanFactoryPostProcessor.java
URL: http://svn.apache.org/viewvc/james/server/trunk/container-spring/src/main/java/org/apache/james/container/spring/bean/factorypostprocessor/MailboxConfigurationBeanFactoryPostProcessor.java?rev=1142444&r1=1142443&r2=1142444&view=diff
==============================================================================
--- james/server/trunk/container-spring/src/main/java/org/apache/james/container/spring/bean/factorypostprocessor/MailboxConfigurationBeanFactoryPostProcessor.java
(original)
+++ james/server/trunk/container-spring/src/main/java/org/apache/james/container/spring/bean/factorypostprocessor/MailboxConfigurationBeanFactoryPostProcessor.java
Sun Jul  3 14:20:51 2011
@@ -21,7 +21,7 @@ package org.apache.james.container.sprin
 
 import org.apache.commons.configuration.ConfigurationException;
 import org.apache.commons.configuration.HierarchicalConfiguration;
-import org.apache.james.container.spring.provider.configuration.ConfigurationProvider;
+import org.apache.james.container.spring.lifecycle.ConfigurationProvider;
 import org.springframework.beans.BeansException;
 import org.springframework.beans.FatalBeanException;
 import org.springframework.beans.factory.config.BeanFactoryPostProcessor;

Modified: james/server/trunk/container-spring/src/main/java/org/apache/james/container/spring/osgi/AbstractServiceTracker.java
URL: http://svn.apache.org/viewvc/james/server/trunk/container-spring/src/main/java/org/apache/james/container/spring/osgi/AbstractServiceTracker.java?rev=1142444&r1=1142443&r2=1142444&view=diff
==============================================================================
--- james/server/trunk/container-spring/src/main/java/org/apache/james/container/spring/osgi/AbstractServiceTracker.java
(original)
+++ james/server/trunk/container-spring/src/main/java/org/apache/james/container/spring/osgi/AbstractServiceTracker.java
Sun Jul  3 14:20:51 2011
@@ -23,7 +23,7 @@ import java.util.Enumeration;
 import java.util.Properties;
 
 import org.apache.commons.configuration.HierarchicalConfiguration;
-import org.apache.james.container.spring.provider.configuration.ConfigurationProvider;
+import org.apache.james.container.spring.lifecycle.ConfigurationProvider;
 import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.BundleEvent;

Modified: james/server/trunk/container-spring/src/main/resources/META-INF/spring/loaders-context.xml
URL: http://svn.apache.org/viewvc/james/server/trunk/container-spring/src/main/resources/META-INF/spring/loaders-context.xml?rev=1142444&r1=1142443&r2=1142444&view=diff
==============================================================================
--- james/server/trunk/container-spring/src/main/resources/META-INF/spring/loaders-context.xml
(original)
+++ james/server/trunk/container-spring/src/main/resources/META-INF/spring/loaders-context.xml
Sun Jul  3 14:20:51 2011
@@ -22,10 +22,9 @@
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:camel="http://camel.apache.org/schema/spring"
        xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
-   
-    <!-- Import PostBeanProcessors -->
-    <import resource="classpath*:org/apache/james/container/spring/server-context.xml"/>
-    
+
+    <bean id="configurationprovider" class="org.apache.james.container.spring.lifecycle.osgi.OSGIConfigurationProvider"/>
+
     <!-- Register the service trackers -->
     <bean id="usersrepositoryTracker" class="org.apache.james.container.spring.osgi.UsersRepositoryTracker"/>
     <bean id="domainlistTracker" class="org.apache.james.container.spring.osgi.DomainListTracker"/>

Modified: james/server/trunk/container-spring/src/main/resources/org/apache/james/container/spring/server-context.xml
URL: http://svn.apache.org/viewvc/james/server/trunk/container-spring/src/main/resources/org/apache/james/container/spring/server-context.xml?rev=1142444&r1=1142443&r2=1142444&view=diff
==============================================================================
--- james/server/trunk/container-spring/src/main/resources/org/apache/james/container/spring/server-context.xml
(original)
+++ james/server/trunk/container-spring/src/main/resources/org/apache/james/container/spring/server-context.xml
Sun Jul  3 14:20:51 2011
@@ -52,7 +52,7 @@
         <property name="configurationProvider" ref="configurationprovider" />
         <property name="order" value="1" />
     </bean>
-    <bean id="configurationprovider" class="org.apache.james.container.spring.provider.configuration.ConfigurationProviderImpl">
+    <bean id="configurationprovider" class="org.apache.james.container.spring.osgi.OSGIConfigurationProvider">
     <!--  
         <property name="configurationMappings">
             <map>

Modified: james/server/trunk/dnsservice-dnsjava/src/main/resources/META-INF/spring/dns-context.xml
URL: http://svn.apache.org/viewvc/james/server/trunk/dnsservice-dnsjava/src/main/resources/META-INF/spring/dns-context.xml?rev=1142444&r1=1142443&r2=1142444&view=diff
==============================================================================
--- james/server/trunk/dnsservice-dnsjava/src/main/resources/META-INF/spring/dns-context.xml
(original)
+++ james/server/trunk/dnsservice-dnsjava/src/main/resources/META-INF/spring/dns-context.xml
Sun Jul  3 14:20:51 2011
@@ -21,8 +21,9 @@
        xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
   
     <!-- Import PostBeanProcessors -->
+    <!--  
     <import resource="classpath*:org/apache/james/container/spring/server-context.xml"/>
-    
+    -->
     <bean id="dnsservice" class="org.apache.james.dnsservice.dnsjava.DNSJavaService" />
 
 </beans>

Propchange: james/server/trunk/lifecycle-spring/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Sun Jul  3 14:20:51 2011
@@ -0,0 +1 @@
+target

Added: james/server/trunk/lifecycle-spring/pom.xml
URL: http://svn.apache.org/viewvc/james/server/trunk/lifecycle-spring/pom.xml?rev=1142444&view=auto
==============================================================================
--- james/server/trunk/lifecycle-spring/pom.xml (added)
+++ james/server/trunk/lifecycle-spring/pom.xml Sun Jul  3 14:20:51 2011
@@ -0,0 +1,133 @@
+<?xml version="1.0" encoding="ISO-8859-15"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.    
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <parent>
+    <artifactId>james-server</artifactId>
+    <groupId>org.apache.james</groupId>
+    <version>3.0-beta2-SNAPSHOT</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.apache.james</groupId>
+  <artifactId>james-server-lifecycle-spring</artifactId>
+  <name>Apache James Server Lifecycle Spring</name>
+  <properties>
+      <!-- OSGI stuff -->
+    <james.osgi.export>
+      !org.apache.james.container.spring.resource.*,
+      !org.apache.james.container.spring.context.*,
+      org.apache.james.*
+    </james.osgi.export>
+    <!-- exclude spring web support and commons-daemon for now -->
+    <james.osgi.import>
+      *
+      !org.apache.commons.daemon.*,
+      !org.apache.james.mailbox.copier.*,
+      !org.springframework.web.*,
+    </james.osgi.import>
+    <james.osgi.dynamic>
+      *
+    </james.osgi.dynamic>
+  </properties> 
+
+
+  <build>
+    <plugins>
+      <!-- use version 2.4 of the plugin. This is needed as workaround for
+           http://jira.codehaus.org/browse/MAPPASM-96 -->
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-deploy-plugin</artifactId>
+        <version>2.4</version>
+      </plugin>
+      
+      <plugin>
+        <artifactId>maven-jar-plugin</artifactId>
+         <configuration>       
+           <archive>
+            <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>

+            <manifest>
+              <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
+              <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
+            </manifest>
+            <manifestEntries>
+              <Fragment-Host>org.springframework.osgi.extender</Fragment-Host>
+            </manifestEntries>
+          </archive>
+        </configuration>       
+        <executions>
+          <execution>
+            <goals>
+              <goal>jar</goal>
+              <goal>test-jar</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+      
+  </build>
+  
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.james</groupId>
+      <artifactId>james-server-lifecycle-api</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.james</groupId>
+      <artifactId>james-server-filesystem-api</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.james</groupId>
+      <artifactId>james-server-data-api</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-core</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-beans</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-context</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework.osgi</groupId>
+      <artifactId>spring-osgi-extender</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.osgi</groupId>
+      <artifactId>org.osgi.core</artifactId>
+    </dependency>
+     <dependency>
+      <groupId>commons-configuration</groupId>
+      <artifactId>commons-configuration</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-api</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>log4j</groupId>
+      <artifactId>log4j</artifactId>
+    </dependency>
+  </dependencies>
+</project>

Copied: james/server/trunk/lifecycle-spring/src/main/java/org/apache/james/container/spring/lifecycle/AbstractLifecycleBeanPostProcessor.java
(from r1141183, james/server/trunk/container-spring/src/main/java/org/apache/james/container/spring/bean/AbstractLifecycleBeanPostProcessor.java)
URL: http://svn.apache.org/viewvc/james/server/trunk/lifecycle-spring/src/main/java/org/apache/james/container/spring/lifecycle/AbstractLifecycleBeanPostProcessor.java?p2=james/server/trunk/lifecycle-spring/src/main/java/org/apache/james/container/spring/lifecycle/AbstractLifecycleBeanPostProcessor.java&p1=james/server/trunk/container-spring/src/main/java/org/apache/james/container/spring/bean/AbstractLifecycleBeanPostProcessor.java&r1=1141183&r2=1142444&rev=1142444&view=diff
==============================================================================
--- james/server/trunk/container-spring/src/main/java/org/apache/james/container/spring/bean/AbstractLifecycleBeanPostProcessor.java
(original)
+++ james/server/trunk/lifecycle-spring/src/main/java/org/apache/james/container/spring/lifecycle/AbstractLifecycleBeanPostProcessor.java
Sun Jul  3 14:20:51 2011
@@ -16,10 +16,13 @@
  * specific language governing permissions and limitations      *
  * under the License.                                           *
  ****************************************************************/
-package org.apache.james.container.spring.bean;
+package org.apache.james.container.spring.lifecycle;
 
 import org.springframework.beans.BeansException;
 import org.springframework.beans.FatalBeanException;
+import org.springframework.beans.factory.BeanFactory;
+import org.springframework.beans.factory.BeanFactoryAware;
+import org.springframework.beans.factory.ListableBeanFactory;
 import org.springframework.beans.factory.config.BeanPostProcessor;
 import org.springframework.core.Ordered;
 import org.springframework.core.PriorityOrdered;
@@ -30,9 +33,15 @@ import org.springframework.core.Priority
  * 
  * @param <T>
  */
-public abstract class AbstractLifecycleBeanPostProcessor<T> extends AbstractBeanFactory
implements BeanPostProcessor, PriorityOrdered {
+public abstract class AbstractLifecycleBeanPostProcessor<T> implements BeanPostProcessor,
PriorityOrdered, BeanFactoryAware {
 
     private int order = Ordered.HIGHEST_PRECEDENCE;
+    private ListableBeanFactory factory;
+
+    @Override
+    public void setBeanFactory(BeanFactory factory) throws BeansException {
+        this.factory = (ListableBeanFactory) factory;
+    }
 
     /*
      * (non-Javadoc)
@@ -48,7 +57,7 @@ public abstract class AbstractLifecycleB
                 // Check if the bean is registered in the context.
                 // If not it was created by the container and so there
                 // is no need to execute the callback.
-                if (getBeanFactory().containsBeanDefinition(name)) {
+                if (factory.containsBeanDefinition(name)) {
                     executeLifecycleMethodBeforeInit((T) bean, name);
                 }
             }
@@ -72,7 +81,7 @@ public abstract class AbstractLifecycleB
                 // Check if the bean is registered in the context.
                 // If not it was created by the container and so there is no
                 // need to execute the callback.
-                if (getBeanFactory().containsBeanDefinition(name)) {
+                if (factory.containsBeanDefinition(name)) {
                     executeLifecycleMethodAfterInit((T) bean, name);
                 }
             }

Copied: james/server/trunk/lifecycle-spring/src/main/java/org/apache/james/container/spring/lifecycle/ConfigurableBeanPostProcessor.java
(from r1141183, james/server/trunk/container-spring/src/main/java/org/apache/james/container/spring/bean/postprocessor/ConfigurableBeanPostProcessor.java)
URL: http://svn.apache.org/viewvc/james/server/trunk/lifecycle-spring/src/main/java/org/apache/james/container/spring/lifecycle/ConfigurableBeanPostProcessor.java?p2=james/server/trunk/lifecycle-spring/src/main/java/org/apache/james/container/spring/lifecycle/ConfigurableBeanPostProcessor.java&p1=james/server/trunk/container-spring/src/main/java/org/apache/james/container/spring/bean/postprocessor/ConfigurableBeanPostProcessor.java&r1=1141183&r2=1142444&rev=1142444&view=diff
==============================================================================
--- james/server/trunk/container-spring/src/main/java/org/apache/james/container/spring/bean/postprocessor/ConfigurableBeanPostProcessor.java
(original)
+++ james/server/trunk/lifecycle-spring/src/main/java/org/apache/james/container/spring/lifecycle/ConfigurableBeanPostProcessor.java
Sun Jul  3 14:20:51 2011
@@ -16,11 +16,9 @@
  * specific language governing permissions and limitations      *
  * under the License.                                           *
  ****************************************************************/
-package org.apache.james.container.spring.bean.postprocessor;
+package org.apache.james.container.spring.lifecycle;
 
 import org.apache.commons.configuration.HierarchicalConfiguration;
-import org.apache.james.container.spring.bean.AbstractLifecycleBeanPostProcessor;
-import org.apache.james.container.spring.provider.configuration.ConfigurationProvider;
 import org.apache.james.lifecycle.api.Configurable;
 
 /**

Copied: james/server/trunk/lifecycle-spring/src/main/java/org/apache/james/container/spring/lifecycle/ConfigurationProvider.java
(from r1141183, james/server/trunk/container-spring/src/main/java/org/apache/james/container/spring/provider/configuration/ConfigurationProvider.java)
URL: http://svn.apache.org/viewvc/james/server/trunk/lifecycle-spring/src/main/java/org/apache/james/container/spring/lifecycle/ConfigurationProvider.java?p2=james/server/trunk/lifecycle-spring/src/main/java/org/apache/james/container/spring/lifecycle/ConfigurationProvider.java&p1=james/server/trunk/container-spring/src/main/java/org/apache/james/container/spring/provider/configuration/ConfigurationProvider.java&r1=1141183&r2=1142444&rev=1142444&view=diff
==============================================================================
--- james/server/trunk/container-spring/src/main/java/org/apache/james/container/spring/provider/configuration/ConfigurationProvider.java
(original)
+++ james/server/trunk/lifecycle-spring/src/main/java/org/apache/james/container/spring/lifecycle/ConfigurationProvider.java
Sun Jul  3 14:20:51 2011
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations      *
  * under the License.                                           *
  ****************************************************************/
-package org.apache.james.container.spring.provider.configuration;
+package org.apache.james.container.spring.lifecycle;
 
 import org.apache.commons.configuration.ConfigurationException;
 import org.apache.commons.configuration.HierarchicalConfiguration;

Copied: james/server/trunk/lifecycle-spring/src/main/java/org/apache/james/container/spring/lifecycle/ConfigurationProviderImpl.java
(from r1141183, james/server/trunk/container-spring/src/main/java/org/apache/james/container/spring/provider/configuration/ConfigurationProviderImpl.java)
URL: http://svn.apache.org/viewvc/james/server/trunk/lifecycle-spring/src/main/java/org/apache/james/container/spring/lifecycle/ConfigurationProviderImpl.java?p2=james/server/trunk/lifecycle-spring/src/main/java/org/apache/james/container/spring/lifecycle/ConfigurationProviderImpl.java&p1=james/server/trunk/container-spring/src/main/java/org/apache/james/container/spring/provider/configuration/ConfigurationProviderImpl.java&r1=1141183&r2=1142444&rev=1142444&view=diff
==============================================================================
--- james/server/trunk/container-spring/src/main/java/org/apache/james/container/spring/provider/configuration/ConfigurationProviderImpl.java
(original)
+++ james/server/trunk/lifecycle-spring/src/main/java/org/apache/james/container/spring/lifecycle/ConfigurationProviderImpl.java
Sun Jul  3 14:20:51 2011
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations      *
  * under the License.                                           *
  ****************************************************************/
-package org.apache.james.container.spring.provider.configuration;
+package org.apache.james.container.spring.lifecycle;
 
 import java.io.IOException;
 import java.util.HashMap;

Copied: james/server/trunk/lifecycle-spring/src/main/java/org/apache/james/container/spring/lifecycle/LogEnabledBeanPostProcessor.java
(from r1141183, james/server/trunk/container-spring/src/main/java/org/apache/james/container/spring/bean/postprocessor/LogEnabledBeanPostProcessor.java)
URL: http://svn.apache.org/viewvc/james/server/trunk/lifecycle-spring/src/main/java/org/apache/james/container/spring/lifecycle/LogEnabledBeanPostProcessor.java?p2=james/server/trunk/lifecycle-spring/src/main/java/org/apache/james/container/spring/lifecycle/LogEnabledBeanPostProcessor.java&p1=james/server/trunk/container-spring/src/main/java/org/apache/james/container/spring/bean/postprocessor/LogEnabledBeanPostProcessor.java&r1=1141183&r2=1142444&rev=1142444&view=diff
==============================================================================
--- james/server/trunk/container-spring/src/main/java/org/apache/james/container/spring/bean/postprocessor/LogEnabledBeanPostProcessor.java
(original)
+++ james/server/trunk/lifecycle-spring/src/main/java/org/apache/james/container/spring/lifecycle/LogEnabledBeanPostProcessor.java
Sun Jul  3 14:20:51 2011
@@ -16,10 +16,8 @@
  * specific language governing permissions and limitations      *
  * under the License.                                           *
  ****************************************************************/
-package org.apache.james.container.spring.bean.postprocessor;
+package org.apache.james.container.spring.lifecycle;
 
-import org.apache.james.container.spring.bean.AbstractLifecycleBeanPostProcessor;
-import org.apache.james.container.spring.provider.log.LogProvider;
 import org.apache.james.lifecycle.api.LogEnabled;
 
 /**

Copied: james/server/trunk/lifecycle-spring/src/main/java/org/apache/james/container/spring/lifecycle/LogProvider.java
(from r1141183, james/server/trunk/container-spring/src/main/java/org/apache/james/container/spring/provider/log/LogProvider.java)
URL: http://svn.apache.org/viewvc/james/server/trunk/lifecycle-spring/src/main/java/org/apache/james/container/spring/lifecycle/LogProvider.java?p2=james/server/trunk/lifecycle-spring/src/main/java/org/apache/james/container/spring/lifecycle/LogProvider.java&p1=james/server/trunk/container-spring/src/main/java/org/apache/james/container/spring/provider/log/LogProvider.java&r1=1141183&r2=1142444&rev=1142444&view=diff
==============================================================================
--- james/server/trunk/container-spring/src/main/java/org/apache/james/container/spring/provider/log/LogProvider.java
(original)
+++ james/server/trunk/lifecycle-spring/src/main/java/org/apache/james/container/spring/lifecycle/LogProvider.java
Sun Jul  3 14:20:51 2011
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations      *
  * under the License.                                           *
  ****************************************************************/
-package org.apache.james.container.spring.provider.log;
+package org.apache.james.container.spring.lifecycle;
 
 import org.slf4j.Logger;
 

Copied: james/server/trunk/lifecycle-spring/src/main/java/org/apache/james/container/spring/lifecycle/LogProviderImpl.java
(from r1141183, james/server/trunk/container-spring/src/main/java/org/apache/james/container/spring/provider/log/LogProviderImpl.java)
URL: http://svn.apache.org/viewvc/james/server/trunk/lifecycle-spring/src/main/java/org/apache/james/container/spring/lifecycle/LogProviderImpl.java?p2=james/server/trunk/lifecycle-spring/src/main/java/org/apache/james/container/spring/lifecycle/LogProviderImpl.java&p1=james/server/trunk/container-spring/src/main/java/org/apache/james/container/spring/provider/log/LogProviderImpl.java&r1=1141183&r2=1142444&rev=1142444&view=diff
==============================================================================
--- james/server/trunk/container-spring/src/main/java/org/apache/james/container/spring/provider/log/LogProviderImpl.java
(original)
+++ james/server/trunk/lifecycle-spring/src/main/java/org/apache/james/container/spring/lifecycle/LogProviderImpl.java
Sun Jul  3 14:20:51 2011
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations      *
  * under the License.                                           *
  ****************************************************************/
-package org.apache.james.container.spring.provider.log;
+package org.apache.james.container.spring.lifecycle;
 
 import java.util.Arrays;
 import java.util.HashMap;

Copied: james/server/trunk/lifecycle-spring/src/main/java/org/apache/james/container/spring/lifecycle/LogProviderManagementMBean.java
(from r1141183, james/server/trunk/container-spring/src/main/java/org/apache/james/container/spring/provider/log/LogProviderManagementMBean.java)
URL: http://svn.apache.org/viewvc/james/server/trunk/lifecycle-spring/src/main/java/org/apache/james/container/spring/lifecycle/LogProviderManagementMBean.java?p2=james/server/trunk/lifecycle-spring/src/main/java/org/apache/james/container/spring/lifecycle/LogProviderManagementMBean.java&p1=james/server/trunk/container-spring/src/main/java/org/apache/james/container/spring/provider/log/LogProviderManagementMBean.java&r1=1141183&r2=1142444&rev=1142444&view=diff
==============================================================================
--- james/server/trunk/container-spring/src/main/java/org/apache/james/container/spring/provider/log/LogProviderManagementMBean.java
(original)
+++ james/server/trunk/lifecycle-spring/src/main/java/org/apache/james/container/spring/lifecycle/LogProviderManagementMBean.java
Sun Jul  3 14:20:51 2011
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations      *
  * under the License.                                           *
  ****************************************************************/
-package org.apache.james.container.spring.provider.log;
+package org.apache.james.container.spring.lifecycle;
 
 import java.util.List;
 import java.util.Map;

Modified: james/server/trunk/lifecycle-spring/src/main/java/org/apache/james/container/spring/lifecycle/osgi/OSGIConfigurationProvider.java
URL: http://svn.apache.org/viewvc/james/server/trunk/lifecycle-spring/src/main/java/org/apache/james/container/spring/lifecycle/osgi/OSGIConfigurationProvider.java?rev=1142444&r1=1142304&r2=1142444&view=diff
==============================================================================
--- james/server/trunk/lifecycle-spring/src/main/java/org/apache/james/container/spring/lifecycle/osgi/OSGIConfigurationProvider.java
(original)
+++ james/server/trunk/lifecycle-spring/src/main/java/org/apache/james/container/spring/lifecycle/osgi/OSGIConfigurationProvider.java
Sun Jul  3 14:20:51 2011
@@ -1,4 +1,4 @@
-package org.apache.james.container.spring.osgi;
+package org.apache.james.container.spring.lifecycle.osgi;
 
 import java.io.FileInputStream;
 import java.io.FileNotFoundException;
@@ -7,7 +7,7 @@ import org.apache.commons.configuration.
 import org.apache.commons.configuration.HierarchicalConfiguration;
 import org.apache.commons.configuration.XMLConfiguration;
 
-public class OSGIConfigurationProvider implements org.apache.james.container.spring.provider.configuration.ConfigurationProvider{
+public class OSGIConfigurationProvider implements org.apache.james.container.spring.lifecycle.ConfigurationProvider{
 
     @Override
     public void registerConfiguration(String beanName, HierarchicalConfiguration conf) {

Copied: james/server/trunk/lifecycle-spring/src/main/java/org/apache/james/container/spring/lifecycle/osgi/OsgiLifecycleBeanFactoryPostProcessor.java
(from r1142431, james/server/trunk/container-spring/src/main/java/org/apache/james/container/spring/osgi/OsgiLifecycleBeanFactoryPostProcessor.java)
URL: http://svn.apache.org/viewvc/james/server/trunk/lifecycle-spring/src/main/java/org/apache/james/container/spring/lifecycle/osgi/OsgiLifecycleBeanFactoryPostProcessor.java?p2=james/server/trunk/lifecycle-spring/src/main/java/org/apache/james/container/spring/lifecycle/osgi/OsgiLifecycleBeanFactoryPostProcessor.java&p1=james/server/trunk/container-spring/src/main/java/org/apache/james/container/spring/osgi/OsgiLifecycleBeanFactoryPostProcessor.java&r1=1142431&r2=1142444&rev=1142444&view=diff
==============================================================================
--- james/server/trunk/container-spring/src/main/java/org/apache/james/container/spring/osgi/OsgiLifecycleBeanFactoryPostProcessor.java
(original)
+++ james/server/trunk/lifecycle-spring/src/main/java/org/apache/james/container/spring/lifecycle/osgi/OsgiLifecycleBeanFactoryPostProcessor.java
Sun Jul  3 14:20:51 2011
@@ -16,10 +16,10 @@
  * specific language governing permissions and limitations      *
  * under the License.                                           *
  ****************************************************************/
-package org.apache.james.container.spring.osgi;
+package org.apache.james.container.spring.lifecycle.osgi;
 
-import org.apache.james.container.spring.bean.postprocessor.ConfigurableBeanPostProcessor;
-import org.apache.james.container.spring.bean.postprocessor.LogEnabledBeanPostProcessor;
+import org.apache.james.container.spring.lifecycle.ConfigurableBeanPostProcessor;
+import org.apache.james.container.spring.lifecycle.LogEnabledBeanPostProcessor;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.BundleException;
 import org.osgi.framework.InvalidSyntaxException;
@@ -53,6 +53,7 @@ public class OsgiLifecycleBeanFactoryPos
         loggingProcessor.setBeanFactory(factory);
         factory.addBeanPostProcessor(loggingProcessor);
         configurationProcessor.setBeanFactory(factory);
+        factory.addBeanPostProcessor(configurationProcessor);
         annotationProcessor.setBeanFactory(factory);
         factory.addBeanPostProcessor(annotationProcessor);
 

Copied: james/server/trunk/lifecycle-spring/src/main/resources/META-INF/spring/extender/lifecycle-extender.xml
(from r1142431, james/server/trunk/container-spring/src/main/resources/META-INF/spring/extender/james-extender.xml)
URL: http://svn.apache.org/viewvc/james/server/trunk/lifecycle-spring/src/main/resources/META-INF/spring/extender/lifecycle-extender.xml?p2=james/server/trunk/lifecycle-spring/src/main/resources/META-INF/spring/extender/lifecycle-extender.xml&p1=james/server/trunk/container-spring/src/main/resources/META-INF/spring/extender/james-extender.xml&r1=1142431&r2=1142444&rev=1142444&view=diff
==============================================================================
--- james/server/trunk/container-spring/src/main/resources/META-INF/spring/extender/james-extender.xml
(original)
+++ james/server/trunk/lifecycle-spring/src/main/resources/META-INF/spring/extender/lifecycle-extender.xml
Sun Jul  3 14:20:51 2011
@@ -38,21 +38,21 @@
     <!-- 
       Spring "Bean-Post-Processor" for LogEnabled interface.
      -->
-    <bean id="loggingProcessor" class="org.apache.james.container.spring.bean.postprocessor.LogEnabledBeanPostProcessor">
+    <bean id="loggingProcessor" class="org.apache.james.container.spring.lifecycle.LogEnabledBeanPostProcessor">
         <property name="logProvider" ref="logprovider" />
         <property name="order" value="0" />
     </bean>
-    <bean id="logprovider" class="org.apache.james.container.spring.provider.log.LogProviderImpl">
+    <bean id="logprovider" class="org.apache.james.container.spring.lifecycle.LogProviderImpl">
     </bean>
 
     <!-- 
       Spring "Bean-Post-Processor" for Configurable interface.
      -->
-    <bean id="configurationProcessor" class="org.apache.james.container.spring.bean.postprocessor.ConfigurableBeanPostProcessor">
+    <bean id="configurationProcessor" class="org.apache.james.container.spring.lifecycle.ConfigurableBeanPostProcessor">
         <property name="configurationProvider" ref="configurationprovider" />
         <property name="order" value="1" />
     </bean>
-    <bean id="configurationprovider" class="org.apache.james.container.spring.osgi.OSGIConfigurationProvider">
+    <bean id="configurationprovider" class="org.apache.james.container.spring.lifecycle.osgi.OSGIConfigurationProvider">
     <!--  
         <property name="configurationMappings">
             <map>
@@ -64,7 +64,7 @@
     -->
     </bean>
     
-    <bean class="org.apache.james.container.spring.osgi.OsgiLifecycleBeanFactoryPostProcessor">
+    <bean class="org.apache.james.container.spring.lifecycle.osgi.OsgiLifecycleBeanFactoryPostProcessor">
         <property name="loggingProcessor" ref="loggingProcessor" />
         <property name="configurationProcessor" ref="configurationProcessor" />
         <property name="annotationProcessor" ref="annotationProcessor" />

Modified: james/server/trunk/pom.xml
URL: http://svn.apache.org/viewvc/james/server/trunk/pom.xml?rev=1142444&r1=1142443&r2=1142444&view=diff
==============================================================================
--- james/server/trunk/pom.xml (original)
+++ james/server/trunk/pom.xml Sun Jul  3 14:20:51 2011
@@ -54,6 +54,7 @@
     <module>jdbc</module>
     <module>file</module>
     <module>lifecycle-api</module>
+    <module>lifecycle-spring</module>
     <module>mailbox-adapter</module>
     <module>mailetcontainer-api</module>
     <module>mailetcontainer-camel</module>
@@ -831,6 +832,11 @@
     </dependency>
     <dependency>
       <groupId>org.apache.james</groupId>
+      <artifactId>james-server-lifecycle-spring</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.james</groupId>
       <artifactId>james-server-smtpserver</artifactId>
       <version>${project.version}</version>
       <type>test-jar</type>



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