mardi juin 28, 2011

JPA/EclipseLink multitenancy screencast

This blog has moved to alexismp.wordpress.com
Follow the link for the most up-to-date version of this blog entry.

I find JPA and in particular EclipseLink 2.3 to be particularly well suited to illustrate the concept of multitenancy, one of the key PaaS features en route for Java EE 7.

Here's a short (5-minute) screencast showing GlassFish 3.1.1 (due out real soon now) and its EclipseLink 2.3 JPA provider showing multitenancy in action. In short, it adds EclipseLink annotations to a JPA entity and deploys two identical applications with different tenant-id properties defined in the persistence.xml descriptor. Each application only sees its own data, yet everything is stored in the same table which was augmented with a discriminator column.

For more advanced (or more realistic) uses such as tenant property being set on the @PersistenceContext, XML configuration of multitenant JPA entities, and more check out the nicely written wiki page.

lundi nov. 03, 2008

SDPY - Java Persistence

Three years ago, the Java persistence ecosystem was undergoing big changes. Three years later, JDO as an API is an old story and vendors have morphed into JPA, SDO, etc. TopLink Essentials became EclipseLink, WebSphere is now using OpenJPA, Oracle is replacing TopLink in Oracle WebLogic and JBoss is still the only one shipping with Hibernate.

mercredi oct. 29, 2008

Hibernate in GlassFish - Reloaded

This is a recurring question on the GlassFish forums and mailing lists: "How do can I use Hibernate as a JPA provider in GlassFish?". Mitesh has had this post on the subject up for a little while (some more here) but with the recent release of Hibernate 3.4 made it a little trickier to integrate into GlassFish (NoClassDefFoundError of ReflectionManager seems like a common pattern). Sun's Marina Vatkina has provided an updated list of the JARs needed in the glassfish/lib directory to run Hibernate in GlassFish v2 as a comment to Mitesh's post.

For the record, here are the JAR files required from hibernate-entitymanager-3.4.0.GA and hibernate-distribution-3.3.1.GA :
• antlr-2.7.6.jar
• commons-collections-3.1.jar
• dom4j-1.6.1.jar
• ejb3-persistence.jar
• hibernate-annotations.jar
• hibernate-commons-annotations.jar
• hibernate-entitymanager.jar
• hibernate3.jar
• javassist.jar
• jta-1.1.jar
• log4j.jar
• slf4j-api-1.5.2.jar
• slf4j-log4j12.jar
(from hibernate-entitymanager-3.4.0.GA/lib/test).

dimanche déc. 09, 2007

Poll - Which JPA provider

With three implementations, all open source, I'm curious as to which JPA implementation you are using, so I've started the poll on the right hand side a couple of days back. I imagine some people will chose one of the answers even if they're not using JPA, but that's fine, this poll is far from being scientific in the first place.

lundi nov. 05, 2007

SDPY - JPA

Two years ago, I was commenting on the JPA evolution. 24 months mater, Hibernate is still a very vibrant community, but interestingly enough it's not the default in any Java EE 5 application server (at least until JBoss 5 releases). Clearly developers do use JPA outside the container (for batch or Swing applications), BEA/SolarMetric donated openJPA, and WebSphere "Classic" is still not reported as supporting Java EE 5...

About

This blog has moved

Alexis Moussine-Pouchkine's Weblog

GlassFish - Stay Connected

Search

Archives
« avril 2014
lun.mar.mer.jeu.ven.sam.dim.
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
    
       
Today
Blogroll

No bookmarks in folder

News

No bookmarks in folder