dev@grizzly.java.net

Re: Discussion about Annotations support in GWSD

From: Oleksiy Stashok <Oleksiy.Stashok_at_Sun.COM>
Date: Tue, 06 Oct 2009 13:29:41 +0200

Hmm, please correct if I'm wrong...

we talk about situation, when WarDeployer could be used by
Webservices, EJB and other containers?
If we have 3 containers, let's say Webservices, EJB, Servlet 3.0 we
can let them share single WarDeployer instance, right? In this case
which custom annotation parser we need to pass, theoretically we
should pass 3 parsers, one per container?


On Oct 6, 2009, at 12:35 , Survivant 00 wrote:

> it's not what I mean.
>
> Deployer is not able to detect Annotations others than Servlet 2.5,
> because we didn't want to put ejb or webservice API dependancies in
> the project (not now). So what I wanted to give is the option to
> load EJB annotation at runtime with a customer AnnotationDetecter
> when the user used WarDeployer embedded.
>
>
>
>
>
> 2009/10/6 Oleksiy Stashok <Oleksiy.Stashok_at_sun.com>
>> I almost finish the refactoring to enabled annotation into
>> WarDeployer.
>>
>> for testing purpose I add a AnnotationParser there.
>>
>> // if metadata-complete skip annotations
>> if(!webApp.getMetadataComplete()){
>> logger.fine("Will append Annotations to the
>> WebApp");
>> try {
>> AnnotationParser parser = new
>> AnnotationParser();
>> WebApp webAppAnot =
>> parser.parseAnnotation((URLClassLoader)warCL);
>> webApp.mergeWithAnnotations(webAppAnot);
>>
>> } catch (Throwable t) {
>> logger.warning("Unable to load
>> annotations : " + t.getMessage());
>> }
>> } else {
>> logger.info("Skipping Annotation for this URI :
>> " + uri);
>> }
>>
>> but I think it would be best to have one AnnotationParser that can
>> be passed to the WarDeployer, and one by default. We could pass a
>> Parser that support other Annotation wihtou to much trouble.. like
>> Persistance.. WebService, Serlvet 3.0 api ...
>>
>> what do you think ?
>
> Not sure if there is a sense to pass custom parsers. Theoretically
> our classes are open, so WebServices, Servlet 3.0 container(s) can
> parse our classes themselves. What deployer might do - is notify
> other containers about newly deployed application.
> Do I miss something?
>
>
>
>
>
> --
>
> Vous pouvez me suivre sur Twitter / You can follow me on Twitter : http://twitter.com/survivant