openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kevin Sutter" <kwsut...@gmail.com>
Subject Re: OpenJPAPersistence extends Persistence; should we remove this?
Date Wed, 08 Aug 2007 18:11:56 GMT
Our experience is that Containers want no knowledge of the specific
provider.  They need the ability to plug in any provider and the more they
can shield themselves from knowing the specific provider, the better.  The
Persistence class provides this generic interface for creating the
EMFactories.  My point being that I wouldn't use Container usage as a
possible reason for making this separation.

I guess I'm not clear on the static registry problems that have been
encountered, so I can't really comment on whether making this separation
would be buy us anything.

Kevin

On 8/8/07, Patrick Linskey <plinskey@gmail.com> wrote:
>
> > However, I can't imagine how simply removing the inheritance
> > connection would solve anything. Are you suggesting that we replicate
> > the Persistence functionality (like createEntityManagerFactory()) in
> > our own OpenJPAPersistence class?
>
> No; I just think that if we weren't ever explicitly linking to it,
> then containers / users could do more interesting things with their
> classloaders. They'd still be subject to issues with Persistence, but
> they could always choose to directly create a PersistenceProviderImpl
> and bypass the Persistence class.
>
> -Patrick
>
> On 8/8/07, Marc Prud'hommeaux <mprudhom@apache.org> wrote:
> > Patrick-
> >
> > I don't know anything about the nature of the problems with the
> > Persistence provider registry, but I don't see any reason why
> > OpenJPAPersistence should need to extend Persistence.
> >
> > However, I can't imagine how simply removing the inheritance
> > connection would solve anything. Are you suggesting that we replicate
> > the Persistence functionality (like createEntityManagerFactory()) in
> > our own OpenJPAPersistence class?
> >
> >
> >
> > On Aug 8, 2007, at 9:11 AM, Patrick Linskey wrote:
> >
> > > Hi,
> > >
> > > We've run into a couple of problems with the static registry
> > > maintained in the Persistence class. Should we isolate ourselves from
> > > it by making OpenJPAPersistence not extend Persistence? If we did so,
> > > it would be pretty straightforward for OpenJPA to never reference
> > > Persistence, which would mean that people who ran into trouble with
> > > that class could work around the problems by using OpenJPA APIs
> > > instead.
> > >
> > > Thoughts?
> > >
> > > -Patrick
> > >
> > > --
> > > Patrick Linskey
> > > 202 669 5907
> >
> >
>
>
> --
> Patrick Linskey
> 202 669 5907
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message