dev@glassfish.java.net

Re: [embedded] EmbeddedDeployer

From: Arun Gupta <Arun.Gupta_at_Sun.COM>
Date: Wed, 20 May 2009 16:22:14 -0700

Joining the party now :)

>>> not sure what you mean here... Server server = serverInfo.create();
>>> is the API, is this the non intuitive part ?
>>>
>>
>> Intuitively I would have expected the Server building functionality to
>> be part of the Server itself. I suppose the name "Info" does not
>> really click with the concept of creation, perhaps Builder or Factory ?
> yes builder is definitely what I had in mind, not sure why I called it
> Info... I will try to remember or change it !
Yes, that'll certainly be intuitive.

Optionally there could be Server.getInfo() ;-)

-Arun


>>
>> Maybe it would make sense for the ServerInfo to be an inner static
>> class of Server? or can Server be an abstract class ? (i am not sure
>> on the restrictions of the provider annotated classes).
> what advantages do you see by making it an inner static ?
>>
>>
>>>>>>
>>>>>> 2). How do I deploy the archive now ? Server.getDeployer() is not
>>>>>> available.
>>>
>>> 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.
>>
>> How about:
>>
>> WebServer s = WebServerInfo.port(8080);
>> s.getDeployer().("foo.war");
>>
>> where WebServer extends Server.
>>
>> ?
>>
>> Paul.
>>
>>
>> ---------------------------------------------------------------------
>> 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
>

-- 
Application Platform, Sun Microsystems, Inc.
Blog: http://blogs.sun.com/arungupta