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...
h4. Sample Code
http://viewvc.jboss.org/cgi-bin/viewvc.cgi/jbossas/projects/reloaded/trun...
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;
}
--------------------------------------------------------------