Chapter 9. EJB and Spring Context

In this chapter, we will discuss how to integrate Hibernate in two popular contexts, EJB and Spring. The EJB context is part of the Java Enterprise Edition (JEE) specifications, and Spring is an open source context that is highly popular because it simplifies working in a JEE environment by adding a thin layer.

  • Deployment:
    • Configuration
    • Resource
    • Transactions
    • Hibernate libraries
  • EJB:
    • Persistence unit
    • Server resources
    • Entity manager
    • Transactions
  • Spring:
    • Configuration
    • Transaction management
    • Data source
    • Session factory

Deployment

When deploying an application that uses Hibernate, you will most likely have to perform configuration steps to complete the deployment. This is because, in various contexts, the application server or the ...

Get Mastering Hibernate now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.