geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vamsavardhana Reddy" <c1vams...@gmail.com>
Subject Re: svn commit: r472993 - /geronimo/server/branches/1.1/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java
Date Thu, 09 Nov 2006 18:30:41 GMT
David,

I will modify the code to log a warning instead of throwing an exception.

--vamsi

On 11/9/06, David Jencks <david_jencks@yahoo.com> wrote:
>
> -1 on this as it stands.  You are assuming that any connector that
> has a config-property called "Driver" uses that property for a java
> class name that is expected to be on the classpath.  I can easily
> imagine a jdbc wrapper for a specific database that has a "Driver"
> config-property to choose between a type 2 and type 4 driver and e.g.
> the property is an Integer rather than a class name.
>
> I think we could either
> -- emit a warning if the class can't be loaded rather than throwing
> an exception
> or
> -- only do this check if we are loading the tranql generic jdbc
> wrapper in some version.
>
> I'd kind of prefer the first but have no strong preference.
>
> thanks
> david jencks
>
> On Nov 9, 2006, at 9:57 AM, vamsic007@apache.org wrote:
>
> > Author: vamsic007
> > Date: Thu Nov  9 09:57:25 2006
> > New Revision: 472993
> >
> > URL: http://svn.apache.org/viewvc?view=rev&rev=472993
> > Log:
> > GERONIMO-1986 TranQL Connector doesn't check Driver Class during
> > deployment
> >
> > 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=472993&r1=472992&r2=472993
> > ======================================================================
> > ========
> > --- 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 09:57:25 2006
> > @@ -741,6 +741,19 @@
> >
> >          // 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
> > +        //the plan gets deployed and while starting GBean an error
> > is thrown
> > +
> > +        String driver = (String)
> > managedConnectionFactoryInstanceGBeanData.getAttribute("Driver");
> > +        if (driver != null) {
> > +            try {
> > +                cl.loadClass(driver);
> > +            } catch (ClassNotFoundException e1) {
> > +                throw new DeploymentException(e1);
> > +            }
> > +        }
> > +
> >          try {
> >              if (resourceAdapterAbstractName != null) {
> >
> > managedConnectionFactoryInstanceGBeanData.setReferencePattern
> > ("ResourceAdapterWrapper", resourceAdapterAbstractName);
> >
> >
>
>

Mime
View raw message