geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vamsic...@apache.org
Subject svn commit: r473023 - /geronimo/server/branches/1.1/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java
Date Thu, 09 Nov 2006 18:56:56 GMT
Author: vamsic007
Date: Thu Nov  9 10:56:55 2006
New Revision: 473023

URL: http://svn.apache.org/viewvc?view=rev&rev=473023
Log:
GERONIMO-1986 TranQL Connector doesn't check Driver Class during deployment:  modifying rev
472993.  If class loading fails, log a warning instead of throwing a deployment exception.

Modified:
    geronimo/server/branches/1.1/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java

Modified: geronimo/server/branches/1.1/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/1.1/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java?view=diff&rev=473023&r1=473022&r2=473023
==============================================================================
--- geronimo/server/branches/1.1/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java
(original)
+++ geronimo/server/branches/1.1/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java
Thu Nov  9 10:56:55 2006
@@ -37,6 +37,9 @@
 import java.util.zip.ZipEntry;
 import javax.naming.Reference;
 import javax.xml.namespace.QName;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 import org.apache.geronimo.common.DeploymentException;
 import org.apache.geronimo.common.UnresolvedReferenceException;
 import org.apache.geronimo.common.propertyeditor.PropertyEditors;
@@ -120,6 +123,7 @@
  * @version $Rev:385659 $ $Date$
  */
 public class ConnectorModuleBuilder implements ModuleBuilder, ResourceReferenceBuilder {
+    private final static Log log = LogFactory.getLog(ConnectorModuleBuilder.class);
 
     private final int defaultMaxSize;
     private final int defaultMinSize;
@@ -742,15 +746,15 @@
         // ManagedConnectionFactory
         setDynamicGBeanDataAttributes(managedConnectionFactoryInstanceGBeanData, connectiondefinitionInstance.getConfigPropertySettingArray(),
cl);
 
-        //Check if Driver class is available here. This should be available in cl. If not
throw a deployment error as
+        //Check if Driver class is available here. This should be available in cl. If not
log a warning as
         //the plan gets deployed and while starting GBean an error is thrown 
 
-        String driver = (String)managedConnectionFactoryInstanceGBeanData.getAttribute("Driver");
-        if (driver != null) {
+        Object driver = managedConnectionFactoryInstanceGBeanData.getAttribute("Driver");
+        if (driver != null && driver instanceof String) {
             try {
-                cl.loadClass(driver);
+                cl.loadClass((String)driver);
             } catch (ClassNotFoundException e1) {
-                throw new DeploymentException(e1);
+                log.warn("Problem loading driver class '"+driver+"', possibly due to a missing
dependency on the driver jar!!", e1);
             }
         }
 



Mime
View raw message