Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

Overview

Span
stylefloat: right; margin-left: 20px;

HTML

Div

Shows use of

@Resource

@PersistenceContext to have an EntityManager with an EXTENDED persistence context injected into a @Stateful bean. An EJB 3 @Entity bean is used with the EntityManager to create, persist and merge data to a database.

If you need to use a TRANSACTION persistence context, see this example.

The source for this example is in the "injection-of-entitymanager" directory located in the openejb-examples.zip available on the download page.

Div
styleclear:both;

The Code

The Stateful bean

...