Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-dev] Maven Updates

Hi Markus,

The interfaces you compile against will be the same between vendors. They are defined in the specification. The classes that may be different are the classes with actual implementation.

In the javax.persistence package there are two classes, javax.persistence.Persistence and javax.persistence.spi.PersistenceProviderResolverHolder. The implementations of these classes is not set out by the spec and as such may be different between vendors. We have been instructed by various spec leads that that is the way this spec is designed and that the spec does not provide the implementation of these classes.

We also include a couple of classes that enable OSGi usage, but they are in org.eclipse.persistence.* packages.

The bottom line is that if you only depend on interfaces, if you ever have a compile issue moving between vendors, it will be a bug in the code of one of the vendors since those interfaces are part of the spec.

-Tom

Markus Karg wrote:
Tom,

thank you for your comments, see more below.

   For the group id issue - due to the way the specification is
designed, there
are implementations in the javax.persistence classes (i.e. code that
will be
run, rather than just interfaces - e.g. Persistence.class,
ProviderResolverHolder.class + some Provider resolves)  The
javax.persistence
jar we produce is truly an EclipseLink version of javax.persistence.  I
would
expect that different implementers of javax.persistence have different
code in
several of the classes because of the way the spec classes are defined.
For
that reason, it seems as if the eclipselink group is a reasonable place
for that
bundle.

But how can get guaranteed then that when I compile my project against
EclipseLink's persistence API it will run also on a different
implementation?

Thanks
Markus

_______________________________________________
eclipselink-dev mailing list
eclipselink-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-dev


Back to the top