Showing posts with label Liberty. Show all posts
Showing posts with label Liberty. Show all posts

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

Wednesday, May 9, 2012

OpenBooks sample works with new WebSphere Liberty Profile!

There is an exciting new feature in WebSphere Application Server v8.5 called the Liberty Profile.  The Liberty Profile provides a new, sleek, highly-efficient application server environment both for development and production use.  You can find out more details about Liberty on WASdev Home.

For those of you that joined me at Impact 2012 last week, I mentioned in my JPA presentation that I had attempted to deploy OpenBooks to a Liberty Profile server on the plane to Vegas.  With just a couple of modifications to my configuration, I was able to get OpenBooks up and running in no time.  But, I needed to update the OpenBooks instructions before going "public" with the information.

I have now completed the updates to the OpenBooks sample and associated instructions.  In addition to making the necessary configuration updates to run the OpenBooks application on Liberty, I also updated a few other build, install, and execution issues.  You can now build and execute the OpenBooks sample in JSE mode and two JEE environments -- WebSphere Application Server, and the new Liberty Profile.  Enjoy!