The Source for Java Technology Collaboration
User: Password:
Register | Login help    

Search

Online Books:
java.net on MarkMail:


TopLink Essentials 2.0 and maven repository

Posted by guruwons on February 17, 2007 at 2:37 AM PST

TopLink Essentials 2.0?

TopLink Essentials(GlassFish JPA implementation) now come to have a new version 2.0. But, don't be surprised, this is just versioning change from 9.1. TopLink Essentials 2.0 and 9.1 are the same version.

Originally TopLink Essentials had a version like 9.0(GlassFish v1), 9.1(GlassFish v2) after the version of Sun Java System Application Server. Since TopLink Essentials is an independent framework which can be used without GlassFish(SJSAS) container, it doesn't need to be tied to SJSAS version. Also it could be top-level project later, TopLink Essentials team decided to use new versioing policy.

This versioning change is applied to the recent build (b36) in GlassFish v2[1], that is 2.0-b36.

Maven repository

Now you can download the latest binaries and sources in the java.net maven repository!

https://maven-repository.dev.java.net/nonav/repository/toplink.essentials/

The POM will look like below:

<project>
  <modelVersion>4.0.0</modelVersion>
  <groupId>toplink.essentials</groupId>
  <artifactId>toplink-essentials</artifactId>
  <version>2.0-36</version>
  <dependencies>
    <dependency>
      <groupId>javax.persistence</groupId>
      <artifactId>persistence-api</artifactId>
      <version>1.0b</version>
    </dependency>
  </dependencies>
</project>

Download it manually or use maven dependency mechanism with above groupId and artifactId.

As you can infer, the latter version fragment (after dash) is build number (e.g. 36 in above). This build number is same as GlassFish build number. From now, every builds after b36 will be published to the repository.

To check version statically, see META-INF/MANIFEST.MF inside toplink-essentials.jar file and you will see like below.

Implementation-Version: 2.0-36 (02/17/2007)

To check version in runtime, find the log printed by TopLink Essentials like below.

[TopLink Info]: ...TopLink, version: Oracle TopLink Essentials - 2.0 (Build 36 (02/17/2007))

With this versioning change TopLink Essentials in GlassFish v1(SJSAS 9.0) might be called as TopLink Essentials 1.0.

toplink-essentials-agent.jar is deprecated

There is also a notable enhancement[2] after 2.0-b36. toplink-essentials-agent.jar file is no longer needed. There were two jars files - toplink-essentials.jar which contains JPA API classes and implementations, and toplink-essentials-agent.jar which contains javaagent. The agent jar had been used for users who want to use lazy-fetching feature in Java SE mode[3]. Now the agent facility is integrated into toplink-essentials.jar. So you can do like below.

$ java -javaagent:toplink-essentials.jar client.Client

For existing users, toplink-essentials-agent.jar will be provided continuously for the time being.

It's really convenient that we just need to carry one jar file toplink-essentials.jar for JPA programming.

Hope you enjoy TopLink Essentials 2.0!

[1] https://glassfish.dev.java.net/issues/show_bug.cgi?id=2405

[2] https://glassfish.dev.java.net/issues/show_bug.cgi?id=2409

[3] The innermost secrets of -javaagent:toplink-essentials-agent.jar revealed

Related Topics >> J2EE      
Comments
Comments are listed in date ascending order (oldest first)