Friday Aug 30, 2013

JPA vs. Hibernate?

Whether to use standard vs. non-standard APIs is always a constructive ongoing tug-of-war (well, most of the time anyway). It seems that the tug-of-war is particularly fierce when it comes to anything open source. That's quite unfortunate as open source and open standards should be ideological brothers-in-arms - but then we all know feuds tend to be the worst amongst blood relatives :-). One facet of this debate that seems pervasive and persistent is whether to use Hibernate's legacy non-standard APIs or standard JPA.

Key Hibernate developer Emmanuel Bernard of Red Hat offers his insights on the matter on an audio interview with TSS (TheServerSide) chief editor Cameron McKenzie (spoiler: it's not an either/or proposition :-)). If the past few years is any indicator, this won't settle the war of words, but at least it might be a good bit of input for those interested....

Enjoy!

Friday Jun 28, 2013

Servlet 3.1, Expression Language 3.0, Bean Validation 1.1, Admin Console Replay: Java EE 7 Launch Webinar Technical Breakouts on YouTube


As stated previously (here, here, here, and here), the On-Demand Replay of Java EE 7 Launch Webinar is already available. You can watch the entire Strategy and Technical Keynote there, and all other Technical Breakout sessions as well.

We are releasing the final set of Technical Breakout sessions on GlassFishVideos YouTube channel as well. In this series, we are releasing Servlet 3.1, Expression Language 3.0, Bean Validation 1.1, and Admin Console.

Here's the Servlet 3.1 session:



Here's the Expression Language 3.0 session:



Here's the Bean Validation 1.1 session:



And finally the Admin Console session:



Enjoy watching all of them together in a consolidated playlist:


And don't forget to download Java EE 7 SDK and try the numerous bundled samples.

Tuesday Jun 25, 2013

JSF 2.2, Interceptors 1.2, and JPA 2.1 Replay: Java EE 7 Launch Webinar Technical Breakouts on YouTube


As stated previously (here, here, and here), the On-Demand Replay of Java EE 7 Launch Webinar is already available. You can watch the entire Strategy and Technical Keynote there, and all other Technical Breakout sessions as well.

We are releasing the next set of Technical Breakout sessions on GlassFishVideos YouTube channel as well. In this series, we are releasing JSF 2.2, Interceptors 1.2, and JPA 2.1.

Here's the JSF 2.2 session:



Here's the Interceptors 1.1 session:



Here's the JPA 2.1 session:



Enjoy watching them over the next few days before we release the next set of videos!

And don't forget to download Java EE 7 SDK and try numerous bundled samples.

Friday May 31, 2013

Java EE@JeeConf 2013

JeeConf 2013 was held in historic Kiev on May 24-25. JeeConf is the most significant Java conference in the Ukraine. The conference attracted a bevy of local and international speakers including Venkat Subramaniam, Yakov Fain, Talip Ozturk, Jacek Laskowski, Mohamed Taman and Sander Mak. Topics included Java SE, NoSQL, cloud, HTML5/JavaScript, Arquillian and of course Java EE.

I delivered two very well attended talks - my talk on Java EE 7 (our flagship talk) and a talk on using NoSQL databases in Java EE. More details on the sessions and JeeConf, including the slide decks and code, posted on my personal blog.

Tuesday Apr 02, 2013

Generic JPA DAO/Repository Implementation

The DAO (aka Repository in Domain-Driven Design parlance) is a pervasive design pattern in server-side applications today. If you have a very large number of DAOs that are fairly homogenous/CRUD based, it can be very useful to have a generic version that you can then subclass as needed. German author and celebrated Java EE advocate Adam Bien actually took the time to create generic JPA based DAO code and generously share it with us all.

I encourage you to take a look and discuss the code, preferably with Adam (or here if you wish). If you are the open source hacker sort, you could even consider giving the code more airtime by adding it to a separate project perhaps under something like Apache DeltaSpike.

Thursday Mar 07, 2013

Java EE@DevNexus 2013

DevNexus 2013 was held in Atlanta on February 18-19. For those unaware, Organized by the Atlanta JUG, DevNexus is the most significant Java conference in the South Eastern US. As usual, DevNexus attracted a bevy of world class speakers including Ben Evans, Neal Ford, David Geary and Venkat Subramaniam.

I delivered two full-house Java EE sessions - one on Java EE 7 (our flagship talk) as well as a session on using NoSQL in Java EE via JPA and CDI. More details on the sessions and DevNexus, including slide decks and code examples, posted on my blog.

Monday Mar 04, 2013

A JPA Facade for Neo4j

NoSQL is obviously a hot topic in the enterprise these days, at least at the water cooler if not in the production data center just yet. Naturally, the question of how to use NoSQL databases in Java EE applications (specifically existing Java EE 5 and Java EE 6 applications) comes up all too often. As it so turns out there are a number of very interesting initiatives out there to radically simplify the usage of NoSQL databases in Java EE applications by creating JPA based facades over them. Such efforts include EclipseLink NoSQL, Hibernate OGM, EasyCassandra and the like.

Amresh Singh, a core contributor of one such project, Kundera, recently wrote a pretty insightful blog post on creating a JPA facade over the popular graph database Neo4j (Kundera already supports Cassandra, HBase, MongoDB, Redis, etc). It's an interesting read - Amresh talks about the challenges and design decisions behind such an inherently intricate effort.

Incidentally, I recently presented at DevNexus on the topic of using NoSQL in Java EE via JPA and CDI. Stay tuned for that trip report, slide deck and code examples...

Monday Jan 14, 2013

Java EE 7 in Public Review!

Java EE 7 has turned the last lap and is racing towards the finish line! The Java EE 7 JSR itself (JSR 342) very recently published it's official Public Review Draft. The review closes on February 11th so act fast, read the draft spec and send your feedback. The draft is available here. After the review is over, the JSR will go to the EC ballot.

And Java EE 7 is not the only one. As this JSR update from the JCP indicates, the review periods for JMS 2, Java EE Concurrency, WebSocket, JPA 2.1 and JSON-P are still open but will be coming to an end rapidly in the next few weeks.

Thursday Jun 28, 2012

EclipseLink 2.4 Released: RESTful Persistence, Tenant Isolation, NoSQL, and JSON

EclipseLink 2.4 is released as part of Eclipse Juno release train. In addition to providing the Reference Implementation for JPA 2.0, the key features in the release are:

  • RESTful Persistence - Expose Java Persistence units over REST using either JSON or XML
  • Tenant Isolation - Manage entities for multiple tenants in the same application
  • NoSQL - NoSQL support for MongoDB and Oracle NoSQL
  • JSON - Marshaling and unmarshaling of JSON object
Eclipse Link 2.4

Here is the complete list of bugs fixed in this release. The landing page provide the complete list of documentation and examples. Read Doug Clarke's blog for a color commentary as well.

This release is already integrated in the latest GlassFish 4.0 promoted build.

Try the functionality and give us feedback at GlassFish Forum or EclipseLink Forum.

Monday Apr 09, 2012

JPA and NoSQL using EclipseLink - MongoDB supported

EclipseLink 2.4 has added JPA support for NoSQL databases, MongoDB and Oracle NoSQL are the first ones to make the cut. The support to other NoSQL database can be extended by adding a EclipseLink EISPlatform class and a JCA adapter.

EclipseLink and NoSQL

A Java class can be mapped to a NoSQL datasource using the @NoSQL annotation or <no-sql> XML element. Even a subset of JPQL and the Criteria API are supported, dependent on the NoSQL database's query support. The connection properties are specified in "persistence.xml".

A complete sample showing how JPA annotations are mapping and using @NoSQL is explained here. The MongoDB-version of the source code can also be checked out from the SVN repository.

EclipseLink 2.4 is scheduled to be released with Eclipse Juno in June 2012 and the complete set of supported features is described on their wiki. The milestone and nightly builds are already available.

Do you want to try with GlassFish and let us know ?

Friday Mar 09, 2012

Tab Sweep - Upcoming JPA in NetBeans, JCP voting, Java EE and more....

Recent Tips and News on Java, Java EE 6, GlassFish & more :

Radio Receiver

Inside Oracle's Java Magazine (YouTube)
NetBeans JPQL and named queries support (NetBeans.org)
JSR 356 WebSocket Review Ballot results (jcp.org)
Why we vote “Yes” for JSR 331, JSR 354 and JSR 355 (London Java Community)
QCon Report - Day One (JAXenter)
JavaEE6 and the Ewoks (Developer Chronicles)
How to Create a New JSF Project (Pack Publishing)

Thursday Jan 26, 2012

What's up with EclipseLink?

EclipseLink's Shaun Smith has recently been delivering a number of presentations on the status and future of the open source project. If you're curious about where innovative JPA projects are going, then you should check out this slide deck from Shaun.

ALT_DESCR

Here are the main themes covered:

REST: integration with JAX-RS to access relational data through REST with HTML 5 as the primary client with possibly JPA entities and persistence units defined via metadata with dynamic provisioning (i.e. no Java coding required).
EclipseLink NoSQL: annotations (@NoSql) and XML to identify NoSQL stored entities with initial support for MongoDB and Oracle NoSQL.
Multitenancy: already present in the shipping version of EclipseLink using the @Multitenant annotation and supporting different topologies with dedicated or shared application and/or database.

Next stop: EclipseLink 2.4 along with the June Juno Eclipse Release.