|
Home > Archive > Apache JDO Project > June 2005 > Issue 117: regarding Apache JDO Issue JDO-46
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Issue 117: regarding Apache JDO Issue JDO-46
|
|
| Craig Russell 2005-06-06, 7:49 am |
| | |
| Wes Biggs 2005-06-06, 7:49 am |
| I'm not too keen on allowing close() to be called multiple times (on
either PM or PMF), though it's clearly a NOP. But if we're going to be
consistent about throwing exceptions for untenable code paths, we ought
to, er, be consistent. ;-)
I would also support (though it would be a change from JDO1) access to
get/setUserObject() regardless of closed-ness. A use case might be:
associate some context object with a PM; release it into the wild; when
it is closed and returned, perform some context-sensitive action.
Other than that looks good.
Wes
Craig Russell wrote:
> This is issue 117.
>
> Currently, the spec is inconsistent or unclear in the treatment of
> close after close in the cases of PM and PMF.
>
> Unclear: The PMF section on close doesn't address close, but does
> specifically disallow getPersistenceManager and “set methods” and
> allow “other get methods”. Nothing is said about isClosed, close,
> add/remove instance lifecycle listener.
>
> Inconsistent with PMF: The PM section on close says that after close
> completes, all methods except isClosed throw JDOFatalUserException.
>
> Proposal:
>
> Change PM to state: all methods except isClosed, close, and getPMF
> throw JDOFatalUserException.
>
> Change PMF to state: all methods except isClosed, close, and getter
> methods throw JDOFatalUserException.
>
> Craig
>
> On May 23, 2005, at 1:31 AM, erik@jpox.org wrote:
>
> Craig Russell
> Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
> 408 276-5638 mailto:Craig.Russell@sun.com
> P.S. A good JDO? O, Gasp!
>
| |
|
| On a similar issue, if we obtain a pmf instance though
JDOHelper.getPMF(properties), the PMF is frozen and does not permit any
setter call. We ought to permit calling
setConnectionFactory/setConnectionFactory2 which receives Object
arguments and not properties. Both calls should be allowed until the
first PM is obtained from the PMF instance.
Otherwise, the user must create the PMF though a concrete implementation
and not with the standard JDOHelper.
Erik Bengtson
-----Original Message-----
From: Wes Biggs [mailto:wes@tralfamadore.com]
Sent: Tuesday, May 24, 2005 3:29 AM
To: JDO Expert Group
Cc: jdo-dev@db.apache.org
Subject: Re: Issue 117: regarding Apache JDO Issue JDO-46
I'm not too keen on allowing close() to be called multiple times (on
either PM or PMF), though it's clearly a NOP. But if we're going to be
consistent about throwing exceptions for untenable code paths, we ought
to, er, be consistent. ;-)
I would also support (though it would be a change from JDO1) access to
get/setUserObject() regardless of closed-ness. A use case might be:
associate some context object with a PM; release it into the wild; when
it is closed and returned, perform some context-sensitive action.
Other than that looks good.
Wes
Craig Russell wrote:
> This is issue 117.
>
> Currently, the spec is inconsistent or unclear in the treatment of
> close after close in the cases of PM and PMF.
>
> Unclear: The PMF section on close doesn't address close, but does
> specifically disallow getPersistenceManager and "set methods" and
> allow "other get methods". Nothing is said about isClosed, close,
> add/remove instance lifecycle listener.
>
> Inconsistent with PMF: The PM section on close says that after close
> completes, all methods except isClosed throw JDOFatalUserException.
>
> Proposal:
>
> Change PM to state: all methods except isClosed, close, and getPMF
> throw JDOFatalUserException.
>
> Change PMF to state: all methods except isClosed, close, and getter
> methods throw JDOFatalUserException.
>
> Craig
>
> On May 23, 2005, at 1:31 AM, erik@jpox.org wrote:
>
> Craig Russell
> Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
> 408 276-5638 mailto:Craig.Russell@sun.com
> P.S. A good JDO? O, Gasp!
>
|
|
|
|
|