Before rolling your own, you might want to take a look at some of the ORM projects, like OJB <http://db.apache.org/ojb/> and Hibernate <http://hibernate.bluemars.net/>, or a DAO framework, like ibatis <http://ibatis.com/>.

These sorts of things are always more work than they seem at first.

-Ted.

[EMAIL PROTECTED] wrote:

hi all,
        i have configured a datasource in struts-config.xml, which is successfully 
loaded.
now my problem is that i want to write a  component (which has application-context 
scope) which wraps
the DataSource, so that individual action classes don't have to deal with 
PreparedStatement etc...
so, this component needs to be initialized with the DataSource

my initiali idea whas to write a plugin for instantiating this component.
But the only method that i can see for retreiving the configured datasource is 
servlet.getDataSource(request), and in the
plugin initialization method there is no request.

does this method exist servlet.getDataSource() ?

otherwise,does anyone have any alternative solutions?

regards
        marco



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



Reply via email to