+

Search Tips   |   Advanced Search

Define data sources for entity beans


Before an application that is installed on an appserver can start, all EJB references and resource references defined in the application must be bound to the actual enterprise beans or resources defined in the appserver.

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

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

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

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

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


Application bindings