[jboss-dev] Deployment chains

Ales Justin ales.justin at gmail.com
Mon Oct 6 17:19:45 EDT 2008


> I don't understand it either.
> Why setComponentVisitor() didn't work for him
> is a mystery that remains unresolved, it clearly works
> for the MC beans and JMX services?

Sure.
And for n tests that we have.

Nah, this is just being Carlo again. :-)

> So there's something different or it is too easy 
> to it wrong. :-)

:-)

> The class in question is this one:
> http://viewvc.jboss.org/cgi-bin/viewvc.cgi/jbossas/projects/jpa/trunk/deployers/src/main/java/org/jboss/jpa/deployers/AbstractDeploymentVisitor.java?revision=75431&view=markup

Yeah, found it.
Thanks anyway.

> It obviously has nothing to do with JPA.
> It's a useful abstraction so it belongs as a
> deployers helper class.

Done. ;-)

> It is similar to BeanMetaDataFactoryVisitor
> except it only deals with the boiler plate by
> adding a getName() callback.
> 
> There's a FIXME
>       // TODO: determine proper component meta data class
>       component.addAttachment(componentMD.getClass().getName(), componentMD);
> 
> Which needs to be resolved by having the subclass pass the actual component
> class in the constructor, for correct use of generics.
> 
> public AbstractComponentVisitor(Class<C> componentType)
> {
>    this.componentType = componentType;
> }
> 
> component.addAttachment(componentType, componentMD);
> 
> Although if you are going to allow subclasses of C, then
> the collections need fixing to be for example 
> List<? extends C>

I've done a simpler version of it.
Just dealing with a single component.
  - 
http://anonsvn.jboss.org/repos/jbossas/projects/jboss-deployers/trunk/deployers-spi/src/main/java/org/jboss/deployers/spi/deployer/helpers/AbstractComponentVisitor.java

Perhaps a split into:
  - single component
  - list of deployments
visitor would be better?



More information about the jboss-development mailing list