You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by bt...@apache.org on 2017/03/24 01:41:57 UTC

[2/5] james-project git commit: JAMES-1974 Try to get rid of spring

JAMES-1974 Try to get rid of spring


Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/f025ff09
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/f025ff09
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/f025ff09

Branch: refs/heads/master
Commit: f025ff0959c83a7fe6b50411e99a9ddd3126d4be
Parents: 8e08bb4
Author: Matthieu Baechler <ma...@gmail.com>
Authored: Wed Mar 22 22:05:50 2017 +0100
Committer: benwa <bt...@linagora.com>
Committed: Fri Mar 24 08:29:56 2017 +0700

----------------------------------------------------------------------
 server/container/spring/pom.xml                 | 34 ++++++++++++++++++++
 server/queue/queue-activemq/pom.xml             | 34 --------------------
 .../james/queue/activemq/ActiveMQMailQueue.java | 12 +------
 3 files changed, 35 insertions(+), 45 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/f025ff09/server/container/spring/pom.xml
----------------------------------------------------------------------
diff --git a/server/container/spring/pom.xml b/server/container/spring/pom.xml
index 65c3c0c..154f98a 100644
--- a/server/container/spring/pom.xml
+++ b/server/container/spring/pom.xml
@@ -84,6 +84,17 @@
             <artifactId>apache-mailet-api</artifactId>
         </dependency>
         <dependency>
+          <groupId>org.apache.activemq</groupId>
+          <artifactId>activemq-spring</artifactId>
+          <version>${activemq.version}</version>
+          <exclusions>
+            <exclusion>
+                <groupId>commons-logging</groupId>
+                <artifactId>commons-logging</artifactId>
+            </exclusion>
+          </exclusions>
+        </dependency>
+        <dependency>
             <groupId>org.springframework</groupId>
             <artifactId>spring-core</artifactId>
         </dependency>
@@ -97,6 +108,29 @@
         </dependency>
         <dependency>
             <groupId>org.springframework</groupId>
+            <artifactId>spring-jms</artifactId>
+            <scope>compile</scope>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.springframework</groupId>
+                    <artifactId>spring-core</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.springframework</groupId>
+                    <artifactId>spring-beans</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.springframework</groupId>
+                    <artifactId>spring-aop</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.springframework</groupId>
+                    <artifactId>spring-tx</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
             <artifactId>spring-web</artifactId>
         </dependency>
         <dependency>

http://git-wip-us.apache.org/repos/asf/james-project/blob/f025ff09/server/queue/queue-activemq/pom.xml
----------------------------------------------------------------------
diff --git a/server/queue/queue-activemq/pom.xml b/server/queue/queue-activemq/pom.xml
index 9cd81cc..14febf0 100644
--- a/server/queue/queue-activemq/pom.xml
+++ b/server/queue/queue-activemq/pom.xml
@@ -63,40 +63,6 @@
           <version>${activemq.version}</version>
         </dependency>
         <dependency>
-          <groupId>org.apache.activemq</groupId>
-          <artifactId>activemq-spring</artifactId>
-          <version>${activemq.version}</version>
-          <exclusions>
-            <exclusion>
-                <groupId>commons-logging</groupId>
-                <artifactId>commons-logging</artifactId>
-            </exclusion>
-          </exclusions>
-        </dependency>
-        <dependency>
-            <groupId>org.springframework</groupId>
-            <artifactId>spring-jms</artifactId>
-            <scope>compile</scope>
-            <exclusions>
-                <exclusion>
-                    <groupId>org.springframework</groupId>
-                    <artifactId>spring-core</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>org.springframework</groupId>
-                    <artifactId>spring-beans</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>org.springframework</groupId>
-                    <artifactId>spring-aop</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>org.springframework</groupId>
-                    <artifactId>spring-tx</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-        <dependency>
             <groupId>org.apache.geronimo.specs</groupId>
             <artifactId>geronimo-jms_1.1_spec</artifactId>
         </dependency>

http://git-wip-us.apache.org/repos/asf/james-project/blob/f025ff09/server/queue/queue-activemq/src/main/java/org/apache/james/queue/activemq/ActiveMQMailQueue.java
----------------------------------------------------------------------
diff --git a/server/queue/queue-activemq/src/main/java/org/apache/james/queue/activemq/ActiveMQMailQueue.java b/server/queue/queue-activemq/src/main/java/org/apache/james/queue/activemq/ActiveMQMailQueue.java
index 56c25c1..e39fb81 100644
--- a/server/queue/queue-activemq/src/main/java/org/apache/james/queue/activemq/ActiveMQMailQueue.java
+++ b/server/queue/queue-activemq/src/main/java/org/apache/james/queue/activemq/ActiveMQMailQueue.java
@@ -49,7 +49,6 @@ import org.apache.james.queue.api.MailQueueItemDecoratorFactory;
 import org.apache.james.queue.jms.JMSMailQueue;
 import org.apache.mailet.Mail;
 import org.slf4j.Logger;
-import org.springframework.jms.connection.SessionProxy;
 
 /**
  * <p>
@@ -227,16 +226,7 @@ public class ActiveMQMailQueue extends JMSMailQueue implements ActiveMQSupport {
      * @throws JMSException
      */
     protected ActiveMQSession getAMQSession(Session session) {
-        ActiveMQSession amqSession;
-
-        if (session instanceof SessionProxy) {
-            // handle Springs CachingConnectionFactory
-            amqSession = (ActiveMQSession) ((SessionProxy) session).getTargetSession();
-        } else {
-            // just cast as we have no other idea
-            amqSession = (ActiveMQSession) session;
-        }
-        return amqSession;
+        return (ActiveMQSession) session;
     }
 
     @Override


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


Re: [2/5] james-project git commit: JAMES-1974 Try to get rid of spring

Posted by Benoit Tellier <bt...@linagora.com>.
Sorry, but I do not understand your email.

Cheers,

Benoit

Le 24/03/2017  11:05, jackie issa a crit :
> Here are some times that work for me:
> 
> 
>         Fri Mar 24
> 
> 
> 
> 
> 
> 
> 11:30 am - 12:00 pm (GMT+2)
> 
> 
> 
> 
> 
> 
> 
> 
> Made easy by Outlook<https://aka.ms/Dcupce>
> 
> 
> 
> Sent from Outlook Mobile<https://aka.ms/qtex0l>
> 
> ________________________________
> From: btellier@apache.org <bt...@apache.org>
> Sent: Friday, March 24, 2017 3:41:57 AM
> To: server-dev@james.apache.org
> Subject: [2/5] james-project git commit: JAMES-1974 Try to get rid of spring
> 
> JAMES-1974 Try to get rid of spring
> 
> 
> Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
> Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/f025ff09
> Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/f025ff09
> Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/f025ff09
> 
> Branch: refs/heads/master
> Commit: f025ff0959c83a7fe6b50411e99a9ddd3126d4be
> Parents: 8e08bb4
> Author: Matthieu Baechler <ma...@gmail.com>
> Authored: Wed Mar 22 22:05:50 2017 +0100
> Committer: benwa <bt...@linagora.com>
> Committed: Fri Mar 24 08:29:56 2017 +0700
> 
> ----------------------------------------------------------------------
>  server/container/spring/pom.xml                 | 34 ++++++++++++++++++++
>  server/queue/queue-activemq/pom.xml             | 34 --------------------
>  .../james/queue/activemq/ActiveMQMailQueue.java | 12 +------
>  3 files changed, 35 insertions(+), 45 deletions(-)
> ----------------------------------------------------------------------
> 
> 
> http://git-wip-us.apache.org/repos/asf/james-project/blob/f025ff09/server/container/spring/pom.xml
> ----------------------------------------------------------------------
> diff --git a/server/container/spring/pom.xml b/server/container/spring/pom.xml
> index 65c3c0c..154f98a 100644
> --- a/server/container/spring/pom.xml
> +++ b/server/container/spring/pom.xml
> @@ -84,6 +84,17 @@
>              <artifactId>apache-mailet-api</artifactId>
>          </dependency>
>          <dependency>
> +          <groupId>org.apache.activemq</groupId>
> +          <artifactId>activemq-spring</artifactId>
> +          <version>${activemq.version}</version>
> +          <exclusions>
> +            <exclusion>
> +                <groupId>commons-logging</groupId>
> +                <artifactId>commons-logging</artifactId>
> +            </exclusion>
> +          </exclusions>
> +        </dependency>
> +        <dependency>
>              <groupId>org.springframework</groupId>
>              <artifactId>spring-core</artifactId>
>          </dependency>
> @@ -97,6 +108,29 @@
>          </dependency>
>          <dependency>
>              <groupId>org.springframework</groupId>
> +            <artifactId>spring-jms</artifactId>
> +            <scope>compile</scope>
> +            <exclusions>
> +                <exclusion>
> +                    <groupId>org.springframework</groupId>
> +                    <artifactId>spring-core</artifactId>
> +                </exclusion>
> +                <exclusion>
> +                    <groupId>org.springframework</groupId>
> +                    <artifactId>spring-beans</artifactId>
> +                </exclusion>
> +                <exclusion>
> +                    <groupId>org.springframework</groupId>
> +                    <artifactId>spring-aop</artifactId>
> +                </exclusion>
> +                <exclusion>
> +                    <groupId>org.springframework</groupId>
> +                    <artifactId>spring-tx</artifactId>
> +                </exclusion>
> +            </exclusions>
> +        </dependency>
> +        <dependency>
> +            <groupId>org.springframework</groupId>
>              <artifactId>spring-web</artifactId>
>          </dependency>
>          <dependency>
> 
> http://git-wip-us.apache.org/repos/asf/james-project/blob/f025ff09/server/queue/queue-activemq/pom.xml
> ----------------------------------------------------------------------
> diff --git a/server/queue/queue-activemq/pom.xml b/server/queue/queue-activemq/pom.xml
> index 9cd81cc..14febf0 100644
> --- a/server/queue/queue-activemq/pom.xml
> +++ b/server/queue/queue-activemq/pom.xml
> @@ -63,40 +63,6 @@
>            <version>${activemq.version}</version>
>          </dependency>
>          <dependency>
> -          <groupId>org.apache.activemq</groupId>
> -          <artifactId>activemq-spring</artifactId>
> -          <version>${activemq.version}</version>
> -          <exclusions>
> -            <exclusion>
> -                <groupId>commons-logging</groupId>
> -                <artifactId>commons-logging</artifactId>
> -            </exclusion>
> -          </exclusions>
> -        </dependency>
> -        <dependency>
> -            <groupId>org.springframework</groupId>
> -            <artifactId>spring-jms</artifactId>
> -            <scope>compile</scope>
> -            <exclusions>
> -                <exclusion>
> -                    <groupId>org.springframework</groupId>
> -                    <artifactId>spring-core</artifactId>
> -                </exclusion>
> -                <exclusion>
> -                    <groupId>org.springframework</groupId>
> -                    <artifactId>spring-beans</artifactId>
> -                </exclusion>
> -                <exclusion>
> -                    <groupId>org.springframework</groupId>
> -                    <artifactId>spring-aop</artifactId>
> -                </exclusion>
> -                <exclusion>
> -                    <groupId>org.springframework</groupId>
> -                    <artifactId>spring-tx</artifactId>
> -                </exclusion>
> -            </exclusions>
> -        </dependency>
> -        <dependency>
>              <groupId>org.apache.geronimo.specs</groupId>
>              <artifactId>geronimo-jms_1.1_spec</artifactId>
>          </dependency>
> 
> http://git-wip-us.apache.org/repos/asf/james-project/blob/f025ff09/server/queue/queue-activemq/src/main/java/org/apache/james/queue/activemq/ActiveMQMailQueue.java
> ----------------------------------------------------------------------
> diff --git a/server/queue/queue-activemq/src/main/java/org/apache/james/queue/activemq/ActiveMQMailQueue.java b/server/queue/queue-activemq/src/main/java/org/apache/james/queue/activemq/ActiveMQMailQueue.java
> index 56c25c1..e39fb81 100644
> --- a/server/queue/queue-activemq/src/main/java/org/apache/james/queue/activemq/ActiveMQMailQueue.java
> +++ b/server/queue/queue-activemq/src/main/java/org/apache/james/queue/activemq/ActiveMQMailQueue.java
> @@ -49,7 +49,6 @@ import org.apache.james.queue.api.MailQueueItemDecoratorFactory;
>  import org.apache.james.queue.jms.JMSMailQueue;
>  import org.apache.mailet.Mail;
>  import org.slf4j.Logger;
> -import org.springframework.jms.connection.SessionProxy;
> 
>  /**
>   * <p>
> @@ -227,16 +226,7 @@ public class ActiveMQMailQueue extends JMSMailQueue implements ActiveMQSupport {
>       * @throws JMSException
>       */
>      protected ActiveMQSession getAMQSession(Session session) {
> -        ActiveMQSession amqSession;
> -
> -        if (session instanceof SessionProxy) {
> -            // handle Springs CachingConnectionFactory
> -            amqSession = (ActiveMQSession) ((SessionProxy) session).getTargetSession();
> -        } else {
> -            // just cast as we have no other idea
> -            amqSession = (ActiveMQSession) session;
> -        }
> -        return amqSession;
> +        return (ActiveMQSession) session;
>      }
> 
>      @Override
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
> For additional commands, e-mail: server-dev-help@james.apache.org
> 
> 

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


Re: [2/5] james-project git commit: JAMES-1974 Try to get rid of spring

Posted by jackie issa <ja...@hotmail.com>.
Here are some times that work for me:


        Fri Mar 24






11:30 am - 12:00 pm (GMT+2)








Made easy by Outlook<https://aka.ms/Dcupce>



Sent from Outlook Mobile<https://aka.ms/qtex0l>

________________________________
From: btellier@apache.org <bt...@apache.org>
Sent: Friday, March 24, 2017 3:41:57 AM
To: server-dev@james.apache.org
Subject: [2/5] james-project git commit: JAMES-1974 Try to get rid of spring

JAMES-1974 Try to get rid of spring


Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/f025ff09
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/f025ff09
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/f025ff09

Branch: refs/heads/master
Commit: f025ff0959c83a7fe6b50411e99a9ddd3126d4be
Parents: 8e08bb4
Author: Matthieu Baechler <ma...@gmail.com>
Authored: Wed Mar 22 22:05:50 2017 +0100
Committer: benwa <bt...@linagora.com>
Committed: Fri Mar 24 08:29:56 2017 +0700

----------------------------------------------------------------------
 server/container/spring/pom.xml                 | 34 ++++++++++++++++++++
 server/queue/queue-activemq/pom.xml             | 34 --------------------
 .../james/queue/activemq/ActiveMQMailQueue.java | 12 +------
 3 files changed, 35 insertions(+), 45 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/f025ff09/server/container/spring/pom.xml
----------------------------------------------------------------------
diff --git a/server/container/spring/pom.xml b/server/container/spring/pom.xml
index 65c3c0c..154f98a 100644
--- a/server/container/spring/pom.xml
+++ b/server/container/spring/pom.xml
@@ -84,6 +84,17 @@
             <artifactId>apache-mailet-api</artifactId>
         </dependency>
         <dependency>
+          <groupId>org.apache.activemq</groupId>
+          <artifactId>activemq-spring</artifactId>
+          <version>${activemq.version}</version>
+          <exclusions>
+            <exclusion>
+                <groupId>commons-logging</groupId>
+                <artifactId>commons-logging</artifactId>
+            </exclusion>
+          </exclusions>
+        </dependency>
+        <dependency>
             <groupId>org.springframework</groupId>
             <artifactId>spring-core</artifactId>
         </dependency>
@@ -97,6 +108,29 @@
         </dependency>
         <dependency>
             <groupId>org.springframework</groupId>
+            <artifactId>spring-jms</artifactId>
+            <scope>compile</scope>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.springframework</groupId>
+                    <artifactId>spring-core</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.springframework</groupId>
+                    <artifactId>spring-beans</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.springframework</groupId>
+                    <artifactId>spring-aop</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.springframework</groupId>
+                    <artifactId>spring-tx</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
             <artifactId>spring-web</artifactId>
         </dependency>
         <dependency>

http://git-wip-us.apache.org/repos/asf/james-project/blob/f025ff09/server/queue/queue-activemq/pom.xml
----------------------------------------------------------------------
diff --git a/server/queue/queue-activemq/pom.xml b/server/queue/queue-activemq/pom.xml
index 9cd81cc..14febf0 100644
--- a/server/queue/queue-activemq/pom.xml
+++ b/server/queue/queue-activemq/pom.xml
@@ -63,40 +63,6 @@
           <version>${activemq.version}</version>
         </dependency>
         <dependency>
-          <groupId>org.apache.activemq</groupId>
-          <artifactId>activemq-spring</artifactId>
-          <version>${activemq.version}</version>
-          <exclusions>
-            <exclusion>
-                <groupId>commons-logging</groupId>
-                <artifactId>commons-logging</artifactId>
-            </exclusion>
-          </exclusions>
-        </dependency>
-        <dependency>
-            <groupId>org.springframework</groupId>
-            <artifactId>spring-jms</artifactId>
-            <scope>compile</scope>
-            <exclusions>
-                <exclusion>
-                    <groupId>org.springframework</groupId>
-                    <artifactId>spring-core</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>org.springframework</groupId>
-                    <artifactId>spring-beans</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>org.springframework</groupId>
-                    <artifactId>spring-aop</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>org.springframework</groupId>
-                    <artifactId>spring-tx</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-        <dependency>
             <groupId>org.apache.geronimo.specs</groupId>
             <artifactId>geronimo-jms_1.1_spec</artifactId>
         </dependency>

http://git-wip-us.apache.org/repos/asf/james-project/blob/f025ff09/server/queue/queue-activemq/src/main/java/org/apache/james/queue/activemq/ActiveMQMailQueue.java
----------------------------------------------------------------------
diff --git a/server/queue/queue-activemq/src/main/java/org/apache/james/queue/activemq/ActiveMQMailQueue.java b/server/queue/queue-activemq/src/main/java/org/apache/james/queue/activemq/ActiveMQMailQueue.java
index 56c25c1..e39fb81 100644
--- a/server/queue/queue-activemq/src/main/java/org/apache/james/queue/activemq/ActiveMQMailQueue.java
+++ b/server/queue/queue-activemq/src/main/java/org/apache/james/queue/activemq/ActiveMQMailQueue.java
@@ -49,7 +49,6 @@ import org.apache.james.queue.api.MailQueueItemDecoratorFactory;
 import org.apache.james.queue.jms.JMSMailQueue;
 import org.apache.mailet.Mail;
 import org.slf4j.Logger;
-import org.springframework.jms.connection.SessionProxy;

 /**
  * <p>
@@ -227,16 +226,7 @@ public class ActiveMQMailQueue extends JMSMailQueue implements ActiveMQSupport {
      * @throws JMSException
      */
     protected ActiveMQSession getAMQSession(Session session) {
-        ActiveMQSession amqSession;
-
-        if (session instanceof SessionProxy) {
-            // handle Springs CachingConnectionFactory
-            amqSession = (ActiveMQSession) ((SessionProxy) session).getTargetSession();
-        } else {
-            // just cast as we have no other idea
-            amqSession = (ActiveMQSession) session;
-        }
-        return amqSession;
+        return (ActiveMQSession) session;
     }

     @Override


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