Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [eclipselink-dev] javax.persistence in eclipselink.jar

Hi Gordon,

 

I’ve got a test that uses the Query.getMaxResults method, which is a 2.0 method. The test firstly checks if it is running in a 2.0 or 1.0 environment by inspecting LockModeType.values(). If it sees 2 values, it assumes 1.0, 2.0 otherwise.

 

In JBoss, the check sees 8 values for LockModeType as LockModeType is included in eclipselink.jar. My test assumes 2.0 and the invocation of Query.getMaxResults fails as Query is not included in eclipselink.jar.

 

In NetWeaver, it behaves differently, here the jpa 1.0 jar has precedence over eclipselink.jar. Hence the LockModeType from 1.0 is visible having two values. My test assumes 1.0 and skips the invocation of Query.getMaxResults.

 

-Adrian

 

 

 

From: eclipselink-dev-bounces@xxxxxxxxxxx [mailto:eclipselink-dev-bounces@xxxxxxxxxxx] On Behalf Of Gordon Yorke
Sent: Dienstag, 9. März 2010 19:15
To: Dev mailing list for Eclipse Persistence Services
Subject: Re: [eclipselink-dev] javax.persistence in eclipselink.jar

 

Adrian,
  These classes are within the EclipseLink jar because internally we have dependancies on some of these classes.  EclipseLink is still a JPA 1.0 compliant provider however and to support running in environments where the JPA 2.0 APIs are not available some classes are included in the EclipseLink jar.
  What errors are you seeing on JBoss?  If you are in a true JPA 1.0 environment then the application should not have access to any of the included classes.
--Gordon

Goerler, Adrian wrote:

Hi Eric,

 

I am puzzled by the fact that in trunk eclipselink.jar contains *some selected* classes from javax.persistence. Actually, I don’t see why eclipselink.jar should contain classes from javax.persistence at all. But if it contains these classes, it should contain the entire API, I think. Moreover the selection is not complete as it for example does not contain javax.persistence.Query, which has been changed in 2.0.

 

In the trunk/build.xml, I find the comment

 

# 360:            <!-- JPA 1.1/2.0 concurrent dev solution: New classes from javax.persistence 2.0 -->

 

So, likely, this is just some leftover from 1.2.

 

(I am currently testing on JBoss where I am seeing a mixed 1.0/2.0 API which causes some confusion) ;-)

 

Regards,

 

Adrian

 

 

 

Adrian Görler
SAP AG

Pflichtangaben/Mandatory Disclosure Statements: http://www.sap.com/company/legal/impressum.epx

 

 

 

 


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

Back to the top