Hi Armin,

> Hi Michael,
>
> Michael Mogley wrote:
> > I was wondering if anyone out there could comment on my usage of
PersistenceBroker in an
> EJB.  I currently create a single instance during ejbCreate and keep it
> for the duration of
> the bean's lifecycle.  This seems like the most efficient way.  Is there
> a danger to using
> this approach when transactions and distributed caches are involved?
> Any other potential pitfalls?
> >
>
> There could be a problem with the used connections when read-only
> operations (without tx-demarction) were performed. PB instance obtain a
> connection when needed. On PB.commitTransaction/abortTransaction
> (internal called in managed environments) and PB.close the connection
> was released.

Are you saying the connection must be released for read-only operations?  I
am not understanding.  Is there some danger to keeping a connection
constantly open (so long as serial access is ensured)?

Michael

> On read-only operations (no cm-tx or bm-tx used/required) only on
> PB.close the connection was released. In your case the association
> between PB instance and connection may not be detached. You can do this
> manually by calling PB.serviceConnectionManager().releaseConnection()
> for read-only methods, but I don't recommend this when using cm-tx,
> because tx declaration in DD may change and I'm not sure if this could
> cause side-effects.
>
> regards,
> Armin
>
> > Just want to make sure I'm not asking for trouble down the road.
> >
> > Thanks,
> >
> > Michael
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


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

Reply via email to