Skip to main content
Book cover

Pro EJB 3 pp 17–34Cite as

Getting Started

  • Chapter
  • 371 Accesses

Summary

In this chapter we discussed just enough of the basics of the Java Persistence API to develop and run a simple application in a Java SE runtime.

We started out discussing the entity, how to define one, and how to turn an existing Java class into one. We discussed entity managers and how they are obtained and constructed in the Java SE environment.

The next step was to instantiate an entity instance and use the entity manager to persist it in the database. After we inserted some new entities, we were able to retrieve them again and then remove them. We also made some updates and ensured that the changes were written back to the database.

We talked about the resource-local transaction API and how to use it. We then went over some of the different types of queries and how to define and execute them. Finally, we aggregated all of these techniques and combined them into a simple application that we can execute in isolation from an enterprise environment.

In the next chapter, we will look at the impact of the Java EE environment when developing enterprise applications using the Java Persistence API.

This is a preview of subscription content, log in via an institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   34.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   44.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Peter C. Chen, “The entity-relationship model—toward a unified view of data,” ACM Transactions on Database Systems 1, no. 1 (1976): 9–36.

    Article  Google Scholar 

Download references

Rights and permissions

Reprints and permissions

Copyright information

© 2006 Mike Keith and Merrick Schincariol

About this chapter

Cite this chapter

(2006). Getting Started. In: Pro EJB 3. Apress. https://doi.org/10.1007/978-1-4302-0168-7_2

Download citation

Publish with us

Policies and ethics