5 Replies Latest reply on Sep 28, 2006 4:38 PM by bill.burke

    tomcat deployer porting

    starksm64

      I am looking at porting the TomcatInjectionContainer to a ObjectModelFactoryDeployer, and merging the WebDD/WebDDObjectFactory into the existing org.jboss.web.WebApplication model.

      I'm not clear on how the InjectionHandler implementation is going to be merged into the new vdf along with the ejb3 implementations. It seems like most of the metadat elements just need to be put into the associated DeploymentUnit attachments. How far are you along are you Bill?

        • 1. Re: tomcat deployer porting
          bill.burke

          I'm currently on the EJB3 deployer. Trying to weed through and figure out how things are supposed to be done.


          Can you describe what you mean by


          It seems like most of the metadat elements just need to be put into the associated DeploymentUnit attachments.


          • 2. Re: tomcat deployer porting
            starksm64

            Data like this:

             protected EncMap encInjectors = new EncMap();
             protected Map<String, Map<AccessibleObject, Injector>> encInjections = new HashMap<String, Map<AccessibleObject, Injector>>();
             protected Map<String, Map<AccessibleObject, Injector>> resolvedClassInjections = new HashMap<String, Map<AccessibleObject, Injector>>();
            
            
             protected List<PersistenceUnitDeployment> persistenceUnitDeployments = new ArrayList<PersistenceUnitDeployment>();
             protected LinkedHashMap ejbContainers = new LinkedHashMap(); // will always be empty.
             protected DeploymentPersistenceUnitResolver persistenceUnitResolver;
             protected WarEjbResolver ejbResolver;
             protected DependencyPolicy dependencyPolicy = new JmxDependencyPolicy();
             protected Collection<InjectionHandler> handlers;
             protected DeploymentInfo di;
             protected ClassLoader webLoader;
             protected AbstractWebContainer.WebDescriptorParser parser;
             protected WebApplication appInfo;
            


            should be in the DeploymentUnit attachments for use by other deployers, and some probably set by other deployers:

             protected WebMetaData parse(DeploymentUnit unit, VirtualFile file)
             throws Exception
             {
             Collection<InjectionHandler> handlers = unit.getAttachment("handlers");
             WarEjbResolver ejbResolver = unit.getAttachment(WarEjbResolver.class);
             ...
            
            



            • 3. Re: tomcat deployer porting
              bill.burke

              I'd like to get what code I have now working before refactoring injection yet again. So far, it looks like I do not have to write that much code for the EJBDeployer to make it work in both JBoss4 and JBoss 5. I had already written an abstraction around deployment/kernel type. Its working out pretty well, i just need to implement a scan abstraction.

              Yes this stuff needs to be refactored again and broken up in various ways as you propose.

              • 4. Re: tomcat deployer porting
                starksm64

                I'm not going to worry about this issue until I see how the ejb3 and deployer shapes up and can understand the relationships.

                • 5. Re: tomcat deployer porting
                  bill.burke

                  thanks for the comments though. You gave me a few ideas for refactoring things.

                  Personally, I'm still unsure how the pieces fit together...