dev@glassfish.java.net

Re: Default network config with GlassFish embedded

From: Jerome Dochez <Jerome.Dochez_at_Sun.COM>
Date: Tue, 28 Jul 2009 23:51:39 -0700

all we need is to be able to create domain.xml configurations.

        1. to create ports
        2. to attach ports to containers (like web, ejb, iiop).

the GrizzlyService runs in embedded mode and listens to network
configuration.

the issue we have right now is that we implement 1 and 2 in one single
operation done through invoking the CLI create-http-listener command.

we can chat sometimes today if you need more information...

jerome

On Jul 28, 2009, at 7:00 AM, Justin Lee wrote:

> I'd be happy to help. I've been keeping one eye on the embedded
> stuff but i'm not 100% up to speed. Could you give a quick run down
> of the issue and I'll do what I can?
>
> Jerome Dochez wrote:
>> no the real fix would be to for Port implementation to stop using
>> the create-http-listener command and have the Port implementation
>> directly add the domain.xml elements.
>>
>> Justin, would you have time to help with that ?
>>
>> jerome
>>
>> On Jul 27, 2009, at 6:42 PM, Vivek Pandey wrote:
>>
>>> Fond the root cause:
>>>
>>> INFO: GlassFish v3 startup time : Embedded(441ms) startup
>>> services(226ms) total(667ms)
>>> Jul 27, 2009 6:32:32 PM AppServerStartup run
>>> INFO: [Thread[GlassFish Kernel Main Thread,5,main]] started
>>> Jul 27, 2009 6:32:32 PM
>>> com.sun.enterprise.v3.admin.CommandRunnerImpl getCommand
>>> INFO: Command create-http-listener not found
>>>
>>> server.createPort() execute create-http-listener command. This
>>> command is part of web-cli.jar. I defined the explicit dependency
>>> on web-cli and everything works fine.
>>>
>>> The real fix will be to include this in glassfish-embedded-nucleus
>>> package on which I depend.
>>>
>>> -vivek.
>>>
>>> Vivek Pandey wrote:
>>>>
>>>> The jruby uses of GlassFish embedded API bases on glassfish-
>>>> embedded-nucleus, which is pretty much nucleus distribution with
>>>> hk2 and grizzly.
>>>>
>>>> The server starts up fine however there is no default network
>>>> configuration, so during grizzly adapter registration I am
>>>> getting an NPE. Am I supposed to add a NetworkConfigu element on
>>>> the Config myself? I would guess it is provided as part of
>>>> default embedded implementation. Here is the exception thrown:
>>>>
>>>> SEVERE: Exception while loading the app
>>>> java.lang.NullPointerException
>>>> at
>>>> com
>>>> .sun
>>>> .enterprise
>>>> .v3
>>>> .services
>>>> .impl
>>>> .GrizzlyService.getPortsFromVirtualServers(GrizzlyService.java:614)
>>>> at
>>>> com
>>>> .sun
>>>> .enterprise
>>>> .v3
>>>> .services
>>>> .impl.GrizzlyService.registerEndpoint(GrizzlyService.java:527)
>>>> at
>>>> com
>>>> .sun
>>>> .enterprise
>>>> .v3
>>>> .services
>>>> .impl.GrizzlyService.registerEndpoint(GrizzlyService.java:512)
>>>> at
>>>> com
>>>> .sun
>>>> .enterprise
>>>> .v3
>>>> .services
>>>> .impl.GrizzlyService.registerEndpoint(GrizzlyService.java:490)
>>>> at
>>>> org
>>>> .glassfish
>>>> .scripting.jruby.JRubyApplication.start(JRubyApplication.java:214)
>>>> at org.glassfish.internal.data.EngineRef.start(EngineRef.java:
>>>> 126)
>>>> at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:
>>>> 217)
>>>> at
>>>> org
>>>> .glassfish
>>>> .internal.data.ApplicationInfo.start(ApplicationInfo.java:193)
>>>> at
>>>> com
>>>> .sun
>>>> .enterprise
>>>> .v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:
>>>> 304)
>>>>
>>>>
>>>> This is how I am starting the server:
>>>>
>>>> Server.Builder builder = new Server.Builder("ruby");
>>>> Server server = builder.build();
>>>> server.addContainer(new JRubyContainerBuilder());
>>>> server.createPort(3000);
>>>> DeployCommandParameters params = new
>>>> DeployCommandParameters();
>>>> params.name = "depot";
>>>> Properties props = new Properties();
>>>> props.put("jruby.home", jrubyInstalDir);
>>>> params.property = props;
>>>> EmbeddedDeployer dep = server.getDeployer();
>>>> dep.deploy(new File(appDir), params);
>>>>
>>>> -vivek.
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>>>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>>>
>>> --------------------------------------------------------------------- To
>>> unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net For
>>> additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>