Wednesday, June 27, 2012

EclipseLink 2.4.0 Released

I am very excited to announce that EclipseLink 2.4.0 is now available for download.

Highlights of this release include:....

RESTFul Persistence

Java Persistence units can now be exposed over REST using either JSON or XML media.

Tenant Isolation - Table per tenant

Developers can design and deploy applications where their persistent entities are stored in separate tables per tenant.

NoSQL

This release introduces EclipseLink's NoSQL support for MongoDB and Oracle NoSQL.

JSON

EclipseLink MOXy can now be used for the marshaling and unmarshaling of JSON object. This is core infrastructure to the JPA-RS feature.

... and much, much more...

Please see this link for a complete feature list and to download 2.4.0 to try it yourself!!

See also: Doug Clarke's Blog on 2.4

Tuesday, August 23, 2011

EclipseLink: Multitenancy with Oracle VPD

As of EclipseLink Indigo (2.3.0) you have been able to use the @Multitenant feature to share a database schema between multiple tenants. Did you know that you can also use this feature together with the Oracle Virtual Private Database (VPD) support that has been available in EclipseLink since version 1.0?

This powerful combination of features allows for the shared tables to be managed directly on the database, and for inserts to be automatically associated with the proper client. Any SQL executed by EclipseLink (even if EclipseLink did not generate it - ie native queries) will go through VPD and return only the client specific rows.

Since VPD can be configured per table, applications can be configured to use VPD on some tables, and share others.

A running example, complete with source code is available on the EclipseLink wiki.


Thursday, July 28, 2011

GlassFish 3.1.1 Ships with EclipseLink 2.3!

GlassFish 3.1.1 shipped today which makes it the first application server with the new multi-tenancy and extensible persistence unit support as well as all the other new features included in EclipseLink 2.3. If you're a GlassFish developer and you're upgrading to 3.1.1 you can find out all about the new features available in EclipseLink 2.3 on the EclipseLink Wiki.

To wet your appetite, Alexis Moussine-Pouchkine posted a screencast of building a multi-tenant enabled application on a pre-release build of GlassFish 3.1.1 on his blog and now would be a great time to check it out!

Shaun Smith, EclipseLink Team
@shaunmsmith

Wednesday, June 22, 2011

EclipseLink 2.3.0 (Indigo) Released

Since joining the family here at Eclipse a few years ago, one thing I can always count on is a hectic and exciting start to summer. This summer is no exception, and is kicked off with the release of EclipseLink 2.3.0 (Indigo).

Before I continue with brief descriptions of some of the new features of EclipseLink 2.3.0, I would like to thank everyone who was involved with this release. Whether your contribution to the project consisted of finding and entering bugs, contributing to the forums, or designing and implementing features, your contribution was important to the success of this project. Thank you, and I look forward to your contributions to our next major releases.

There are too many features and enhancement requests to touch on everything in this blog post, so I am going to limit it to what I believe are the highlights. For a complete 2.3.0 feature list, and to download and try out some of this stuff yourself, please click here.

Extend Entities
2.3.0 offers EclipseLink users the ability to extend their model (JPA entities or MOXy JAXB beans) so that a set of additional extended mappings can be used at runtime. These additional mappings offer more flexibility for developers that may not know all the mappings required for the application at design time.

Support Multiple Tenants
2.3.0 offers developers the ability to design and deploy applications where their persistent entities for multiple tenants are stored in a shared table. A column (or columns) in the table is designated as the discriminator for the tenant.

Externalize Mappings
Mappings for your model (JPA entities or MOXy JAXB beans) can now be stored externally to the running application. This allows mapping overrides and extended mappings (new in 2.3.0) to be easily and dynamically integrated into deployed applications.

Multiple Database
Developers can now store different entities in different databases, and even have relationships between them using Composite Persistence Units (PU). This feature gives developers the ability to build persistence units, each connecting to their own datasource, and compose them together under a parent PU. The parent PU is then used as if it is a standard persistence unit.

Click here for more information, including examples and docs, on the above features, and to download 2.3.0.

Peter

Friday, June 17, 2011

EclipseLink Indigo Preview: Shared Databases for Multiple Tenants

Challenged to take an existing application and re-use it for a new customer or group of users (tenant)? Instead of customizing the application, adding new hardware or re-configuring the database for each new tenant, you can now build EclipseLink JPA enabled applications hosting requests from multiple tenants with all their data co-located.

Starting with EclipseLink 2.3, part of the annual Eclipse Indigo release, you can now have multiple application tenants sharing a database schema. EclipseLink enables you to configure your database tables for shared storage by simply providing tenant discriminator column(s) and providing values for these discriminators within your application. This allows your tenants to share the same schema without being aware of one another.

Of course in some instances, you may wish to share some data across tenants. No problem! EclipseLink allows you to share and isolate as much or as little as your application requires.

The beauty and ease of creating such an environment lies simply in decorating those entities that need to be isolated per tenants with an @Multitenant specification. Shared entities need not be configured any further then required by the JPA specification.

For more information on how to take advantage of this new functionality, follow the link:

http://wiki.eclipse.org/EclipseLink/Examples/JPA/Multitenant

Please note: The final release date for EclipseLink 2.3 is June 22, 2011 and the examples and documentation will evolve as the release date approaches. If you would like more detail, please check back after the release date or take advantage of our mailing lists and forums.

Friday, June 10, 2011

Extend your Persistence Unit on the fly

Imagine a system that keeps track of player statistics in a sports league. Personal information such as name, height, weight and basic statistics such as the number of games played is stored for all players.

A persistence unit is deployed with all the mappings described above.

The system admin of a basketball league wants to use the system and add mappings for points scored and fouls. As the system is running they tell EcliseLink about mappings for those fields and the next EntityManager they get uses them.

Starting with EclipseLink 2.3, you can do just that. To do that, all you have to do is:

- Build a traditional persistence unit
- Tweak your Entities so they can hold added mappings
- Build room for additional data into your database schema
- Define a repository to contain your additional mappings and tell EclipseLink about it

With those steps, any EntityManager created from your persistence unit will use your new mappings.

Additionally, you can refresh your EntityManagerFactory. Any EntityManager created after the refresh will use any new mappings added to the repository since the previous refresh.





The following link shows an example of how a system as described above could be configured. Please note: The final release date for EclipseLink 2.3 is June 22, 2011 and the examples and documentation will evolve as we get closer to that date. If you would like more detail, please check back after the release date or take advantage of our mailing lists and forums.

http://wiki.eclipse.org/EclipseLink/Examples/JPA/Extensibility

Friday, June 3, 2011

EclipseLink RefCardz Available

A new RefCardz is available from DZone on JPA development with EclipseLink:

http://refcardz.dzone.com/refcardz/eclipselink-jpa

Thanks to Gordon Yorke for his hard work putting this together during the busy months leading up to the EclipseLink 2.3 (Indigo) release.

Monday, September 20, 2010

EclipseLink at Open World/Java One/Oracle Develop 2010

The EclipseLink project will be well represented this year at Java One and Open World. If you are here attending the shows then I recommend you attend some of our sessions or drop by and visit us at the exhibition booths.

ID#: S314492
Title: Java Persistence API (JPA) 2.0 with EclipseLink
Date: 20-SEP-10
Time: 16:00-17:00
Hilton San Francisco, Golden Gate 4/5

ID#: S317452
Title: Advanced Enterprise Persistence
Date: 22-SEP-10
Time: 10:00-11:00
Hotel Nikko, Nikko Ballroom II

S314491: Effective XML: Leveraging JAXB and SDO
Date: 22-SEP-10
Time: 13:00-14:00
Hilton San Francisco, Yosemite A

S313434: Java Persistence API Futures BOF
Date: 22-SEP-10
Time: 14:15-15:15
Hilton San Francisco, Yosemite A

ID#: S318574
Title: Scaling JPA Applications with Oracle TopLink Grid and Oracle Coherence
Date: 22-SEP-10
Time: 16:45-17:45
Hilton San Francisco, Imperial Ballroom B

We also will be staffing exhibition booths on Oracle TopLink focusing on EclipseLink at the Oracle Fusion Middleware DEMOgrounds as well as helping staff the Oracle/Eclipse booth at the Java One exhibition hall and some time at the Eclipse Foundation booth.

We hope to meet as many EclipseLink users as possible and exchange ideas.

Doug

Thursday, August 5, 2010

Using partial EclipseLink JPA entities with JAXB

I spent much of the final months of the EclipseLink 2.1 (Helios) development championing the enhancements of our existing FetchGroup support to address additional uses cases around working with partial entities. The new functionality is referred to as AttributeGroup with support for FETCH (what columns get retrieved from the database), LOAD (what relationships are populated), COPY (what attributes and relationships and populated in detached copy), and MERGE (what attributes are merged from a detached partial entity). This additional support greatly simplifies application development where detached entities are used as well as providing additional performance tuning options and flexibility for other scenarios.

The purpose of this blog post is to help a user we were assisting on Twitter who wanted to use JAXB to marshal JPA entities into XML but only wanted a portion of the entities to be used. By default JAXB will traverse all available relationships including lazy ones that have not been loaded to build a complete XML document for the provided entities.

Here is a simple example reading a Customer with an Address (1:1) and PhoneNumber(s) (1:M) from a database and marshalling it into XML using EclipseLink JPA with EclipseLink MOXy.

Setup code for JPA and JAXB:
// JPA
EntityManagerFactory emf =
Persistence.createEntityManagerFactory("CustomerService");
EntityManager em = emf.createEntityManager();

// JAXB
JAXBContext jaxbContext = JAXBContext.newInstance(Customer.class);
marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT,
true);
Example: Find & Marshall Customer
Customer customer = em.find(Customer.class, 1);
marshaller.marshal(customer, System.out);
When executed this generates the following XML and causes the customer's address and phone numbers to be loaded from the database.
Now, if we wanted to generate a partial XML document including only the Customer's basic attributes and its address's attributes we could use a copy group to create a partial copy and marshal it:
Customer customer = em.find(Customer.class, (long) 1);

CopyGroup cg = new CopyGroup();
cg.addAttribute("id");
cg.addAttribute("firstName");
cg.addAttribute("lastName");
cg.addAttribute("address.id");
cg.addAttribute("address.city");
cg.addAttribute("address.street");

JpaEntityManger nativeEM = em.unwrap(JpaEntityManager.class);
Customer custCopy = (Customer) nativeEM .copy(customer, cg);

marshaller.marshal(custCopy , System.out);
Now the generated XML appears as:

There are other combined uses of AttributeGroup that can be used to control what is fetched and loaded as well but this copy example should illustrate some of the options available and how EclipseLink JPA and MOXy components can be easily used together.

Doug

Additional MOXy examples available here.

Wednesday, June 23, 2010

EclipseLink 2.1.0 Helios Release Now Available

Hi all,

It is with great pleasure that I would like to announce the release of EclipseLink 2.1.0 (Helios). This release of brings a number of exciting features many of which were voted on, and chosen by the community.

Some of the JPA features included in this release are
- improved JPQL enhancements, and extensions including 'TREAT...AS' and 'FUNC'.
- Fetch, Load, Copy & Merge of partial entities using 'AttributeGroup'
- extentions to 'eclipselink-orm.xml'
- Dynamic Persistence: JPA without requiring Java classes.
- New Platforms: SAPNetWeaver Server Platform and Symfoware Database Platform
...and more...

Some of the MOXy features included in this release are
- JAXB 2.2.0 certified
- JAXB without annotations using externalized mappings in XML
- 'Dynamic Persistence': XML Binding without Java classes.
...and more...

Some of the SDO features included in this release are
- Support for EclipseLink SDO usage with 'WebSphere' and 'JBoss'
... and more...

Some of the DBWS features included in this release are
- Support DBWSBuilder-generated JAX-WS Provider on JRockit
- Support for Eclipse WTP Dynamic Web Project structure

2.1.0 also includes bug fixes that focus on performance, scalability, and stability. There were well over 300 bugs and enhancement requests closed for this release.

For a full list of features, and download instructions please see http://wiki.eclipse.org/EclipseLink/Release/2.1.0 .

We would like to thank everyone involved in the development of this release.

Peter Krogh and Douglas Clarke

Monday, May 31, 2010

EclipseLink Summit 2010 Wrap Up


Last week we held our first EclipseLink Summit here in Ottawa with attendees from Canada, Germany, India, and the US. The principal goal of the summit was the exchange of technical information and ideas. We believe the event was a tremendous success!

We spent 2 days with committers leading technical sessions discussing areas from high level components and architecture to the detailed workings of EclipseLink's querying, caching, transactions, management, diagnostics, metadata processing, JPA 2.0 metamodel, and several other subsystems.

We would like to extend a big thank you to all of the committers who lead those sessions. The preparation time invested was obvious and the quality was amazing. We know it was tough to squeeze this additional work into your hectic pre-Helios schedules. The feedback from all attendees was excellent.

On the 3rd day of the Summit we focused more on the project itself. Starting with a talk from Jeff McAffer (EclipseSource) on OSGi and Eclipse RT technologies. We then discussed EclipseLink and OSGi, documentation, development process, build, testing and our road map planning.

While not all of these sessions allowed us to come to concrete conclusions the discussions were great and will hopefully carry on in our weekly committer meetings where we continue to improve our processes and refine our direction.

For those interested a more detailed summary of our Thursday sessions will be published to the eclipselink-dev@eclipse.org mailing list and topics requiring further discussion will be added to the weekly meeting agenda.

Thanks again to all the presenters and attendees. We are all looking forward to future EclipseLInk Summits where we can gather committers, contributors, and and users to share ideas and grow our community.

Your Summit Program Committee

Doug Clarke, Peter Krogh, and Shaun Smith

Friday, April 9, 2010

EclipseLink Summit 2010

In an effort to increase the community of committers and contributors with in-depth knowledge of EclipseLink we have decided to host a 3-day Summit. The goal of this Summit will be to exchange detailed technical information and discuss future direction for the project and its persistence services.

All interested parties are welcome to participate.

More info on Summit is available here.

Doug

Wednesday, June 24, 2009

EclipseLink in Galileo: Persistence at your fingertips


The Eclipse Galileo release signifies another important milestone for the EclipseLink project. The Galileo release makes EclipseLink 1.1.2 available and easier to use for the entire Eclipse community. Developers using the Java EE or Modeling Tools distributions of the Eclipse IDE will find EclipseLink included and available for use in Equinox OSGi, RCP, EMF, Java EE, and Java SE applications.

The EclipseLink 1.1.2 release includes a comprehensive set of persistence services:

  • EclipseLink JPA: Java Persistence API support for object-relational mapping with many advanced mapping, performance, and scalability features targeting Java EE, Java SE, and OSGi usage with Equinox specific extensions.
  • EclipseLink MOXy: Object-XML Binding (JAXB) support including advanced mappings, meet-in-the middle mapping without annotations, and pluggable parser support for optimal performance.
  • EclipseLink SDO: Service Data Objects 2.1.1 reference implementation including a Data Access solution for integrating JPA entities with SDO.
  • EclipseLink DBWS: Database Web Services solution enabling the generation of JAX-WS services based on relational metadata harnessing EclipseLink's JPA and MOXy capabilities.


EclipseLink for Java Developers


EclipseLink's inclusion in the Eclipse IDE for Java EE Developers combined with the extended support in WTP's Dali Java Persistence Tools project allows developers to start building JPA enabled applications quickly and easily. The Dali integration allows developers to optionally select EclipseLink as their JPA implementation and have it automatically added to their project classpath. This support along with Dali's rich validation and intelligent code assist provide a highly productive environment for developing, testing, packaging, and deploying JPA enabled applications.


EclipseLink for Modeling


The Eclipse Modeling Tools package of the Eclipse IDE includes the EclipseLink JPA feature and Teneo's EMF/EclipseLink integration. Teneo's EclipseLink support provides tools to generate JPA mappings from an EMF model or simply map their EMF models to a relational database. It also extends EclipseLink JPA with transparent runtime support for persisting EMF models. This out-of-the-box support for JPA persistence for EMF models will simplify the development of RCP and Equinox applications that leverage relational databases.

EclipseLink for RT


The EclipseLink project is also available as part of the Galileo update site under the EclipseRT Target Platform Components allowing developers to leverage P2 for provisioning of their Equinox (OSGi) environments. The provisioning allows developers to select the persistence services they require; JPA for object-relational, MOXy for Object-XML binding, or SDO for Service Data Object usage and have the necessary bundles downloaded and setup in their target platform environment.



Please download Galileo and try out the new EclipseLink capabilities. Provide us feedback on your experiences through our newsgroup.

The EclipseLink Team

Tuesday, April 7, 2009

SDO 2.1.1 (JSR-235) Releases with EclipseLink as the Reference Implementation

I am happy to announce that SDO 2.1.1 (JSR-235) has been approved by the JCP, and EclipseLink SDO is the reference implementation.


EclipseLink Download
http://www.eclipse.org/eclipselink/downloads/


Reference Implementation Download
http://www.eclipse.org/eclipselink/downloads/ri.php


SDO is a generic structure to represent data from many sources such as XML and relational databases, most commonly associated with SCA.
http://wiki.eclipse.org/EclipseLink/FAQ/WhatIsSDO


EclipseLink SDO was implemented as a thin layer on top of EclipseLink's object-to-XML layer (which is also the base for EclipseLink JAXB). EclipseLink SDO can be used alone, or as a means to expose POJOs as DataObjects so that components like EclipseLink JPA and JAXB can be used.

Accessing Relational Data as SDO DataObjects using JPA
http://wiki.eclipse.org/EclipseLink/Examples/SDO/JPA

Converting POJOs to/from SDO DataObjects using the POJO/SDO Bridge
http://wiki.eclipse.org/EclipseLink/Examples/SDO/JAXB



Thank you to all of the EclipseLink committers that contributed to the SDO component.

Wednesday, March 25, 2009

New EclipseLink Logo

We have wrapped up our EclipseLink logo contest and we have a winner.



Thanks to everyone who submitted a logo, commented on the submissions, or voted for their favorite. You can see the image in use on the home page.

www.eclipse.org/eclipselink

Doug

Thursday, March 12, 2009

EclipseLink 1.1.0 Released!

I am happy to announce that EclipseLink 1.1.0 is now available for download.

There are some useful links off of the download page including a 'getting started page', and the 'release notes' for 1.1.0.

As well as bug fixes, 1.1.0 introduces feature enhancements in the following areas:

DBWS
The first release of EclipseLink DBWS allows developers to easily and efficiently expose database constructs (tables, SQL, stored procedures).

JPA
EclipseLink 1.1.0 JPA support is extended to introduce:


  • a new 1:M mapping that doesn't require a back pointer or a separate join table to hold the associations.


  • TABLE_PER_CLASS Inheritance has been added giving greater flexibility in how your relational tables associate with the classes in a hierarchy.



SDO
This release of EclipseLink includes an implementation of SDO 2.1.1 (JSR 235). This implementation conforms to the final draft and is being included with the final draft as the reference implementation.

Peter Krogh and Doug Clarke

Tuesday, March 10, 2009

EclipseLink at EclipseCon

EclipseCon is fast approaching. It occurs between March 23 and March 26. There
are a number of sessions that would be of interest to EclipseLink users.

There is one tutorial:

Four talks:

Two BOFs:

We hope to see you there.

Wednesday, March 4, 2009

EclipseLink Logo Contest

We have just kicked off the EclipseLink Logo Contest to come up with an image we can use for the web, presentations, and other miscellaneous purposes. We are inviting all interested parties to both contribute ideas, provide feedback, and vote for their favorite.

We have had a variety of logos for TopLink over the years.



The first proposal is from one of our committers, Rick Sapir, connects us back to the original bridge between worlds logo. So far this is our only submission but definitely my favorite :)



All proposals will be posted to the contest page:

http://www.eclipse.org/eclipselink/logocontest/


To submit a proposal, provide feedback, or vote please use the bug link provided on the contest page.

Doug

Wednesday, October 29, 2008

EclipseLink 1.0.2 Released

A new EclipseLink release is now available for download. EclipseLink 1.0.2 is a patch release on the 1.0 stream, providing bug and usability fixes.

Please come and try it.

Tuesday, September 9, 2008

EclipseLink 1.0.1 Released

A new EclipseLink release is now available for download. EclipseLink 1.0.1 is a patch release on the 1.0 stream, providing bug and usability fixes.

Come by and try it out now.