cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Enke, Michael" <>
Subject Re: _esql_connection.connection should be public
Date Mon, 12 May 2003 11:41:34 GMT
Torsten Curdt wrote:
> >>What do you mean? I assume it's ok for you if you have it available
> >>through the getter?
> >
> >
> > Yes, it is ok.
> ok... that's the quick work around then
> >>Well, from a pratical POV I can understand you might wanna re-use
> >>the same connection. But do you really need to have the *same*
> >>connection? Just curious... What do you do?
> >
> >
> > No, I don't need the same connection ;-)
> > But I don't know how to get another connection.
> > I want to put e.g. "Store Name" in all xsp's which comes from a DB table.
> ok... I see...
> A much cleaner approach would be to obtain the connection outside
> of esql and pass it to esql helper classes. (IIRC the helper classes
> already provide such facility but it's not yet implemented inside the
> stylesheet) ...or to create a new esql tag that returns the esql
> connection. That way everything is still encapsulated by esql.
> What do you think?

IMHO a new esql tag would be the best.
If we make it outside esql we have to care about all imports and try/catch
and what else is realted to java.sql.* in the xsp. This is not necessary when
we make it with esql.
If we create a new tag for returning the connection, I propose also to create a tag
for returning a ResultSet and ResultSetMetaData.
Than we have more freedom in manipulating/assigning all kind of DB related data.


View raw message