dev@glassfish.java.net

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

From: Ken <ken.cavanaugh_at_oracle.com>
Date: Mon, 08 Nov 2010 11:23:49 -0800

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.