Visit our blog

News & Events

Oracle Article Blitz: How-To : Using EJB 3.0 and Java Persistence API with Spring in OC4J

How-To : Using EJB 3.0 and Java Persistence API with Spring in OC4J, by Debu Panda, is an article which show an application combining the use of Spring Framework, Java Persistence API (JPA), and EJB 3.0 Sesion beans.  

The Oct. 2006 Oracle monthly newsletter for Java developers is dedicated to Spring framework, and this is just one article linked to from this issue of the newsletter.

From the introduction: This example application demonstrates Oracle's support for Spring with EJB 3.0 Session beans, and a container-managed entity manager with Spring's JpaTemplate. This sample uses a Spring-enabled EJB 3.0 Session bean (EmployeeFacade EJB) that uses a Spring bean(EmployeeService bean). The Spring bean uses a Data Access Object (EmployeeDAO) that uses Spring's JpaTemplate to manipulate entities. The persistence unit is managed by the EJB container by using a container-managed entity manager and passing it to Spring using setter injection. The application uses declarative transaction with EJB 3.0. For simplicity and to demonstrate the dependency injection support in the web container we have used a Servlet (InsertServlet) as a controller and it uses dependency injection to inject an instance of EmployeeFacade. 

 

 

Upcoming Training

Newsletter Subscription

Our monthly newsletter is packed full of techniques, tutorials, tips and tricks to get you on your way to Spring nirvana. View Archive