Instead of causing more confusion by guessing, I cc:ed Pete Muir who
is the RI project manager, perhaps he can shed some light on the
issue.

On Thu, Feb 5, 2009 at 1:48 AM, Mark Struberg <[email protected]> wrote:
> Thanks for your comment Nicklas!
>
> I didn't look at the RI implementation side that closely, because this 
> shouldn't become a copy & past lesson ;)
>
> What I've learned from the link you've posted:
> .) it seems we are not that far off the track, since the RI also has a SPI 
> for JNDI and resource lookup (~ our singleton finder)
>
> .) the RI also aims at non EE environments, and not even EJB lite containers 
> but also even more lightweight (which is not mentioned in the spec btw, 
> isn't?)
>
> .) there seems to be a gap between the RI and the spec (or I did miss the 
> point)
>
> From the link you've posted
>> public interface NamingContext
>> for example in an environment where JNDI isn't available
>
> and from the spec:
>> Alternatively, the application may obtain the Manager object from
>> JNDI. The container must register an instance of
>> Manager with name java:app/Manager in JNDI at deployment time.
>
> But any JNDI lookup will fail if we run in a non-JNDI setup as mentioned in 
> the SPI docu (like e.g. a standalone swing client).
>
> What really confuses my now is the last sentence in the linked page:
>> If you are integrating the Web Beans into an environment that
>> supports deployment of applications, you must insert the
>> webbeans-ri.jar into the applications isolated classloader. It
>> cannot be loaded from a shared classloader.
> I always thought that WebBeans would be an integral part of the EE6 spec and 
> therefore be a provided base functionality of any EE6 certified appsrv? So I 
> did expect that the RI will handle application isolation itself, or did I 
> misinterpret something?
>
> It's really late now, I hope I wasn't too confused already to form clear 
> thoughts and write them down ;)
>
> txs and LieGrue,
> strub
>
>
> --- Nicklas Karlsson <[email protected]> schrieb am Mi, 4.2.2009:
>
>> Von: Nicklas Karlsson <[email protected]>
>> Betreff: Re: JNDI usage question
>> An: [email protected]
>> Datum: Mittwoch, 4. Februar 2009, 23:49
>> _They_ are watching and don't think so:
>> http://docs.jboss.org/webbeans/reference/1.0.0.ALPHA2/en-US/html/ri-spi.html#d0e3649
>> ;-)
>>
>> On Thu, Feb 5, 2009 at 12:12 AM, Mark Struberg
>> <[email protected]> wrote:
>> > So, after a few hous of not thinking about this
>> problem, here is the (possible) answer:
>> >
>> > The Spec only mentions the JNDI because _they_ need it
>> in _their_ scenario!
>> > And what is their scenario?
>> > The WebBeans RI is designed to be an integral part of
>> the JBoss J2EE Server, so the webbeans-ri.jar will reside in
>> the app servers jar classpath and NOT be packaged in any EAR
>> or WAR file.
>> > So the webbeans-ri classes will be loaded through the
>> app-servers parent classloader, which is the same for _all_
>> webapps running in this server. In this scenario one has to
>> make sure that each webapp gets its own javax.inject.Manager
>> singleton, and the easiest way is to use a JNDI
>> java:comp/env environment (because a singleton using static
>> would simply not work)!
>> >
>> > But all this magic is completely futile if our
>> openwebbeans-impl.jar is packaged inside the EAR or WAR,
>> because in this case we are already in the correct
>> per-webapp-classloader.
>> >
>> > So we either always lookup the Manager from
>> java:comp/env/Manager or our ManagerObjectFactory or even
>> the WebBeansFinder has to be a SPI with a JNDI
>> implementation for running on a server level and an
>> implementation using statics if being packaged with the app.
>> >
>> > I can imagine that that there is standard answer to
>> our problem, because using JNDI for each and every Manager
>> access is not the fastest solution. So come on EE guys,
>> enlighten us :)
>> >
>> > Any thoughts on this?
>> >
>> > LieGrü,
>> > strub
>> >
>> > --- Mark Struberg <[email protected]> schrieb am
>> Mi, 4.2.2009:
>> >
>> >> Von: Mark Struberg <[email protected]>
>> >> Betreff: JNDI usage question
>> >> An: [email protected]
>> >> Datum: Mittwoch, 4. Februar 2009, 14:53
>> >> Hi!
>> >>
>> >>
>> >> The JNDI context set by OpenWebBean is
>> >>
>> >> WebBeansConstants.WEB_BEANS_MANAGER_JNDI_NAME
>> >>
>> >> But although I see where is gets bound and und
>> bound, I
>> >> cannot see where it is actually being used?
>> >>
>> >> So maybe I'm blind, but what for do we
>> currently use
>> >> the JNDI context? Is this work in progress, or did
>> I miss
>> >> something?
>> >>
>> >> Just to make sure we have the same undersanding:
>> how should
>> >> @ApplicationScoped work in
>> >> a) a WAR in a ServletEngine like tomcat
>> >> b) a EAR in a J2EE Server like Geronimo
>> >> c) a WAR (solo, without EAR) in a J2EE Server like
>> Geronimo
>> >>
>> >> LieGrue,
>> >> strub
>> >
>> >
>> >
>> >
>>
>>
>>
>> --
>> ---
>> Nik
>
>
>
>



-- 
---
Nik

Reply via email to