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. :-)
:-)
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/dep...
Perhaps a split into:
- single component
- list of deployments
visitor would be better?