geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vamsic...@apache.org
Subject svn commit: r473032 - /geronimo/server/trunk/modules/geronimo-connector-builder/src/main/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java
Date Thu, 09 Nov 2006 19:07:58 GMT
Author: vamsic007
Date: Thu Nov  9 11:07:57 2006
New Revision: 473032

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

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

Modified: geronimo/server/trunk/modules/geronimo-connector-builder/src/main/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-connector-builder/src/main/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java?view=diff&rev=473032&r1=473031&r2=473032
==============================================================================
--- geronimo/server/trunk/modules/geronimo-connector-builder/src/main/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java
(original)
+++ geronimo/server/trunk/modules/geronimo-connector-builder/src/main/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java
Thu Nov  9 11:07:57 2006
@@ -40,6 +40,8 @@
 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;
@@ -124,6 +126,8 @@
  * @version $Rev:385659 $ $Date$
  */
 public class ConnectorModuleBuilder implements ModuleBuilder, ActivationSpecInfoLocator {
+    private final static Log log = LogFactory.getLog(ConnectorModuleBuilder.class);
+
     private static QName CONNECTOR_QNAME = GerConnectorDocument.type.getDocumentElementName();
     static final String GERCONNECTOR_NAMESPACE = CONNECTOR_QNAME.getNamespaceURI();
 
@@ -823,15 +827,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