Author: mriou
Date: Wed Apr 23 08:23:34 2008
New Revision: 650904

URL: http://svn.apache.org/viewvc?rev=650904&view=rev
Log:
Avoiding the pollution of initial conf properties.

Modified:
    
ode/branches/APACHE_ODE_1.1/bpel-store/src/main/java/org/apache/ode/store/hib/DbConfStoreConnectionFactory.java
    
ode/branches/APACHE_ODE_1.1/dao-hibernate/src/main/java/org/apache/ode/daohib/bpel/BpelDAOConnectionFactoryImpl.java

Modified: 
ode/branches/APACHE_ODE_1.1/bpel-store/src/main/java/org/apache/ode/store/hib/DbConfStoreConnectionFactory.java
URL: 
http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.1/bpel-store/src/main/java/org/apache/ode/store/hib/DbConfStoreConnectionFactory.java?rev=650904&r1=650903&r2=650904&view=diff
==============================================================================
--- 
ode/branches/APACHE_ODE_1.1/bpel-store/src/main/java/org/apache/ode/store/hib/DbConfStoreConnectionFactory.java
 (original)
+++ 
ode/branches/APACHE_ODE_1.1/bpel-store/src/main/java/org/apache/ode/store/hib/DbConfStoreConnectionFactory.java
 Wed Apr 23 08:23:34 2008
@@ -78,8 +78,11 @@
 
     final SessionFactory _sessionFactory;
 
-    public DbConfStoreConnectionFactory(DataSource ds, Properties properties, 
boolean auto) {
+    public DbConfStoreConnectionFactory(DataSource ds, Properties 
initialProps, boolean auto) {
         _ds = ds;
+
+        // Don't want to pollute original properties
+        Properties properties = new Properties(initialProps);
 
         __log.debug("using data source: " + ds);
         _dataSources.put(_guid, ds);

Modified: 
ode/branches/APACHE_ODE_1.1/dao-hibernate/src/main/java/org/apache/ode/daohib/bpel/BpelDAOConnectionFactoryImpl.java
URL: 
http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.1/dao-hibernate/src/main/java/org/apache/ode/daohib/bpel/BpelDAOConnectionFactoryImpl.java?rev=650904&r1=650903&r2=650904&view=diff
==============================================================================
--- 
ode/branches/APACHE_ODE_1.1/dao-hibernate/src/main/java/org/apache/ode/daohib/bpel/BpelDAOConnectionFactoryImpl.java
 (original)
+++ 
ode/branches/APACHE_ODE_1.1/dao-hibernate/src/main/java/org/apache/ode/daohib/bpel/BpelDAOConnectionFactoryImpl.java
 Wed Apr 23 08:23:34 2008
@@ -68,7 +68,7 @@
     /**
      * @see 
org.apache.ode.bpel.dao.BpelDAOConnectionFactory#init(java.util.Properties)
      */
-    public void init(Properties properties) {
+    public void init(Properties initialProps) {
         if (_ds == null) {
             String errmsg = "setDataSource() not called!";
             __log.fatal(errmsg);
@@ -81,8 +81,9 @@
             throw new IllegalStateException(errmsg);
         }
 
-        if (properties == null)
-            properties = new Properties();
+        if (initialProps == null) initialProps = new Properties();
+        // Don't want to pollute original properties
+        Properties properties = new Properties(initialProps);
 
         // Note that we don't allow the following properties to be overriden by
         // the client.


Reply via email to