openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Patrick Linskey (JIRA)" <>
Subject [jira] Commented: (OPENJPA-317) API formalization pre-1.0
Date Mon, 20 Aug 2007 16:11:30 GMT


Patrick Linskey commented on OPENJPA-317:

> 1. In FetchPlanImpl, you have:
> +    public boolean isEnlistInQueryResultCache() {
> +        return _fetch.getEnlistInQueryCache();
> Why shouldn't both methods have the same signature?

I've been focused on the published API, not the internals. _fetch is a kernel FetchConfiguration,
not a FetchPlan. We use isFoo() in the published API, but evidently just have a get method
in the kernel call.

> 2. Since OpenJPAEntityManagerSPI extends OpenJPAEntityManager, any class that implements
OpenJPAEntityManagerSPI doesn't also need to implement OpenJPAEntityManager.

Good point; that must have gotten lost in the refactoring.

> 3. OpenJPAEntityManagerFactory used to extend Closeable. It might be useful for it to
continue to extend Closeable, as the only method in Closeable is close().

close() is already in EMF from an API standpoint. We do 'instanceof Closeable' checks internally
for various reasons; there is nothing about an OpenJPAEntityManagerFactory that necessarily
requires closeability. So, it seemed appropriate to reduce the interface footprint and just
make the impl class implement Closeable.

> 4. I think that these methods should be considered to be part of OpenJPAEntityManagerFactory
and not SPI, since they don't depend on internal state or internal classes:
> +    public void addLifecycleListener(Object listener, Class... classes);
> +    public void removeLifecycleListener (Object listener);

I've independently come to the same conclusion and made that change in the more recent patch.

> API formalization pre-1.0
> -------------------------
>                 Key: OPENJPA-317
>                 URL:
>             Project: OpenJPA
>          Issue Type: New Feature
>          Components: jpa
>    Affects Versions: 0.9.0, 0.9.6, 0.9.7
>            Reporter: Patrick Linskey
>             Fix For: 1.0.0
>         Attachments: OPENJPA-317.patch, OPENJPA-317.patch
> This issue tracks the effort to formalize and optimize our API prior to the 1.0 release.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message