You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by aa...@apache.org on 2012/11/09 22:13:37 UTC

svn commit: r1407639 - /cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/configuration/server/XMLPoolingDataSourceFactory.java

Author: aadamchik
Date: Fri Nov  9 21:13:37 2012
New Revision: 1407639

URL: http://svn.apache.org/viewvc?rev=1407639&view=rev
Log:
removing unused injected service

Modified:
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/configuration/server/XMLPoolingDataSourceFactory.java

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/configuration/server/XMLPoolingDataSourceFactory.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/configuration/server/XMLPoolingDataSourceFactory.java?rev=1407639&r1=1407638&r2=1407639&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/configuration/server/XMLPoolingDataSourceFactory.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/configuration/server/XMLPoolingDataSourceFactory.java Fri Nov  9 21:13:37 2012
@@ -26,52 +26,38 @@ import org.apache.cayenne.conn.DataSourc
 import org.apache.cayenne.conn.PoolManager;
 import org.apache.cayenne.di.Inject;
 import org.apache.cayenne.log.JdbcEventLogger;
-import org.apache.cayenne.resource.ResourceLocator;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
 /**
- * A {@link DataSourceFactory} that loads JDBC connection information from an XML resource
- * associated with the DataNodeDescriptor, returning a DataSource with simple connection
- * pooling.
+ * A {@link DataSourceFactory} that loads JDBC connection information from an
+ * XML resource associated with the DataNodeDescriptor, returning a DataSource
+ * with simple connection pooling.
  * 
  * @since 3.1
  */
 public class XMLPoolingDataSourceFactory implements DataSourceFactory {
 
-    private static final Log logger = LogFactory
-            .getLog(XMLPoolingDataSourceFactory.class);
+    private static final Log logger = LogFactory.getLog(XMLPoolingDataSourceFactory.class);
 
     @Inject
-    protected ResourceLocator resourceLocator;
-    
-    @Inject
     protected JdbcEventLogger jdbcEventLogger;
 
     public DataSource getDataSource(DataNodeDescriptor nodeDescriptor) throws Exception {
 
         DataSourceInfo dataSourceDescriptor = nodeDescriptor.getDataSourceDescriptor();
-       
 
         if (dataSourceDescriptor == null) {
-            String message = "Null dataSourceDescriptor for nodeDescriptor '"
-                    + nodeDescriptor.getName()
-                    + "'";
+            String message = "Null dataSourceDescriptor for nodeDescriptor '" + nodeDescriptor.getName() + "'";
             logger.info(message);
             throw new ConfigurationException(message);
         }
-        
+
         try {
-            return new PoolManager(
-                    dataSourceDescriptor.getJdbcDriver(),
-                    dataSourceDescriptor.getDataSourceUrl(),
-                    dataSourceDescriptor.getMinConnections(),
-                    dataSourceDescriptor.getMaxConnections(),
-                    dataSourceDescriptor.getUserName(),
-                    dataSourceDescriptor.getPassword(),
-                    jdbcEventLogger);
-        }
-        catch (Exception e) {
+            return new PoolManager(dataSourceDescriptor.getJdbcDriver(), dataSourceDescriptor.getDataSourceUrl(),
+                    dataSourceDescriptor.getMinConnections(), dataSourceDescriptor.getMaxConnections(),
+                    dataSourceDescriptor.getUserName(), dataSourceDescriptor.getPassword(), jdbcEventLogger);
+        } catch (Exception e) {
             jdbcEventLogger.logConnectFailure(e);
             throw e;
         }