dev@grizzly.java.net

Re: Discussion about Annotations support in GWSD

From: Oleksiy Stashok <Oleksiy.Stashok_at_Sun.COM>
Date: Tue, 06 Oct 2009 10:20:15 +0200

> 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?