users@glassfish.java.net

RE: CDI _at_PersistenceContext not working when DAO/Bean in own Jar (GFv3)

From: Martin Gainty <mgainty_at_hotmail.com>
Date: Tue, 11 May 2010 11:11:49 -0400

were you able to create a persistence configuration?

http://docs.sun.com/app/docs/doc/820-4332/create-persistence-resource-1?l=en&n=1&a=view

 

after the persistence-resource is created what are you displayed with list-persisence-resources?

asadmin>list-persistence-resources terse=false


?
Martin Gainty
______________________________________________
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité

 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.



 

> From: dominik.dorn_at_gmail.com
> Date: Tue, 11 May 2010 15:28:09 +0200
> To: users_at_glassfish.dev.java.net
> Subject: Re: CDI @PersistenceContext not working when DAO/Bean in own Jar (GFv3)
>
> Ok, I tried the @Singleton trick, it still does not work.
>
> I attached the debugger to the classes and noticed that CDI/Weld does not
> detect that the class has any @PersistenceContext annotated field.
>
> this=org.jboss.weld.bean-/home/domdorn/work/lyrix.git/webapp/target/lyrix-webapp/-ManagedBean-class
> com.dominikdorn.lyrix.dao.Jpa2ArtistDao
> ejbInjectionPoints = []
> persistenceContextInjectionPoints = []
> persistenceUnitInjectionPoints = []
> resourceInjectionPoints = []
> specializedBean = null
> injectableFields = 2
> [0] = an empty hashset
> [1] = an empty hashset
>
> I've attached the java source files + persistence.xml
>
> Thanks for your help.
> Dominik
                                               
_________________________________________________________________
The New Busy is not the too busy. Combine all your e-mail accounts with Hotmail.
http://www.windowslive.com/campaign/thenewbusy?tile=multiaccount&ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_4