hi gernot,

i would say: don't rely on the eclipse-plugin. at least some months ago it
showed a lot of wrong findings in a demo which works pretty fine (with owb
as well as weld).
you can find a working example e.g. at [1]

regards,
gerhard

[1]
http://code.google.com/a/apache-extras.org/p/myfaces-codi-examples/source/browse/community/

http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces



2011/8/1 Gernot <[email protected]>

> I tried "Using one (default) Entity Manager"
> (https://cwiki.apache.org/confluence/display/EXTCDI/JPA+Usage):
> public class DataBaseProducer
> {
>    @Produces
>    @PersistenceContext(unitName="default")
>    @Default
>    private EntityManager entityManager;
>
>    public void dispose(@Disposes @Default EntityManager entityManager)
>    {
>        if(entityManager.isOpen())
>        {
>            entityManager.close();
>        }
>    }
> }
>
> This does not work - I get following error at "@Disposes" in eclipse:
> "There is no producer method declared by the (same) bean class that is
> assignable to the disposed parameter of a disposer method [JSR-299
> ยง3.3.7]"
>
> Whats wrong?
>
> thx, gernot
>

Reply via email to