dev@glassfish.java.net

Re: SQE BLocking Bug 14396: How should we run a standalone client on GF 3.1?

From: Marina Vatkina <marina.vatkina_at_oracle.com>
Date: Mon, 08 Nov 2010 11:28:09 -0800

Ken Saks told me at 3.0 timeframe that GF/habitat bootstrapping and
injection should happen during new InitialContext() call.

Cheng, can you check?

thanks,
-marina

Ken wrote:
> Ken wrote:
>> One of the bugs that Gopal has filed (issue 14396) concerns running
>> IIOP FOLB tests
>> from a standalone client. As far as I can tell, that is simply a
>> J2SE client
>> that include gf-client.jar in its classpath.
>>
>> First question: Is anything else required to setup a standalone client?
>>
>> The test that we have been trying basically does something like (this
>> is from the issue comments):
>>
>> /export/jdk1.6.0_21/bin/java
>> -Dcom.sun.appserv.iiop.endpoints=hat2k2:23700,hat2k2:23701,hat2k2:23702,hat2k2:23703
>> -Drmiregistry.host=hat2k2 -classpath
>> /disk3/agentrepo/glassfish-samples/callback-service.jar
>> :/disk3/agentrepo/glassfish-samples/cart-ejb.jar
>> :/disk3/sfish-samples/cart-app-client.jar
>> :/disk3/glassfish3/glassfish/modules/gf-client.jar
>> cart.client.CartFailoverClient
>>
>> This fails with a stack trace in naming, which comes down to the fact
>> that
>> org.glassfish.internal.api.Globals.defaultHabitat is set to null,
>> apparently
>> because dependency injection did not happen. The code that is
>> failing is simply calling
>>
>> habitat = Globals.getDefaultHabitat()
>>
>> in the SerialInitContextFactory constructor.
>>
>> So what else is needed to make this work?
>>
>> Thanks,
>>
>> Ken.
> This is a blocking bug for SQE, and I have no idea how to fix it.
>
> I need information about the relation between a standalone client
> (that just includes gf-client.jar in its classpath),
> and hk2 dependency injection. Does dependency injection work at all
> in this configuration?
>
> Without assistance, this will never get fixed.
>
> Thanks,
>
> Ken.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>