14 diciembre 2008

Entity beans

2.3. Entity beans

Entity beans may be bound to a context variable and function as a seam component. Because
entities have a persistent identity in addition to their contextual identity, entity instances are
usually bound explicitly in Java code, rather than being instantiated implicitly by Seam.
Entity bean components do not support bijection or context demarcation. Nor does invocation or
an entity bean trigger validation.

Entity beans are not usually used as JSF action listeners, but do often function as backing
beans that provide properties to JSF components for display or form submission. In particular,
is common to use an entity as a backing bean, together with a stateless session bean action
listener to implement create/update/delete type functionality.

By default, entity beans are bound to the conversation context. They may never be bound to the
stateless context.

Note that it in a clustered environment is somewhat less efficient to bind an entity bean directly
to a conversation or session scoped Seam context variable than it would be to hold a reference
to the entity bean in a stateful session bean. For this reason, not all Seam applications define
entity beans to be Seam components.

No hay comentarios: