Skip to content

Instantly share code, notes, and snippets.

@ALRubinger
Created August 31, 2010 14:21
Show Gist options
  • Save ALRubinger/559090 to your computer and use it in GitHub Desktop.
Save ALRubinger/559090 to your computer and use it in GitHub Desktop.
boolean isEjb3ComponentDeployment(final DeploymentUnit unit)
{
// Obtain the Merged Metadata
final JBossEnterpriseBeanMetaData ejb = unit.getAttachment(JBossEnterpriseBeanMetaData.class);
// If metadata's not present as an attachment, return
if (ejb == null)
{
log.warn("ALR - NO JBEBMD attachment");
return false;
}
// If this is not an EJB3 Deployment, return
if (ejb.getJBossMetaData().isEJB3x())
{
log.warn("ALR - NOT EJB3x");
return false;
}
// Meets conditions
log.warn("ALR - MEETS CONDITIONS");
return true;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment