16.10.2015 Views

Getting Started with WebSphere Application Server

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

98 <strong>Getting</strong> <strong>Started</strong> <strong>with</strong> <strong>WebSphere</strong> <strong>Application</strong> <strong>Server</strong> Community Edition<br />

You can create JPA entities <strong>with</strong>in an EJB project, so that JPA entities can be included in<br />

an EJB jar package. To successfully deploy JPA entities, you need to provide another<br />

configuration file named persistence.xml. This file is located in META-INF, together<br />

<strong>with</strong> openejb-jar.xml.<br />

In Community Edition, you have to specify some parameters in this file so that Community<br />

Edition can find your entities. Listing 5.10 provides an example of the persistence.xml<br />

template.<br />

<br />

<br />

JPA provider class name<br />

Description information here<br />

JNDI name of Data source <br />

Jar file name of persistence unit<br />

persistence class<br />

<br />

<br />

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!