dev@glassfish.java.net

Re: [embedded] EmbeddedDeployer

From: Jerome Dochez <Jerome.Dochez_at_Sun.COM>
Date: Thu, 21 May 2009 09:37:22 -0700

so far I am concentrating on the basic APIs, once this is working,
nothing prevent us from having a few factory APIs like the one you
mentioned below.

jerome

On May 20, 2009, at 4:26 PM, Arun Gupta wrote:

>>> yeah the API is far from complete but it should look like this :
>>>
>>> // default server configuration
>>> ServerInfo info = ServerInfo.getServerInfo("MyEmbeddedGF");
>>>
>>> // configure and add the web container, with port 8080
>>> WebContainer web =
>>> server.addContainer(server.createConfig(WebContainerInfo.class));
>>> web.setHttpPort(server.createPort("8080"));
>>>
>>> // deploy the app to any configured embedded container...
>>> server.getDeployer().deploy("foo.war");
>>>
>> Seems a fair bit of work for a very common case i.e. embedded Web
>> deployment.
> +1
>
>> How about:
>> WebServer s = WebServerInfo.port(8080);
>> s.getDeployer().("foo.war");
>> where WebServer extends Server.
> What's the need for explicitly getting a Deployer ? How about:
>
> WebContainer web = WebContainer.setPort(8080);
> web.deploy("foo.war");
>
> -Arun
>
> --
> Application Platform, Sun Microsystems, Inc.
> Blog: http://blogs.sun.com/arungupta
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>