You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Johan Compagner <jc...@j-com.nl> on 2001/03/08 22:59:12 UTC

Datasource proposal

Using another one is very difficult because how the properties are set.
(I want to use the org.apache.struts.sql one but this one has many more options
and totally different method names to set the properties (like url ect)

And also the open en close methods aren't called automaticly.

So i propose a new interface:

interface StrutsDataSource extends DataSource
{
    open()
    close()
    setProperty(String str,String)
}

those property can be everything: url,driver class ect ect
exactly the things that can be specified in the struts-config.xml

Then the implementor must map the string "url" to it's own method.

Then struts must use this and handle this a bit different then now (it must
detect that the object is a StrutsDataSource and then not trying to set the properties
through PropertyUtil (or BeanUtil) but calling the setProperty method.

Johan