dev@grizzly.java.net

Re: Discussion about Annotations support in GWSD

From: Survivant 00 <survivant00_at_gmail.com>
Date: Tue, 6 Oct 2009 06:35:30 -0400

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