users@glassfish.java.net

Re: resource injection doesn't seem to be working...

From: Sahoo <Sahoo_at_Sun.COM>
Date: Thu, 19 Jul 2007 15:01:15 +0530

Yes, you are right, directly using the global JNDI name is not a good
practice, but let's solve one problem at a time. Where are you trying to
inject the Session? Is it a managed component like a Servlet or not?

-- Sahoo

glassfish_at_javadesktop.org wrote:
> Hi,
>
> using the resource directly is not a very good way to do things in my opinion. I like the indirection the local JNDI name and the mapped name gives me.
>
> I tried using both name and mappedName. I even tried declaring both the name in the web.xml and the mappedName in the sun-web.xml to have everything covered but it didn't work.
>
> In my opinion, the web.xml and sun-web.xml should be injected with the values during the deployment and I should not have to do it myself. But, when I inspected both deployment files of the deployed application in the admin console, no injection had happened. I don't know if this is because it's normal and not the way the injection is working or if the injection should take place and didn't.
>
> greets
> jeremie
> [Message sent by forum member 'granat' (granat)]
>
> http://forums.java.net/jive/thread.jspa?messageID=227241
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>