FAQ has been edited by David Blevins (Sep 01, 2005).

(View changes)

Content:

Container-Managed Persistence

What engine does OpenEJB use for CMP?

In versions 1.0 and before, OpenEJB uses Castor JDO for CMP persistence. The CMP config files are all Castor controlled files (http://www.castor.org). At the moment, most of the real juicy CMP configuration file information is at the Castor site. There is no difference between configuring a CMP EntityBean in OpenEJB than with any other Castor controlled java object, so anything you learn about Castor's config files will be applicable.

What is the format for the CMP mapping files?

The Castor JDO mapping file provides a mechanism for binding a CMP EntityBean deployed in OpenEJB to a relational database model. This is usually referred to as object-to-relational mapping (O/R mapping). O/R mapping bridges the gap between an object model and a relational model.

What is the syntax of OQL?

The syntax of the query statement must be Object Query Language (OQL) compatible as described in the ODMG 3.0 specification section 4.12. OQL is nearly identical to EJB QL, so converting CMP beans from 1.1 to 2.0 will be very easy.

OQL itself is parsed by our persistence engine Castor, see this document for more details on writing OQL statements for use with OpenEJB and Castor. More information on that here

Common Errors

Cannot find container "FOO" for bean "BAR"

When a bean gets deployed in OpenEJB, it gets associated with a particular container. Subsequently, that container may not be configured in that instance of the server. When the server loads the Jar with the deployed beans, it places beans in the containers that the beans were configured with. Here, the bean BAR wants to go into the container FOO, which is not currently configured.

This message is displayed when the server is starting up.

Cannot find bean "FOO" referenced by bean "BAR".

When a bean gets deployed in OpenEJB, it may contain references to other beans. Subsequently, those beans may not be configured in that instance of the server. When the server loads the Jar with the deployed beans, it stores those references to those beans. Here, the bean BAR references FOO, which is not currently configured in the JNDI namespace.

This message is displayed when the server is starting up.

This message is usally the result of a deployment descriptor that has been created by hand

What spec version does OpenEJB support?

OpenEJB supports the Enterprise JavaBeans 1.1 specification.

Does OpenEJB support Local interfaces?

Local Interfaces are supported as of 1.0 beta1.

Prior to 1.0, the local interface capabilities were in place. You can instruct the container system to treat all calls made between beans as EJB 2.0 Local calls by using the flag --local-copy=false when you start the server. Here is an example:

./openejb.sh start --local-copy=false

Details on other startup flags are here

Reply via email to