users@glassfish.java.net

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

From: Sanjeeb Kumar Sahoo <Sanjeeb.Sahoo_at_Sun.COM>
Date: Fri, 02 Mar 2007 12:08:52 +0530

All the kinds of classes mentioned in that table in Java EE spec are
user defined classes like your Util.class. What you need to do is to
make your Util.class a managed class. e.g., if it is part of a web
application, you make it an EventListener or a ServletFilter or a JSF
bean. If it is part of an EJB app, then you can make Util.class an
interceptor etc.

If you don't want to do anything like the above, then you can get hold
of an EJB using JNDI API in any class you like instead of relying on
injection.

Thanks,
Sahoo

glassfish_at_javadesktop.org wrote:
> But is it impossible to use injection in my own Util class ?
> or how to achieve this?
>
> Thanks!
> [Message sent by forum member 'ludongping' (ludongping)]
>
> http://forums.java.net/jive/thread.jspa?messageID=205948
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>