Another runtime view is what the source of an attachment is involved in the chain:

PredeterminedManagedObjects
TransientManagedObjects
TransientAttachments

and ideally which deployer set the current attachment at each level. This relates to tracking whether the correct
attachment is being used when the profile service sets a PredeterminedManagedObject.

Adrian Brock wrote:
I'm currently working on tidying up the deployers in JBoss5
as part of that I'm adding some JMX operations so
you can query the deployer chains.

The initial simple list (it doesn't look very good without the css 
which you get from the jmx console:-) is attached.

A quick scan of this shows some funny things or at least
some misunderstanding of the relative ordering parameter.

The relative order parameter only applies when the deployers
have similar input/outputs. It's there for when you have multiple 
"filter"s. i.e. a deployer that has the same input/output type
and you need to control the order in which the filters run
(you should try to design away such a requirement if possible).

e.g. VFSClassLoaderClassPathDeployer is a filter
it inputs and outputs ClassLoadingMetaData.
So does the ClassLoadingDefaultDeployer.

1) Webservices

org.jboss.wsf.container.jboss50.deployer.WebServiceDeployerPreJSE
org.jboss.wsf.container.jboss50.deployer.WebServiceDeployerPostJSE

Currently the ordering of these is pretty weak.

i.e. there is no guarantee the PRE will run before the POST,
except that the relative order of PRE is -1 compared with Tomcat
and the POST must run after Tomcat.

This is very brittle to changes in the Tomcat Deployer which
might move it earlier in the chain due to changes in its requirements.
i.e. The TomcatDeployer takes some additional metadata beyond
JBossWebMetaData.

Shouldn't the PRE deployer also output JBossWebMetaData
to show it modifies or process it and therefore MUST run before Tomcat?

2) AOP ClassLoading

A similar criticism applies for the AOPClassLoaderDeployer
This has no chain definition at all? Only a relative order based
on the main classloader deployer.

Again this is brittle to a refactoring of how the classloader deployer
works.

3) SEAM

org.jboss.seam.integration.microcontainer.deployers.SeamWebUrlIntegrationDeployer
doesn't specify any output. 
But I don't know where the source is for that?
My guess is that this should really be in Describe and specify an
output of ClassLoadingMetadata since that is where
classloading dependencies should be constructed.

4) WEB CLUSTERING

org.jboss.web.tomcat.service.deployers.ClusteringDependencyDeployer
I don't know what this is doing in Describe since it is not
establing a deployment dependency. Instead it is modifying the
JBossWebMetaData.
I'd guess this should be after the merge of annotations into that
metadata? Although I don't think there is such an annotation
currently? :-)

5+) There could be others. Like I said this is just a quick scan.

TODO

I'm going to be adding some other queries so you can display individual
metadata chains for an attachment type and graphs so can see
where attachments may have orginated from other attachments. 

Additionally you'll also be able to see deployers that were used 
for an individual deployment (including by subdeployment/component).

Any other ideas?
  



Operation Results

JMX MBean Operation View

warjort

Stage/Deployertopcomponentparent lastinputoutput
Real
`--org.jboss.ejb.deployers.EjbDeployer@c221d7 org.jboss.metadata.ejb.jboss.JBossMetaDataorg.jboss.ejb.deployers.EjbDeployment
org.jboss.system.metadata.ServiceMetaData
org.jboss.kernel.spi.deployment.KernelDeployment
`--org.jboss.ejb3.deployers.Ejb3ClientDeployer@b40443 org.jboss.metadata.client.jboss.JBossClientMetaDataorg.jboss.ejb3.clientmodule.ClientENCInjectionContainer
org.jboss.kernel.spi.deployment.KernelDeployment
`--org.jboss.ejb3.deployers.Ejb3Deployer@102abdb merged.org.jboss.metadata.ejb.jboss.JBossMetaDataorg.jboss.ejb3.Ejb3Deployment
org.jboss.ejb3.metadata.jpa.spec.PersistenceUnitsMetaDataorg.jboss.kernel.spi.deployment.KernelDeployment
`--org.jboss.deployers.vfs.deployer.kernel.AliasDeploymentDeployer@1aff012 org.jboss.beans.metadata.spi.NamedAliasMetaDataorg.jboss.beans.metadata.spi.NamedAliasMetaData
org.jboss.kernel.spi.deployment.KernelDeployment
`--org.jboss.hibernate.deployers.HibernateDeployer@13dff89 org.jboss.hibernate.deployers.metadata.HibernateMetaDataorg.jboss.beans.metadata.spi.BeanMetaData
`--org.jboss.jpa.deployers.PersistenceDeployer@17fe89 org.jboss.metadata.jpa.spec.PersistenceMetaData
`--org.jboss.jpa.deployers.PersistenceUnitDeployer@a06824 X org.jboss.metadata.jpa.spec.PersistenceUnitMetaDataorg.jboss.beans.metadata.spi.BeanMetaData
`--org.jboss.deployers.vfs.deployer.kernel.KernelDeploymentDeployer@39ea58 org.jboss.beans.metadata.spi.BeanMetaDataorg.jboss.beans.metadata.spi.BeanMetaData
org.jboss.kernel.spi.deployment.KernelDeployment
`--org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer@10ff62a X org.jboss.beans.metadata.spi.BeanMetaData
`--org.jboss.deployers.vfs.deployer.kernel.DeploymentAliasMetaDataDeployer@11ef9f6 X org.jboss.beans.metadata.spi.NamedAliasMetaData
org.jboss.beans.metadata.spi.BeanMetaData
`--org.jboss.resource.deployers.ManagedConnectionFactoryDeployer@1b2601c org.jboss.resource.metadata.mcf.ManagedConnectionFactoryDeploymentGrouporg.jboss.system.metadata.ServiceDeployment
`--org.jboss.resource.deployers.RARDeployer@1ecda50 org.jboss.resource.metadata.RARDeploymentMetaDataorg.jboss.system.metadata.ServiceMetaData
`--org.jboss.varia.deployment.LegacyBeanShellScriptDeployer@f7ce53 org.jboss.varia.deployment.BeanShellScript
`--org.jboss.wsf.container.jboss50.deployer.WebServiceDeployerEJB@13be416 merged.org.jboss.metadata.ejb.jboss.JBossMetaDataorg.jboss.wsf.spi.deployment.integration.WebServiceDeployment
org.jboss.ejb.deployers.EjbDeploymentorg.jboss.metadata.web.jboss.JBossWebMetaData
org.jboss.ejb3.Ejb3Deployment
`--org.jboss.wsf.container.jboss50.deployer.WebServiceDeployerPreJSE@83cf00 org.jboss.metadata.web.jboss.JBossWebMetaData
`--org.jboss.web.tomcat.service.deployers.TomcatDeployer@dfa65c org.jboss.metadata.web.jboss.JBossWebMetaDataorg.jboss.web.deployers.WarDeployment
org.jboss.system.metadata.ServiceMetaData
`--org.jboss.system.deployers.ServiceDeploymentDeployer@bc6007 org.jboss.system.metadata.ServiceMetaDataorg.jboss.system.metadata.ServiceMetaData
org.jboss.system.metadata.ServiceDeployment
`--org.jboss.system.deployers.ServiceDeployer@1a697a1 X org.jboss.system.metadata.ServiceMetaData
`--org.jboss.wsf.container.jboss50.deployer.WebServiceDeployerPostJSE@1560b81 org.jboss.web.deployers.WarDeployment
ClassLoader
`--org.jboss.deployers.plugins.classloading.AbstractLevelClassLoaderSystemDeployer@2726b2 org.jboss.deployers.structure.spi.ClassLoaderFactory
`--org.jboss.aop.asintegration.jboss5.AOPClassLoaderDeployer@19845fb
PostClassLoader
`--org.jboss.aop.asintegration.jboss5.AOPDeploymentAopMetaDataDeployer@1b88122 org.jboss.aop.microcontainer.beans.metadata.AOPDeploymentorg.jboss.aop.asintegration.jboss5.AopMetaDataDeployerOutput
`--org.jboss.aop.asintegration.jboss5.BeansDeploymentAopMetaDataDeployer@14f1726 org.jboss.kernel.spi.deployment.KernelDeploymentorg.jboss.aop.asintegration.jboss5.AopMetaDataDeployerOutput
`--org.jboss.deployment.EarLibExcludeDeployer@2957a4X org.jboss.metadata.ear.jboss.JBossAppMetaDataorg.jboss.classloading.spi.visitor.ResourceFilter.recurse
`--org.jboss.deployers.vfs.plugins.annotations.FilteredAnnotationEnvironmentDeployer@25502e org.jboss.classloading.spi.dependency.Moduleorg.jboss.deployers.spi.annotations.AnnotationEnvironment
org.jboss.classloading.spi.visitor.ResourceFilter.recurse
`--org.jboss.deployment.EarSecurityDeployer@1fac352 org.jboss.metadata.ear.jboss.JBossAppMetaDatajboss.jacc
org.jboss.system.metadata.ServiceMetaData
`--org.jboss.deployment.OptAnnotationMetaDataDeployer@7f9e04 org.jboss.metadata.web.spec.WebMetaDataannotated.org.jboss.metadata.ejb.spec.EjbJarMetaData
org.jboss.metadata.ejb.spec.EjbJarMetaDataannotated.org.jboss.metadata.web.spec.WebMetaData
org.jboss.metadata.client.spec.ApplicationClientMetaDataannotated.org.jboss.metadata.client.spec.ApplicationClientMetaData
org.jboss.deployers.spi.annotations.AnnotationEnvironment
`--org.jboss.ejb.deployers.MergedJBossMetaDataDeployer@1ad552c annotated.org.jboss.metadata.ejb.spec.EjbJarMetaDatamerged.org.jboss.metadata.ejb.jboss.JBossMetaData
org.jboss.metadata.ejb.jboss.JBossMetaDataorg.jboss.metadata.ejb.jboss.JBossMetaData
org.jboss.metadata.ejb.spec.EjbJarMetaData
`--org.jboss.ejb3.deployers.MergedJBossClientMetaDataDeployer@1219665 annotated.org.jboss.metadata.client.spec.ApplicationClientMetaDatamerged.org.jboss.metadata.client.jboss.JBossClientMetaData
org.jboss.metadata.client.jboss.JBossClientMetaDataorg.jboss.metadata.client.jboss.JBossClientMetaData
org.jboss.metadata.client.spec.ApplicationClientMetaData
`--org.jboss.ha.framework.server.deployers.Ejb2HAPartitionDependencyDeployer@19bb448 merged.org.jboss.metadata.ejb.jboss.JBossMetaDatamerged.org.jboss.metadata.ejb.jboss.JBossMetaData
`--org.jboss.ha.framework.server.deployers.Ejb3HAPartitionDependencyDeployer@1033c7e merged.org.jboss.metadata.ejb.jboss.JBossMetaDatamerged.org.jboss.metadata.ejb.jboss.JBossMetaData
`--org.jboss.ejb.deployers.EjbMetadataJndiPolicyDecoratorDeployer@8ee94b merged.org.jboss.metadata.ejb.jboss.JBossMetaDataEjbMetadataJndiPolicyDecoratorDeployer
`--org.jboss.ejb.deployers.StandardJBossMetaDataDeployer@101f8f4 merged.org.jboss.metadata.ejb.jboss.JBossMetaDataorg.jboss.metadata.ejb.jboss.JBossMetaData
org.jboss.metadata.ejb.jboss.JBossMetaDataraw.org.jboss.metadata.ejb.jboss.JBossMetaData
standardjboss.xml
`--org.jboss.ejb.deployers.EjbSecurityDeployer@514577 merged.org.jboss.metadata.ejb.jboss.JBossMetaDatajboss.jacc
org.jboss.metadata.ejb.jboss.JBossMetaDataorg.jboss.system.metadata.ServiceMetaData
`--org.jboss.web.deployers.MergedJBossWebMetaDataDeployer@1c9982e org.jboss.metadata.web.spec.WebMetaDataorg.jboss.metadata.web.jboss.JBossWebMetaData
annotated.org.jboss.metadata.web.spec.WebMetaDatamerged.org.jboss.metadata.web.jboss.JBossWebMetaData
org.jboss.metadata.web.jboss.JBossWebMetaData
`--org.jboss.deployment.MappedReferenceMetaDataResolverDeployer@1908558 Xorg.jboss.metadata.ejb.jboss.JBossMetaDataorg.jboss.deployment.spi.DeploymentEndpointResolver
org.jboss.metadata.web.jboss.JBossWebMetaData
org.jboss.metadata.client.jboss.JBossClientMetaData
`--org.jboss.web.deployers.WarSecurityDeployer@18a4622 org.jboss.metadata.web.jboss.JBossWebMetaDatajboss.jacc
org.jboss.system.metadata.ServiceMetaData
Describe
`--org.jboss.deployers.vfs.plugins.classloader.InMemoryClassesDeployer@4de3feX org.jboss.classloading.spi.metadata.ClassLoadingMetaData
`--org.jboss.deployers.vfs.plugins.classloader.VFSClassLoaderClassPathDeployer@157b39f org.jboss.classloading.spi.metadata.ClassLoadingMetaDataorg.jboss.classloading.spi.metadata.ClassLoadingMetaData
`--org.jboss.deployers.vfs.plugins.classloader.VFSClassLoaderDescribeDeployer@e0d16b org.jboss.classloading.spi.metadata.ClassLoadingMetaData
`--org.jboss.web.tomcat.service.deployers.ClusteringDependencyDeployer@ebdfff org.jboss.metadata.web.jboss.JBossWebMetaDataorg.jboss.metadata.web.jboss.JBossWebMetaData
PreDescribe
`--org.jboss.deployers.plugins.classloading.ClassLoadingDefaultDeployer@721965X org.jboss.classloading.spi.metadata.ClassLoadingMetaDataorg.jboss.classloading.spi.metadata.ClassLoadingMetaData
PostParse
`--org.jboss.resource.deployers.ManagedConnectionFactoryClassLoaderDeployer@11d00cf org.jboss.resource.metadata.mcf.ManagedConnectionFactoryDeploymentGrouporg.jboss.classloading.spi.metadata.ClassLoadingMetaData
`--org.jboss.system.deployers.HackClassloaderMetaDataDeployer@1eef2c org.jboss.mx.loading.LoaderRepositoryFactory$LoaderRepositoryConfigorg.jboss.classloading.spi.metadata.ClassLoadingMetaData
`--org.jboss.web.tomcat.service.deployers.ClusteringDefaultsDeployer@f8d6a6 org.jboss.metadata.web.jboss.JBossWebMetaDataorg.jboss.metadata.web.jboss.JBossWebMetaData
`--org.jboss.web.tomcat.service.deployers.WarClassLoaderDeployer@192c4c org.jboss.metadata.web.jboss.JBossWebMetaDataorg.jboss.classloading.spi.metadata.ClassLoadingMetaData
org.jboss.classloading.spi.metadata.ClassLoadingMetaData
`--org.jboss.seam.integration.microcontainer.deployers.SeamWebUrlIntegrationDeployer@145240a org.jboss.metadata.web.jboss.JBossWebMetaData
Parse
`--org.jboss.deployers.vfs.deployer.kernel.BeanDeployer@57dc15 org.jboss.kernel.spi.deployment.KernelDeployment
`--org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer@13bc30a org.jboss.classloading.spi.metadata.ClassLoadingMetaData
`--org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer@1ba1d9 org.jboss.aop.microcontainer.beans.metadata.AOPDeployment
`--org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer@543937 org.jboss.security.microcontainer.beans.metadata.SecurityPolicyMetaData
`--org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer@bbe4cf org.jboss.hibernate.deployers.metadata.HibernateMetaData
`--org.jboss.deployment.AppParsingDeployer@97ed28 org.jboss.metadata.ear.spec.EarMetaData
`--org.jboss.deployment.JBossAppParsingDeployer@17a33f2 org.jboss.metadata.ear.jboss.JBossAppMetaData
`--org.jboss.ejb3.deployers.AppClientParsingDeployer@b11287 org.jboss.metadata.client.spec.ApplicationClientMetaData
`--org.jboss.ejb3.deployers.JBossClientParsingDeployer@18cecd org.jboss.metadata.client.spec.ApplicationClientMetaDataorg.jboss.metadata.client.jboss.JBossClientMetaData
`--org.jboss.ejb3.deployers.PersistenceUnitParsingDeployer@d9c6e2 org.jboss.metadata.jpa.spec.PersistenceMetaData
`--org.jboss.jpa.deployers.PersistenceParsingDeployer@105e560 org.jboss.metadata.jpa.spec.PersistenceMetaData
`--org.jboss.resource.deployers.ManagedConnectionFactoryParserDeployer@1310e0a org.jboss.resource.metadata.mcf.ManagedConnectionFactoryDeploymentGroup
`--org.jboss.resource.deployers.RARParserDeployer@1ba640 org.jboss.resource.metadata.RARDeploymentMetaData
`--org.jboss.system.deployers.SARDeployer@83e35b org.jboss.system.metadata.ServiceDeployment
`--org.jboss.varia.deployment.LegacyBeanShellDeployer@4a4e31 org.jboss.varia.deployment.BeanShellScript
`--org.jboss.aop.asintegration.jboss5.AOPAnnotationMetaDataParserDeployer@1e40274 org.jboss.aop.microcontainer.beans.metadata.AOPDeployment
`--org.jboss.deployment.EARContentsDeployer@f003c1 org.jboss.metadata.ear.jboss.JBossAppMetaData
`--org.jboss.deployment.WebAppParsingDeployer@156cd93 org.jboss.metadata.web.spec.WebMetaData
`--org.jboss.deployment.JBossWebAppParsingDeployer@12b2f7f org.jboss.metadata.web.spec.WebMetaDataorg.jboss.metadata.web.jboss.JBossWebMetaData
`--org.jboss.deployment.EjbParsingDeployer@1d1e765 org.jboss.metadata.ejb.spec.EjbJarMetaData
`--org.jboss.deployment.JBossEjbParsingDeployer@10725b4 org.jboss.metadata.ejb.spec.EjbJarMetaDataorg.jboss.metadata.ejb.jboss.JBossMetaData
org.jboss.metadata.ApplicationMetaData
org.jboss.mx.loading.LoaderRepositoryFactory$LoaderRepositoryConfig
standardjboss.xml

_______________________________________________ jboss-development mailing list jboss-development@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-development