Jan, Peter,
I applied the patch at:
https://glassfish.dev.java.net/nonav/issues/showattachment.cgi/1637/5410.patch
and found all JRuby tests are now passing. Detailed results at:
http://hudson.sfbay/view/glassfish-scripting/job/jruby-glassfish-BAT/351/testReport/
-Arun
Jan.Luehe_at_Sun.COM wrote:
> Peter Williams wrote:
>
>> Jan.Luehe_at_Sun.COM wrote:
>>
>>> Arun Gupta wrote:
>>>
>>>>> The new ContainerMapper endpoint registration API requires a
>>>>> collection of virtual server names ("vs"), which defaults to an
>>>>> empty collection (which may be a problem in that an endpoint
>>>>> registered using the version of GrizzlyService.registerEndpoint()
>>>>> that does not take any "vsServers" argument will not be registered
>>>>> at all), so you should never be getting an NPE here:
>>>>>
>>>>> for (String host : vs) {
>>>>>
>>>>> unless you were explicitly passing a "null" collection to
>>>>> GrizzlyService.registerEndpoint().
>>>>>
>>>>> Can you check the args you are passing to
>>>>>
>>>>> GrizzlyService.registerEndpoint()?
>>>>
>>>>
>>>> The arguments are:
>>>>
>>>> contextRoot, null, adapter, adapter
>>>>
>>>> The second argument is explicitly and that may be causing the NPE.
>>>> What is the proper value instead of "null" ?
>>>
>>>
>>>
>>> If you use the 3-arg version of GrizzlyService:
>>>
>>> registerEndpoint(String contextRoot, Adapter endpointAdapter,
>>> ApplicationContainer container)
>>>
>>> the NPE should go away, but as I mentioned earlier, this loop in
>>> ContainerMapper would then be bypassed:
>>>
>>> for (String host : vs) {
>>> mapper.addContext(host, slash(contextRoot),
>>> new ContextRootInfo(adapter, container,
>>> contextProtocolFilters), new String[0], null);
>>> }
>>>
>>> and your endpoint won't be registered.
>>
>> Last night, I thought the same thing, but on further inspection, the
>> assumptions above are wrong. The 3 argument form of
>> GrizzlyService.registerEndpoint passes an internal <hosts> variable to
>> the 4 argument version currently in use by RailsDeployer (with the
>> null). 'hosts' initially is empty, but is filled in
>> GrizzlyService.createNetworkProxy().
>
>
> Yes, you are right. :)
> Thanks for pointing this out.
>
> Your patch looks fine.
>
> Will you take care of committing it?
>
> Thanks,
>
>
> Jan
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>
--
Application Platform, Sun Microsystems, Inc.
Blog: http://blogs.sun.com/arungupta