[jboss-dev] Deployment chains
Adrian Brock
abrock at redhat.com
Tue Oct 7 11:58:50 EDT 2008
On Tue, 2008-10-07 at 16:56 +0100, Kabir Khan wrote:
> > Kabir, can you modify your deployer to specify
> > java.lang.ClassLoader as an input instead of using the relative
> > ordering.
> I have tried to do the following
>
> public AOPClassLoaderDeployer(int xmlRelativeOrder)
> {
> setStage(DeploymentStages.CLASSLOADER);
> - //This needs to come after the classloader deployer
> - setRelativeOrder(xmlRelativeOrder + 1);
> +
> + //This makes it come after the ClassLoaderDeployer
> + setInput(ClassLoader.class);
> }
>
> but now it looks like deployer is not triggered at all. Is there
> anything else I need to do?
>
The setInput() means the attachment is required to exist
otherwise it won't invoke your deployer.
If you use addInput() then the name is only used in ordering.
If you look at the deployer interface there are actually
two different properties;
input - required attachment
inputs - only used in ordering
I guess the method should have been called setRequiredInput()
to avoid the confusion. ;-)
--
xxxxxxxxxxxxxxxxxxxxxxxxxxxx
Adrian Brock
Chief Scientist
JBoss, a division of Red Hat
xxxxxxxxxxxxxxxxxxxxxxxxxxxx
More information about the jboss-development
mailing list