users@glassfish.java.net

How can I use _at_EJB to get an instanceof EJB in my class?

From: <glassfish_at_javadesktop.org>
Date: Thu, 01 Mar 2007 18:29:48 PST

I can get an instance of EJB in servlet via @EJB annotation .
but this does not work in my own class such as :

public class Util {
  @EJB
  private MySessionBean bean;
  
}

why and how ?
I'm using glassfish v2 m4 now .

thanks !
[Message sent by forum member 'ludongping' (ludongping)]

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