Actually this is a lot easier than I made it out to be.
Once I remove the username, password, and set my countMin="0", using struts-config.xml 
to define my datasource was not an issue. 

Heres what need to be done before I made my connection.
    GenericDataSource ds = (GenericDataSource)servlet.findDataSource("myData");
    ds.setUser(Constants.USER);
    ds.setPassword(Constants.PASSWORD);
    ds.getConnection();



>>> [EMAIL PROTECTED] 8/30/01 2:20:09 PM >>>

What you realy need ?
- You need to make a connection => commit => disconnect or
- Put the connection in the "Struts Connection Pool" ?


----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, August 30, 2001 12:23 PM
Subject: Any workaround for getConnection("username", "password")?


> In an attempt to implement security on our web servers, I've tried to
> remove the username and password on the struts-config.xml datasource tag.
> I've done this to retrieve this information from a remote location not
> located on the actual web server.  The problem with this, as many of you
> probably know is that the struts framework does not yet support the
> getConnection("user","pass") in its genericDataSource implementation.  I
> was wondering if any of you have a workaround for this instance?
>
> I have gotten tomcat to load the datasource without a username and
> password by setting my minCount="0".  The reason this works is pretty
> obvious and that's because tomcat doesn't make an initial connection to
> the database.
>
> I have a feeling that I can add the username and password now that tomcat
> is loaded but am a little unsure of how to accomplish this.
>
> Thanks
> Dan Jimenez
>
>
>
>
>


Reply via email to