Friday, March 15, 2013

EJB Lite feature supports JPA in Liberty Beta

The WebSphere V8.5.Next Liberty Profile Alpha gave us a first look at a new EJB Lite (ejblite-3.1) feature for the WebSphere Liberty profile.  If you use EJB session beans to drive your persistence layer you may have been disappointed since the EJB Lite capability in the Alpha didn't include support for JEE-style use of JPA with EJBs.  Attempts at injecting or lookup of JPA entity managers and/or factories within an EJB resulted in an exception.  The use of JPA with Java SE style bootstrapping (Persistence.createEntityManagerFactory()) may have worked if you happened to be using resource local transactions and connection properties (rather than server defined data sources).  This was not an ideal or typical configuration in the application server environment.

But, enough about the Alpha!  I'm happy to report that the recent WebSphere V8.5.Next Liberty Profile Beta includes a major bump in EJB Lite functionality, including integration with JPA.  This integration includes all you might expect, container managed persistence, enlistment in JTA transactions, and support for extended persistence contexts.  The WebSphere Development Tools for Eclipse Beta 9 on top of Eclipse WTP makes it a piece of cake to create new or modify existing EJB and JPA applications.  To enable EJB and JPA in the Liberty Beta just add this feature set to your server.xml (include any other features you may require):
  <featuremanager>
    <feature>ejblite-3.1</feature>
    <feature>jpa-2.0</feature>
  </featuremanager>

Check it out!

-Jeremy

3 comments:

Sqiar BI said...

Thank you very much for this article, it is so rare to see nowadays written as fervently article. I enjoyed reading it and I learned a lot of things. I will go and continue reading your blog =). Good luck for the future and another one for the quality of it.You can also check out this (http://www.sqiar.com).

kanchana said...

There are lots of information about latest technology and how to get trained in them, like this have spread around the web, but this is a unique one according to me. The strategy you have updated here will make me to get trained in future technologies. By the way you are running a great blog. Thanks for sharing this.
Android training in chennai

Breanna Pena said...

Hi,

The bigger issue that we need to concern ourselves with is whether or not we have the need for an email database in order to become effective IBM Websphere Email Database in our email marketing