It's added in JBossEjbParsingDeployer
if (this.isPreEJB3x(ejbJarMetaData, jbossMetaData))
{
JBossMetaData stdMetaData = getStandardMetaData();
if(stdMetaData != null)
unit.addAttachment("standardjboss.xml", stdMetaData);
}
and then StandardJBossMetaDataDeployer does the following
public void deploy(DeploymentUnit unit)
throws DeploymentException
{
// Get the jboss.xml attachment
JBossMetaData metaData = unit.getAttachment(JBossMetaData.class);
// Get the standardjboss.xml attachment
JBossMetaData stdMetaData = unit.getAttachment("standardjboss.xml", JBossMetaData.class);
if(metaData == null || stdMetaData == null)
return;
JBossMetaDataWrapper wrapper = new JBossMetaDataWrapper(metaData, stdMetaData);
// Set the wrapper as the output
unit.getTransientManagedObjects().addAttachment(JBossMetaData.class, wrapper);
// Keep the raw parsed metadata as well
unit.addAttachment(RAW_ATTACHMENT_NAME, metaData, JBossMetaData.class);
}