Subscribe
Tutorial search

EJB 3.0 Persistence out of a J2EE container - Java tutorial


In this article we will learn how to manage the persistence issues without being tied to use a J2EE application server.
We will build a very basic sample application that saves and loads data on a database using an EJB 3.0 persistence implementation.

At present (April 2007) there exist two implementations of the EJB 3.0 persistence specification: the first is Hibernate-based and was adopted by JBoss, while the other is Oracle Toplink, included into the Oracle Application Server OC4J and into the EJB 3.0 Sun Reference Implementation also known as Glassfish Project .
Note that EJB 3.0 persistence specifications are only a part of the EJB 3.0 specifications. They do not deal with Session Beans (stateless or stateful), but only with the Entity Beans.
Well, the good news is that, as long as we need only the EJB 3.0 persistence layer and do not need Session Beans, we can use Hibernate or Toplink implementation (our choice!) just into any Java application, without the need of a J2EE container, not even a web server, just from a plain Java class!

Category: Java > EJB - Difficulty:


More cool Java tutorials:



Struts Hibernate Integration
Struts Hibernate Integration
In this tutorial we will show how the Web Framework Struts and the Database Persistence Solution Hibernate can be used together.
Difficulty:
How to Style Cool Text with JavaFX 2 and CSS
How to Style Cool Text with JavaFX 2 and CSS
In this tutorial I am styling three text nodes, so it's tutorial about how to style text with JavaFX 2 and CSS.
Difficulty:
Half Dozen Hello Worlds Part 1 – Your First Android Project
Half Dozen Hello Worlds Part 1 – Your First Android Project
Half Dozen Hello Worlds explores different forms of Android I/O through six simple programs. Part 1 gets you creating your first android program and using a simple widget to display “Hello World” to the user.
Difficulty:
Explore refactoring functions in Eclipse JDT
Explore refactoring functions in Eclipse JDT
This article describes the various refactorings available in Eclipse Java Development Tools (JDT), including what each refactoring does, when to use it, and how to use it. It also explores the refactoring script functionality in Eclipse, which allows library developers to share code refactorings with their clients.
Difficulty:
Create a pureQuery Application using Spring
Create a pureQuery Application using Spring
Spring is an open source Java/J2EE application framework that offers higher level data access features like transaction management, resource management, and Data Access Object hierarchies. This tutorial guides you in creating a pureQuery application that uses the Spring Framework's Data Access features. Integrating Spring with pureQuery leads to simpler application development and maintenance experience.
Difficulty: