dev@glassfish.java.net

Re: How to access Habitat from a Web Application?

From: kedar <Kedar.Mhaswade_at_Sun.COM>
Date: Mon, 19 Oct 2009 15:26:32 -0700

Alternatively, you can always use the Globals class that's available
as an *internal-api*.

But really speaking, when you want something like this, you should
see if you can use HK2 as a generic dependency injection mechanism.

-Kedar

Jason Lee wrote:
> You might look in admingui/common/.../GuiUtil.java at line 603 and
> following. I can't explain what's going on there, but it sounds like a
> good place to start. :)
>
> On Oct 19, 2009, at 4:55 PM, Byron Nevins wrote:
>
>> I want to use an object that is inside the Habitat in V3 -- from my
>> web app. I don't need to @Inject -- I just want to get a reference to
>> the Habitat.
>> Has anyone done this? Any tips/ideas?
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>> <mailto:dev-unsubscribe_at_glassfish.dev.java.net>
>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>> <mailto:dev-help_at_glassfish.dev.java.net>
>>
>
> <http://www.java.com> * Jason Lee *
> Senior Java Developer
> GlassFish Administration Console
>
> *Sun Microsystems, Inc.*
> Phone x31197/+1 405-343-1964
> Email jasondlee_at_sun.com <mailto:jasondlee_at_sun.com>
> Blog http://blogs.sun.com/jasondlee
> Blog http://blogs.steeplesoft.com
>
>