@Component(role=EAPPatch.class, hint="webfragment") public class EAPWebfragmentPatch extends EAPDynamicModulesPatch
webfragment.xml file, and this JAR is placed as a static module resource, this webfragment is not loaded by the JBoss container.
So, this patch extracts the webfragment.xml file from JAR artifact and creates a new JAR "on the fly" adding this descriptor. Then, the new generated JAR file is added into the webapp that is used with the current modules distribution.staticLayerDistribution| Constructor and Description |
|---|
EAPWebfragmentPatch()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
doApply(EAPContainer eap)
Used to check if this patch apply for a given container.
|
void |
execute(EAPModuleGraphNode node,
Properties patchProperties) |
String |
getId()
The unique identifier for the patch.
|
void |
patchAssembly(EAPDynamicModule module,
EAPAssemblyTemplate assemblyTemplate)
Add the webfragment generated JAR as file inclusion in the module assembly descriptor.
|
execute, getArtifact, getNodePatchProperties, getStaticLayerDistribution, setStaticLayerDistributiongetArtifactsHolder, getCurrentPatchModulePropertyName, getOutputPath, getPatchProperties, setArtifactsHolder, setOutputPathpublic String getId()
EAPPatchpublic boolean doApply(EAPContainer eap)
EAPPatcheap - The JBoss EAP/AS container instance.public void execute(EAPModuleGraphNode node, Properties patchProperties) throws EAPPatchException
execute in class EAPDynamicModulesPatchEAPPatchExceptionpublic void patchAssembly(EAPDynamicModule module, EAPAssemblyTemplate assemblyTemplate) throws EAPPatchException
patchAssembly in class EAPDynamicModulesPatchassemblyTemplate - The assembly teamplte model.EAPPatchExceptionCopyright © 2001–2016 JBoss by Red Hat. All rights reserved.