Defining data sources for entity beans

An application that is installed on an application server must have bindings defined before you can start the application. The Enterprise JavaBeans (EJB) references and resource references that are defined in the application must be bound to the actual enterprise beans or resources that are defined in the application server.

Before you begin

Create a data source or JDBC resource and give it a Java™ Naming and Directory Interface (JNDI) name.

About this task

For more information, see the topic Application bindings.

Before you do this task, it is assumed that the entity beans in your application are container-managed persistence (CMP) enterprise beans.

Note: The EJB container handles the persistence of the bean attributes in the underlying persistent store. Specify which data store is used by binding an EJB module or individual EJB to a data source.

If you bind an EJB module to a data source, all beans in that module use the same data source for persistence. If you specify the data source at the bean level, then that data source is used instead.

See the assembly tool documentation for the steps on how to complete this task.