use of com.sun.ejb.codegen.StaticRmiStubGenerator in project Payara by payara.
the class EjbDeployer method generateArtifacts.
/**
* Use this method to generate any ejb-related artifacts for the module
*/
@Override
protected void generateArtifacts(DeploymentContext dc) throws DeploymentException {
OpsParams params = dc.getCommandParameters(OpsParams.class);
if (!(params.origin.isDeploy() && isDas())) {
// Generate artifacts only when being deployed on DAS
return;
}
EjbBundleDescriptorImpl bundle = dc.getModuleMetaData(EjbBundleDescriptorImpl.class);
DeployCommandParameters dcp = dc.getCommandParameters(DeployCommandParameters.class);
boolean generateRmicStubs = dcp.generatermistubs;
dc.addTransientAppMetaData(CMPDeployer.MODULE_CLASSPATH, getModuleClassPath(dc));
if (generateRmicStubs) {
StaticRmiStubGenerator staticStubGenerator = new StaticRmiStubGenerator(habitat);
try {
staticStubGenerator.ejbc(dc);
} catch (Exception e) {
throw new DeploymentException("Static RMI-IIOP Stub Generation exception for " + dc.getSourceDir(), e);
}
}
if (bundle == null || !bundle.containsCMPEntity()) {
// bundle WAS null in a war file where we do not support CMPs
return;
}
initCMPDeployer();
if (cmpDeployer == null) {
throw new DeploymentException("No CMP Deployer is available to deploy this module");
}
cmpDeployer.deploy(dc);
}
Aggregations