Created
August 31, 2010 18:51
-
-
Save ALRubinger/559507 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
this.setComponentsOnly(true); | |
this.setInput(JBossEnterpriseBeanMetaData.class); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
/*
*
*
*
*/
package org.jboss.ejb3.instantiator.deployer;
import org.jboss.deployers.spi.DeploymentException;
import org.jboss.deployers.spi.deployer.helpers.AbstractDeployer;
import org.jboss.deployers.structure.spi.DeploymentUnit;
import org.jboss.ejb3.instantiator.spi.AttachmentNames;
import org.jboss.ejb3.instantiator.spi.BeanInstantiator;
import org.jboss.logging.Logger;
import org.jboss.metadata.ejb.jboss.JBossEnterpriseBeanMetaData;
/**
*
*/
public class BeanInstantiatorDeployer extends AbstractDeployer
{
// ------------------------------------------------------------------------------||
// Class Members ----------------------------------------------------------------||
// ------------------------------------------------------------------------------||
/**
* Logger
*/
private static final Logger log = Logger.getLogger(BeanInstantiatorDeployer.class);
// ------------------------------------------------------------------------------||
// Instance Members -------------------------------------------------------------||
// ------------------------------------------------------------------------------||
/**
* {@link BeanInstantiator} implementation to attach to the {@link DeploymentUnit}
* if it's an EJB3 deployment
*/
private final BeanInstantiator beanInstantiator;
// ------------------------------------------------------------------------------||
// Constructor ------------------------------------------------------------------||
// ------------------------------------------------------------------------------||
public BeanInstantiatorDeployer(final BeanInstantiator beanInstantiator)
{
this.beanInstantiator = beanInstantiator;
this.setComponentsOnly(true);
this.setInput(JBossEnterpriseBeanMetaData.class);
}
// ------------------------------------------------------------------------------||
// Required Implementations -----------------------------------------------------||
// ------------------------------------------------------------------------------||
/**
* {@inheritdoc}
* @see org.jboss.deployers.spi.deployer.Deployer#deploy(org.jboss.deployers.structure.spi.DeploymentUnit)
*/
public void deploy(final DeploymentUnit unit) throws DeploymentException
{
// If not an EJB3 deployment, take no action
if (!this.isEjb3ComponentDeployment(unit))
{
return;
}
}
// ------------------------------------------------------------------------------||
// Helper Methods ---------------------------------------------------------------||
// ------------------------------------------------------------------------------||
/*
* These may be overridden for testing purposes
*/
/**
* Returns whether this is an EJB3 Deployment, determining if we should take action
* @param unit
* @return
*/
boolean isEjb3ComponentDeployment(final DeploymentUnit unit)
{
// Obtain the Merged Metadata
final JBossEnterpriseBeanMetaData ejb = unit.getAttachment(JBossEnterpriseBeanMetaData.class);
}
}