tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r586595 - in /openejb/trunk/openejb3: container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/Assembler.java container/openejb-core/src/main/java/org/apache/openejb/core/MailSessionFactory.java pom.xml
Date Fri, 19 Oct 2007 20:06:11 GMT
Author: dain
Date: Fri Oct 19 13:06:11 2007
New Revision: 586595

URL: http://svn.apache.org/viewvc?rev=586595&view=rev
Log:
Cleanup javamail dependencies

Modified:
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/Assembler.java
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/MailSessionFactory.java
    openejb/trunk/openejb3/pom.xml

Modified: openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/Assembler.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/Assembler.java?rev=586595&r1=586594&r2=586595&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/Assembler.java
(original)
+++ openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/Assembler.java
Fri Oct 19 13:06:11 2007
@@ -52,6 +52,7 @@
 import org.apache.xbean.recipe.ObjectRecipe;
 import org.apache.xbean.recipe.StaticRecipe;
 import org.apache.xbean.recipe.Option;
+import org.apache.xbean.recipe.UnsetPropertiesRecipe;
 import org.apache.geronimo.connector.work.GeronimoWorkManager;
 import org.apache.geronimo.connector.GeronimoBootstrapContext;
 import org.apache.geronimo.transaction.manager.GeronimoTransactionManager;
@@ -821,6 +822,7 @@
         ObjectRecipe serviceRecipe = new ObjectRecipe(serviceInfo.className, serviceInfo.factoryMethod,
serviceInfo.constructorArgs.toArray(new String[0]), null);
         serviceRecipe.setAllProperties(serviceInfo.properties);
         serviceRecipe.setProperty("transactionManager", transactionManager);
+        serviceRecipe.setProperty("properties", new UnsetPropertiesRecipe());
         serviceRecipe.allow(Option.IGNORE_MISSING_PROPERTIES);
 
         replaceResourceAdapterProperty(serviceRecipe);

Modified: openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/MailSessionFactory.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/MailSessionFactory.java?rev=586595&r1=586594&r2=586595&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/MailSessionFactory.java
(original)
+++ openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/MailSessionFactory.java
Fri Oct 19 13:06:11 2007
@@ -19,10 +19,25 @@
 
 import javax.mail.Session;
 import java.util.Properties;
+import java.util.Map;
 
 public class MailSessionFactory {
+    private final Properties properties = new Properties();
+
     public Session create() {
-        // todo add support for args and properties
-        return Session.getDefaultInstance(new Properties());
+        return Session.getDefaultInstance(properties);
+    }
+
+    public Properties getProperties() {
+        return properties;
+    }
+
+    public void setProperties(Properties properties) {
+        this.properties.clear();
+        for (Map.Entry<Object, Object> entry : properties.entrySet()) {
+            if (entry.getKey() instanceof String && entry.getValue() instanceof String)
{
+                this.properties.put(entry.getKey(), entry.getValue());
+            }
+        }
     }
 }

Modified: openejb/trunk/openejb3/pom.xml
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/pom.xml?rev=586595&r1=586594&r2=586595&view=diff
==============================================================================
--- openejb/trunk/openejb3/pom.xml (original)
+++ openejb/trunk/openejb3/pom.xml Fri Oct 19 13:06:11 2007
@@ -540,6 +540,16 @@
         <groupId>org.apache.geronimo.javamail</groupId>
         <artifactId>geronimo-javamail_1.4_mail</artifactId>
         <version>1.2</version>
+        <exclusions>
+          <exclusion>
+              <groupId>org.apache.geronimo.javamail</groupId>
+              <artifactId>geronimo-javamail_1.4_provider</artifactId>
+          </exclusion>
+          <exclusion>
+              <groupId>org.apache.geronimo.specs</groupId>
+              <artifactId>geronimo-javamail_1.4_spec</artifactId>
+          </exclusion>
+        </exclusions>
       </dependency>
       <dependency>
         <groupId>org.apache.geronimo.specs</groupId>



Mime
View raw message