Methods Summary |
---|
protected com.sun.enterprise.instance.BaseManager | createConfigManager(com.sun.enterprise.instance.InstanceEnvironment ienv, com.sun.enterprise.instance.ModuleEnvironment menv)
manager = new EjbModulesManager(ienv);
return manager;
|
protected void | deploy()
loadDescriptors();
runVerifier();
// Set the generated XML directory in application desc
request.getDescriptor().setGeneratedXMLDirectory(xmlDir.getAbsolutePath());
ZipItem[] clientStubs = runEJBC();
createClientJar(clientStubs);
|
protected void | generatePolicy()
// if this is a part of application then generatePolicy in AppDeployerBa
// se will be called, so this should be a no-op
try
{
if(request.isApplication())
{
return;
}
else
{
Application app = request.getDescriptor();
EjbBundleDescriptor ejbBundleDesc =
(EjbBundleDescriptor)
app.getStandaloneBundleDescriptor();
//For standalone ejbs, the RoleMapper should be constructed by now
String name = EJBSecurityManager.getContextID(ejbBundleDesc);
SecurityUtil.generatePolicyFile(name);
EJBSecurityManagerFactory ejbsmf =
(EJBSecurityManagerFactory)EJBSecurityManagerFactory.getInstance();
ejbsmf.createSecurityManager(
(EjbDescriptor)ejbBundleDesc.getEjbs().iterator().next());
}
}
catch (IASSecurityException se)
{
String msg =
localStrings.getString("enterprise.deployment.backend.generate_policy_error" );
logger.log(Level.WARNING, msg, se);
throw new IASDeploymentException(msg, se);
}
|
protected boolean | needsStubs()
return true;
|
protected void | preDeploy()
assert stubsDir != null;
assert moduleDir != null;
assert moduleName != null;
try
{
if(request.isArchive()) {
// check if this is a .jar file or a single .class file
if (request.getFileSource().getFile().getName().endsWith(".class")) {
copyAutodeployedClassFile(request.getFileSource().getFile(), moduleDir);
} else {
J2EEModuleExploder.explodeJar(request.getFileSource().getFile(), moduleDir);
}
}
xmlDir.mkdirs();
stubsDir.mkdirs();
}
catch(Exception e)
{
throw new IASDeploymentException(e.toString(), e);
}
|
protected void | register()
super.register();
setShared(request.isSharedModule());
|
public void | removePolicy()
///////////////////////////////////////////////////////////////////////////
if (request.isApplication())
{
return;
}
String requestName = request.getName();
EJBSecurityManagerFactory ejbsmf =
(EJBSecurityManagerFactory)EJBSecurityManagerFactory.getInstance();
String[] names =
ejbsmf.getAndRemoveContextIdForEjbAppName(requestName);
String name = null;
try
{
if (names != null && names.length > 0 &&
names[0] != null) {
name = names[0];
SecurityUtil.removePolicy(name);
ejbsmf.removeSecurityManager(name);
}
}
catch(IASSecurityException ex)
{
String msg = localStrings.getString(
"enterprise.deployment.backend.remove_policy_error",name);
logger.log(Level.WARNING, msg, ex);
throw new IASDeploymentException(msg, ex);
}
|