Leif Mortenson wrote:

> I just went ahead and checked in a JdbcDataSource example that I've had
> sitting on my computer.

Thanks so much.  This is a great help.


> It was not 100% ready for prime time documentation wise, but the example
> itself is ready.  Go into the new examples/jdbcdatasource directory and
> run build.  Then run bin\run.bat  (Still need to create a run.sh file)

The build.sh doesn't work if AVALON_HOME isn't set due to problems with the
relative paths.  I've attached a copy of my build.sh that works.  It would be
nice if it could get checked in with execute permissions too.


> >What are my options for the connection-class parameter to
> >pool-controller (I'm guessing this will be JdbcConnectionPool)?
> >
> Actually no, it defaults to
> "org.apache.avalon.excalibur.datasource.JdbcConnection".  I also updated
> the javadocs, so take a look checkout the latest CVS and take a look at
> the Javadocs.  Go ahead and just leave it off as the default will work.

The Javadoc claims that I can set connection-class to
"org.apache.avalon.excalibur.datasource.Jdbc3Connection" but there isn't any
such class.  Did you mean JdbcConnection (i.e. no "3")?


> >  What does the keep-alive option do?
> >
> It is used for making sure the connection is alive before allowing it to
> be allocated.  See New Javadocs for details. :-)

What happens if the connection is discovered to be dead?  Will it be disposed
off and a new one created?


> >Since JdbcConnectionPool implements HardResourceLimitingPool, does this
> >mean that the number of connections will only grow to the max, and will
> >never shrink?
> >
> That is correct.  Take a look at the ResourceLimitingJdbcDataSource in
> the scratchpad.  It will trim unused connections.

Would you consider this ready for production use?  Will it be moved over to
Excalibur proper anytime soon?


> Let me know if you still have questions.

Why doesn't JdbcDataSource declare that it implements Configurable?

Is there a reason you use DefaultConfigurationBuilder.build(FileInputStream) vs
DefaultConfigurationBuilder.buildFromFile(String)?  I'd think the latter would
save you the trouble of writing the loadConfiguration method.


Thanks,
-Mark

Attachment: build.sh
Description: Bourne shell script

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to