On Nov 24, 2007, at 6:45 PM, openejber wrote:


my replies were kept blocked last couple of days....

indeed, i'd like to see a JPA example below,

- a non-servlet normal unit test class looking up and casting an ejb bean's local proxy object(namely OPENEJB IntraVM mode?), which does CRUD on an
entity
- a local ejb interface defining CRUD methods
- a bmt-ejb bean injected with the persistence context consisting of that
entity, and the bean implementing that ejb interface
- finally, the entity class itself

Have a new example here that shows JPA usage. Ant and Maven build scripts included.

http://svn.apache.org/repos/asf/openejb/trunk/openejb3/examples/injection-of-entitymanager/

It shows a Stateful bean using an EntityManager with EXTENDED persistence type so the entities won't detach between calls to the Stateful bean as they would if when using TRANSACTION (i.e. jta scoped) persistence.

-David

Reply via email to