Foster Bob wrote:
> Michael Hu wrote:
>
> >Connection attributes don't belong in the query tag, definitely.  I would
> >argue connections (and query select statements) also don't belong in JSP
> >pages. Sorta orthogonal.
>
> Then how do you propose to implement commit and rollback in JSP pages?

Actually, that sounds like me, not Michael.  Only fair if I answer.  :)

Change "I would argue connections" to "I would argue connection descriptions".
To me, a connection is an external resource whose properties are declared
externally, because the connection is likely to be shared.  The same way I
wouldn't want to specify EJB transaction properties and ACLs in useBean.  The
same way I wouldn't want to specify sql in my JSP page.  Schemas change,
databases often change between test environments and deploy environments, etc.
Much better if that sort of info is stored in a centralized place.

I didn't mean to say that connection references were improper, though I do
seem to have managed to....

That said, I think commit and rollback don't belong in JSP pages.  As
mentioned by someone else JSPs, IMHO, are for presentation layout. One can
choose to believe that laying out database fields are or are not external
to JSPs, but I think commit and rollback clearly belong in, at least, a servlet,
and probably something more like an EJB where transactions exist in
containers that span more than just a single connection.

However, that isn't going to work for people who prefer the
"everything-in-my-page"
model of programming.  <shrug>

-Dave

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html

Reply via email to