Sorry. I meant the 'obtain a connection, create prepared statements and
close statements and the connection at the very end of the method' part.
Note that it's usually a good idea to do the closes in a finally clause so
that you're sure they happen even if an exeption happens.
On Fri, 23 Mar 2001, Guy Rouillier wrote:
> Dan, what did you mean by "this" in the statement "Usually this is done in
> ejbCreate..."?
>
> ----- Original Message -----
> From: "Dan Christopherson" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, March 22, 2001 4:52 PM
> Subject: Re: [JBoss-user] A little BMP philosophy/understanding
>
>
> > > Usually in my BMP business methods I obtain a connection,
> > > create prepared statements and close statements and the connection
> > > at the very end of the method (assuming that jboss is caching
> > > the connection and statements).
> > >
> > > Is that the right pattern?
> > Usually this is done in ejbCreate, ejbFindByXXX, ejbLoad and ejbStore. Of
> > course if your business methods are doing additional database access,
> > that's how to do it.
>
>
>
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user
>
--
Dan Christopherson (danch)
nVisia Technical Architect (www.nvisia.com)
Opinions expressed are mine and do not neccessarily reflect any
position or opinion of nVISIA.
---------------------------------------------------------------------------
If you're a capitalist and you have the best goods and they're
free, you don't have to proselytize, you just have to wait.
-Eben Moglen
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user