[jboss-dev-forums] [JBoss AS Development Deployment Framework] Document updated/added: "VDF Informer"
Carlo de Wolf
do-not-reply at jboss.com
Thu Mar 18 05:28:12 EDT 2010
JBoss development,
The document "VDF Informer", was updated Mar 18, 2010
by Carlo de Wolf.
To view the document, visit:
http://community.jboss.org/docs/DOC-14997#cf
Document:
--------------------------------------------------------------
h3. Context
A deployer needs to act upon information stored within a deployment unit.
h3. Problem
The deployer is unaware of the mechanism to extract such information from the deployment unit.
h3. Solution
The deployer delegates to an informer to let the informer provide the information for the deployment to happen.
h4. Structure
http://community.jboss.org/servlet/JiveServlet/showImage/102-14997-1-2359/VDFInformer.png
h4. Sample Code
http://viewvc.jboss.org/cgi-bin/viewvc.cgi/jbossas/projects/reloaded/trunk/naming-deployers/src/test/java/org/jboss/reloaded/naming/deployers/test/common/DummyDeployer.java?revision=102525&view=markup
private JavaEEComponentInformer informer;
@Override
public void deploy(DeploymentUnit unit, DummyMetaData deployment) throws DeploymentException
{
String appName = informer.getApplicationName(unit);
String moduleName = informer.getModulePath(unit);
String componentName = informer.getComponentName(unit);
// do your stuff
}
@Inject
public void setJavaEEComponentInformer(JavaEEComponentInformer informer)
{
this.informer = informer;
}
--------------------------------------------------------------
More information about the jboss-dev-forums
mailing list