On Mon, 2008-10-06 at 09:11 +0200, Carlo de Wolf wrote:
> I don't understand why this isn't setting the
ComponentVisitor
> which would do that without you having to think about it?
>
That because I don't understand why we should set one. :-)
What is AbstractComponentDeployer?
A deployer so you only have to write the component visitor. :-)
> Instead there is a class in the jpa project called
> AbstractDeploymentVisitor which looks like it should be
> in the deployer project and really called
> AbstractComponentVisitor?
>
Yes, that was the plan. This is the precursor for that class. I dropped
the ball there.
Ok. I should have provided an AbstractComponentVisitor in the
initial work, instead you've created one so it just needs moving
into the deployers project.
And no, it's an AbstractDeploymentVisitor because it's an
implementation
on DeploymentVisitor meant for setDeploymentVisitor. The fact that
setComponentVisitor takes the 'same' thing is another mind boggler to
me. If we're doing an AbstractComponentVisitor it shouldn't have
getComponents, but getComponent.
The setComponentVisitor() initialises the AbstractComponentDeployer
from the DeploymentVisitor metadata so you don't have
to repeat yourself. ;-)
A component visitor (there's no such interface)
is just a deployment visitor that creates components.
And for those that don't know, a deployment visitor is used
when you want to look at all attachments and do work
that is atomic. i.e. it will automatically invoke
you to unwind what you previously did if you throw an error
part way through deploy().
--
xxxxxxxxxxxxxxxxxxxxxxxxxxxx
Adrian Brock
Chief Scientist
JBoss, a division of Red Hat
xxxxxxxxxxxxxxxxxxxxxxxxxxxx