[ 
https://issues.apache.org/jira/browse/OPENJPA-548?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Richard Zowalla resolved OPENJPA-548.
-------------------------------------
    Resolution: Fixed

Already fixed in an earlier release (6d8a58798); closing.

> Obtaining EntityManager with 
> createEntityManager(PersistenceContextType.EXTENDED)
> ---------------------------------------------------------------------------------
>
>                 Key: OPENJPA-548
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-548
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: docs
>    Affects Versions: 1.0.2
>            Reporter: Georgi Naplatanov
>            Priority: Minor
>
> The example from OpenJPA documentation "Example 3.1.  Interaction of 
> Interfaces Outside Container" does not compile.
> The following line is wrong:
> // get an EntityManager from the factory
> EntityManager em = 
> factory.createEntityManager(PersistenceContextType.EXTENDED);
> It's a good idea to be clear in the OpenJPA documentation:
>  The only way to obtain EntityManager with transaction persistence context is 
> to use these injected by the container.
>  There are two ways to obtain EntityManager with extended persistence context 
> within container:
>    - by factory, by invoking createEntityManager()
>    - injected within Stateful Session Bean with following annotation:
>                @PersistenceContext(type=EXTENDED)
>                EntityManager em;



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to