[jboss-dev-forums] [Design of POJO Server] - Re: ENC Deployment

bill.burke@jboss.com do-not-reply at jboss.com
Mon Sep 18 08:23:43 EDT 2006


"adrian at jboss.org" wrote : The major work is how in the ENC is constructed.
  | Obviously there will be an ENC deployer.
  | 
  | This needs to collect all the metadata to populate the ENC structure:
  | 1) From the spec defined xml
  | 2) From override xml
  | 3) From annotations on the class(es)
  | 4) From the metadata itself (e.g. instance overrides)
  | 
  | In my opinion, it is best that the ENC Deployer just does step 4.
  | Steps 1-3 should be done by the earlier parsers that know
  | what to look at, e.g. the ejb, web and client deployers
  | 
  | If these populate the MetaData hierarchy (converting xml into
  | annotations) the ENC deployer just needs to know the ScopeKey
  | and collect all the annotations.

I think we talked about this before...

These need to be the steps:

1) A registration phase for all deployments
2) Analyzation of XMLs, annotations and metadata to determine dependencies. 

This step is partially complex as bindings can be determined by both the classtype of the component and position in the deployment (is the referenced component in the EJB-JAR?  No?  The EAR?  No?   Globally?)

3) Register dependencies with controller
4) Start and populate ENC and do any injections.

I do this in the current J2EE injection/XML processing.  Within this phase I create two different objects.  One object is an ENCInjector object.  This object gets registered with Container and executed at component startup.  If there are any injections to be done, these are registered with the container using a different object, an Injector.  Injectors inject into object instances and are keyed based on classtype.  

For EJB Containers there can be multiple class types that have injectors. The BeanClass itself, and any interceptor classes.

For Web Containers, you have servlet classes, filter classes, context listener classes, and I believe, taglib classes.  The Web tier has the additional problem of JSP classes which are not available at deployment time or may be changed on the fly.

I have created an abstraction so that the ENC/Injection Handlers are shared between the EJB and Web tiers



View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3972287#3972287

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3972287



More information about the jboss-dev-forums mailing list