users@glassfish.java.net

Re: CDI Instances and EJB and Glassfish

From: <glassfish_at_javadesktop.org>
Date: Sun, 18 Jul 2010 03:38:33 PDT

Yes, I'm using Instance<T> for the same purpose and it works fine with me.

Not sure if this is just an omission in your post or actually an omission in your code: Do you actually @Inject your Instance<T>?

@Inject
private Instance<DAO> dao;


If it's not that, I would suspect either the EAR packaging or the two interfaces (DAO and Session) - at least these are the main differences from my use case.

HTH,

Harald
[Message sent by forum member 'hwellmann']

http://forums.java.net/jive/thread.jspa?messageID=477889