user manual
Chapter 14: Entity Beans and CMP 1.1 in Borland Enterprise Server 135
Container-Managed Persistence in Borland Enterprise Server
For the where clause, specify multiple field names in the same manner that
you specify single field names. Use "and" to separate each field. The format is
<column> = :<parameter>[ejb/<entity bean>]
Note that the equal (=) sign is one of several possible notations. You could
also specify greater than (>), less than (<), greater than or equal (>=), or less
than or equal (<=). The colon (:) notation indicates parameter substitution. The
parameter field is specified with the bean name first, followed by a dot (.), then
the bean attribute.
For example, to find all students taking Art 205, Renaissance Art where
classes are identified by the department (Art) and the course number (205),
you might have the following select statement defined for the finder method
findByCourse():
SELECT sname FROM Enrollment WHERE course_department = :c.department[ejb/
Course] AND
course_number = :c.number[ejb/Course]
You can also have the select statement return multiple fields from a compound
key. In the select clause of the select statement, list the fields, separated by
commas. Note that you use the same dot notation as for parameters; that is,
specify the entity bean name, followed by a dot (.), then the attribute name.
For example, the finder method findByStudent() can have the following select
statement:
SELECT c.department, c.number FROM Entrollment WHERE student_name = :s
Reentrancy
By default, entity beans are not reentrant. When a call within the same
transaction context arrives at the entity bean, it causes the exception
java.rmi.RemoteException to be thrown.
You can declare an entity bean reentrant in the deployment descriptor;
however, take special care in this case. The critical issue is that a container
can generally not distinguish between a (loopback) call within the same
transaction and a concurrent invocation (in the same transaction context) on
that same entity bean.
When the entity bean is marked reentrant, it is illegal to allow a concurrent
invocation within the same transaction context on the bean instance. It is the
programmer's responsibility to ensure this rule.
Container-Managed Persistence in Borland Enterprise Server
The Borland Enterprise Server's EJB Container is fully J2EE 1.3 compliant.
The bean provider designs persistence schemas for their entity beans,
determined the methods for accessing container-managed fields and
relationships, and defines these in the beans' deployment descriptor. The










