Provide a extended DeploymentVisitor which can be used for filtering out deployers
----------------------------------------------------------------------------------
Key: JBDEPLOY-193
URL:
https://jira.jboss.org/jira/browse/JBDEPLOY-193
Project: JBoss Deployers
Issue Type: Feature Request
Components: deployer
Affects Versions: JBDEPLOY-2.0.7.GA
Reporter: jaikiran pai
Assignee: jaikiran pai
The AbstractRealDeployerWithInput currently relies on a DeploymentVisitor for filtering
out deployers while processing out a deployment unit. The DeploymentVisitor is responsible
for specifying the "type" of attachment to look for, in the unit, to decide
whether the unit can be processed by the deployer. There are 2 short-comings with the
current DeploymentVisitor:
1) A unit can have multiple attachments of the same type - This effectively means a
deployer cannot specify which out of these n attachments, is it interested in. This
results in the deployer being called multiple times for the same unit.
2) Because the AbstractRealDeployerWithInput relies on the type of the attachment, it is
expensive:
protected <U> void deploy(DeploymentUnit unit, DeploymentVisitor<U> visitor)
throws DeploymentException
{
if (visitor == null)
throw new IllegalArgumentException("Null visitor.");
List<U> visited = new ArrayList<U>();
try
{
Set<? extends U> deployments =
unit.getAllMetaData(visitor.getVisitorType());
...
unit.getAllMetaData internally iterates over all attachments to create collection of
eligible attachments.
To improve this, an ExtendedDeploymentVisitor can be introduced which allows for a
deployer to register itself for a specific attachment with name and the corresponding type
of the attachment. A new deployer can then use this ExtendedDeploymentVisitor to
efficiently process the deployment unit.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira