ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: proposed patch to ANT SQL task
Date Tue, 21 Jan 2003 09:21:41 GMT
On Tue, 21 Jan 2003, Paul King <> wrote:

> Hi, I needed to pass properties in to a type-3 JDBC driver
> (WebLogic's RMI driver) in a SQL task.  Perhaps I missed
> how this could be done using existing functionality.

I don't think you've missed anything.

For the JDBC drivers I have used so far, one could always encode the
properties inside the URL, but a more explicit way may be better, I

> I also removed the need to have userid and password specified.

But we should still check for them, i.e. after setting up the
properties, make the task fail if there is no user or password

> The JDBC spec doesn't require them and some database drivers
> such as cloudscape don't need them.

Oops, so forget my comment above 8-)

> And I can support properties:
>     properties="weblogic.server.url=t3://localhost:7001;weblogic.jdbc.datasource=Testing-ageapp-AgeDS"

rather than using a whatever-delimited String, I'd use nested

>     <sql driver="weblogic.jdbc.rmi.Driver" url="jdbc:weblogic:rmi"
>            onerror="continue"
>            autocommit="true"
>     >

        <property name="weblogic.server.url" value="t3://localhost:7001"/>
        <property name="weblogic.jdbc.datasource"

>       DELETE from NAMEAUDIT where NAME='xyzzy';
>       </sql>

You get the idea.

> I haven't checked that my code meets any style guidelines at this
> point

You should 8-) Looks as if you were in violation of the no-tabs rule.

> or checked if it breaks any existing tests

You really should.

> I am new to this project and am not a commiter so let me know what I
> need to do now.

Improve your patch based on feedback you get.  Make sure the tests
pass (if necessary modify the tests).  Add documentation.  Add the
patch to bugzilla so that we don't lose track of it.

Basically, read <>.

> I also wanted to support datasources directly

Not going into code details here - Ant is supposed to work on JDK 1.1,
so we may very well get into trouble when we require features that are
not available there.  <sql> is a core task, so any dependency on JDBC
2.0 optional has to be hidden behind code using reflection.  This may
very well become really ugly.


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message