dev@grizzly.java.net

Re: Embedding WebAppAdapter was RFC Deployer refactoring

From: Survivant 00 <survivant00_at_gmail.com>
Date: Fri, 18 Sep 2009 17:53:10 -0400

I'll start the Annotations support this week-end.

I received an answer from Sun's guy. So

***
If there is a conflict between web.xml and an annotation, the web.xml will
take precedence.

Thanks,

Jan
***


Planned to support Annotation up to 3.0 Servlets.




2009/9/18 Hubert Iwaniuk <neotyk_at_kungfoo.pl>

> Hi *
> I've updated Deployer API:
>
> 1. Can updeploy
> 2. Doesn't need to support URI deployments.
>
> Patch attached.
> Still doesn't have deploy configurations.
>
> Please comment,
> Hubert.
>
>
>
> On Fri, Sep 18, 2009 at 1:49 AM, Survivant 00 <survivant00_at_gmail.com>wrote:
>
>> I'll check that tomorrow and think about that. Will try to came with read
>> cases that I could have.. and we will try to do something with that.
>>
>>
>> 2009/9/17 Hubert Iwaniuk <neotyk_at_kungfoo.pl>
>>
>>> Hi *
>>>
>>>
>>> Attached Deployer API proposal.
>>>
>>> Short description of what's in it.
>>>
>>> 1. New method GWS.deploy(URI, Deployer<V>) to deploy from URI using
>>> deployer.
>>> 2. Deployer abstract class that will deploy to GWS. Extending classes
>>> need to provide implementations for:
>>> 1. creating deployable object from URI
>>> 2. creating map of GrizzlyAdapters to patch for them to be
>>> deployed to.
>>>
>>> First implementation will be WarDeployer extends Deployer<WebApp> and
>>> will probably
>>> need to introduce additional entities for deployment configuration like
>>> server wide libs and webdefaultxml.
>>> But before that happening I would like to hear from you if you find this
>>> API idea acceptable/usable and how it can be improved.
>>>
>>> Thanks in advance,
>>> Hubert.
>>>
>>>
>>>
>>> On Wed, Sep 16, 2009 at 10:01 PM, Survivant 00 <survivant00_at_gmail.com>wrote:
>>>
>>>> it what I add in mind.
>>>>
>>>> GWSD should become a client of this WAA.
>>>>
>>>> like if we have 5 war to deploy from GWSD command line
>>>>
>>>> List cachedList;
>>>>
>>>> for(String warPath : list){
>>>> WebAppAdapter w = new WebAppAdapter(warPath).deploy();
>>>> cachedList.add(w);
>>>>
>>>> }
>>>>
>>>> something liek that
>>>>
>>>> and be able to do
>>>>
>>>> w.undeploy();
>>>>
>>>>
>>>>
>>>> 2009/9/16 Jeanfrancois Arcand <Jeanfrancois.Arcand_at_sun.com>
>>>>
>>>> Salut,
>>>>>
>>>>>
>>>>> Hubert Iwaniuk wrote:
>>>>>
>>>>>> Hi *,
>>>>>>
>>>>>> Excerpt from RFC Deployer Refactoring http://bit.ly/UfgUK
>>>>>>
>>>>>> can it be used embedded easily ?
>>>>>>>
>>>>>>> like
>>>>>>>
>>>>>>>
>>>>>>> webAdapter.deploy("xxx/webapp.war"); ?
>>>>>>>
>>>>>>
>>>>>> Not that easy, we can create convenience method like WAA.deploy(...)
>>>>>>
>>>>>> So far we have:
>>>>>> /**
>>>>>> * Default constructor, takes care of setting up adapter.
>>>>>> *
>>>>>> * @param gws Grizzly Web Server to register {_at_link
>>>>>> ServletAdapter}s.
>>>>>> * @param root Root folder, for serving static resources
>>>>>> * @param context Context to be deployed to.
>>>>>> * @param webApp Web application to be run by this adapter.
>>>>>> * @param webAppCL Web application class loader.
>>>>>> * @param webdefault Default web application.
>>>>>> */
>>>>>> public WebAppAdapter(GrizzlyWebServer gws, String root, String
>>>>>> context, final WebApp webApp, URLClassLoader webAppCL, WebApp
>>>>>> webdefault)
>>>>>>
>>>>>> So what it takes now for embedding is GWS, parsed WebApp, Classloader
>>>>>> to be used by this WebApp, optional webdefault.
>>>>>>
>>>>>> I think this embeddable entry method would have better place in
>>>>>> GrizzlyWebServerDeployer
>>>>>> We already have quite some deploy methods there.
>>>>>>
>>>>>> As I see WebAppAdapter is to serve welcome-file, hold information on
>>>>>> what was deployed for particular WebApp (convenience for some
>>>>>> management interface) and help in un/redeploying. Do you agree on
>>>>>> that?
>>>>>>
>>>>>> Back to GWSD.deploy.
>>>>>> /**
>>>>>> * Deploy WAR file.
>>>>>> *
>>>>>> * TODO make {_at_link GrizzlyWebServer} a parameter here for easier
>>>>>> embadability.
>>>>>> *
>>>>>> * @param location Location of WAR file.
>>>>>> * @param context Context to deploy to.
>>>>>> * @param serverLibLoader Server wide {_at_link ClassLoader}.
>>>>>> Optional.
>>>>>> * @param defaultWebApp webdefault application, get's merged with
>>>>>> application to deploy. Optional.
>>>>>> * @throws Exception Duh. TODO refactor Exception handling.
>>>>>> */
>>>>>> public void deployWar(
>>>>>> String location, String context, URLClassLoader
>>>>>> serverLibLoader, WebApp defaultWebApp) throws Exception {
>>>>>>
>>>>>> What do you think of it?
>>>>>>
>>>>>
>>>>> I would like to see WebAppAdapter.deploy(GWS,path_to_war/dir)> Mianly I
>>>>> would like to be able to do something as simple as:
>>>>>
>>>>> WebAppAdapter w = new WebAppAdapter();
>>>>> w.deploy("/foo");
>>>>> gws.addGrizzlyAdapter(w);
>>>>>
>>>>> without the needs of the GWSD class. The idea then would consist of
>>>>> moving the WebAppAdapter under the http-servlet module so people can really
>>>>> embed and deploy their application programmatically.
>>>>>
>>>>> What do you think?
>>>>>
>>>>> Great work BTW!
>>>>>
>>>>> -- Jeanfrancois
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>> Cheers,
>>>>>> Hubert.
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: dev-unsubscribe_at_grizzly.dev.java.net
>>>>>> For additional commands, e-mail: dev-help_at_grizzly.dev.java.net
>>>>>>
>>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: dev-unsubscribe_at_grizzly.dev.java.net
>>>>> For additional commands, e-mail: dev-help_at_grizzly.dev.java.net
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>>
>>>> Vous pouvez me suivre sur Twitter / You can follow me on Twitter :
>>>> http://twitter.com/survivant
>>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe_at_grizzly.dev.java.net
>>> For additional commands, e-mail: dev-help_at_grizzly.dev.java.net
>>>
>>
>>
>>
>> --
>>
>> Vous pouvez me suivre sur Twitter / You can follow me on Twitter :
>> http://twitter.com/survivant
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_grizzly.dev.java.net
> For additional commands, e-mail: dev-help_at_grizzly.dev.java.net
>



-- 
Vous pouvez me suivre sur Twitter / You can follow me on Twitter :
http://twitter.com/survivant