Methods Summary |
---|
public void | accept(com.sun.enterprise.deployment.Application application)visit an application object
this.application = application;
|
public void | accept(com.sun.enterprise.deployment.EjbBundleDescriptor bundleDescriptor)visits an ejb bundle descriptor
this.bundleDescriptor = bundleDescriptor;
super.accept(bundleDescriptor);
/** set the realm name on each ejb to match the ones on this application
* this is required right now to pass the stringent CSIv2 criteria
* whereby the realm-name for the ejb being authenticated on
* has to match the one on the application. We look at the IORConfigurator
* descriptor
* @todo: change the csiv2 layer so that it does not look at
* IORConfiguratorDescriptor.
* @see iiop/security/SecurityMechanismSelector.evaluateClientConformance.
*/
String rlm = application.getRealm();
Iterator ejbs = bundleDescriptor.getEjbs().iterator();
for(; ejbs.hasNext();){
EjbDescriptor ejb = (EjbDescriptor) ejbs.next();
Iterator iorconfig = ejb.getIORConfigurationDescriptors().iterator();
for (;iorconfig.hasNext(); ){
EjbIORConfigurationDescriptor desc =
(EjbIORConfigurationDescriptor)iorconfig.next();
desc.setRealmName(rlm);
}
}
|
public void | accept(com.sun.enterprise.deployment.WebBundleDescriptor descriptor)visit a web bundle descriptor
bundleDescriptor = descriptor;
ModuleDescriptor md = bundleDescriptor.getModuleDescriptor( );
// Fix for bug: 4837982
String uri = md.getArchiveUri( );
if( ( md.getContextRoot() == null )
&& ( ( uri != null ) && (uri.length() != 0) ) )
{
// Case 1: If there is a unix style file separator
// Example a/b/xxx.war
int beginIndex = uri.lastIndexOf( "/" );
// Case 2: If there is a windows style file separator
// Example a\b\xxx.war
if( beginIndex < 0 ) {
beginIndex = uri.lastIndexOf( File.separator );
}
// Case 3: No File separator
// Example xxx.war
if( beginIndex < 0 ) {
beginIndex = 0;
} else {
// If there is a separator, we need to increment to get the
// string past the last separator
beginIndex++;
}
// If the context-root is not specified, AppServer will use
// the file name with the extension removed as the context
// root
// NOTE: We can safely assume that the file extension is ".war"
// So no need to do extra checks
int endIndex = uri.lastIndexOf( ".war" );
if (endIndex==-1) {
return;
}
String warFileName = uri.substring( beginIndex, endIndex );
md.setContextRoot( warFileName );
if( DOLUtils.getDefaultLogger().isLoggable(Level.INFO) ) {
DOLUtils.getDefaultLogger().info(
"Context Root is not provided by the user, Using ["
+ warFileName + "] as Context Root" );
}
}
|
public void | accept(com.sun.enterprise.deployment.ApplicationClientDescriptor appclientdescriptor)visits a appclient descriptor
bundleDescriptor = appclientdescriptor;
// set the default lifecycle callback class
for (LifecycleCallbackDescriptor next :
appclientdescriptor.getPreDestroyDescriptors()) {
next.setDefaultLifecycleCallbackClass(
appclientdescriptor.getMainClassName());
}
for (LifecycleCallbackDescriptor next :
appclientdescriptor.getPostConstructDescriptors()) {
next.setDefaultLifecycleCallbackClass(
appclientdescriptor.getMainClassName());
}
|
public void | accept(com.sun.enterprise.deployment.WebComponentDescriptor descriptor)visit a web component descriptor
computeRuntimeDefault(descriptor);
|
private void | computeRuntimeDefault(com.sun.enterprise.deployment.WebComponentDescriptor webComp)
if (!webComp.getUsesCallerIdentity()) {
computeRunAsPrincipalDefault(
webComp.getRunAsIdentity(), webComp.getApplication());
}
|
protected com.sun.enterprise.deployment.Application | getApplication()
return application;
|
protected com.sun.enterprise.deployment.BundleDescriptor | getBundleDescriptor()
return bundleDescriptor;
|
protected java.util.Collection | getEjbDescriptors()
if (application!=null)
return application.getEjbDescriptors();
return new HashSet();
|