Methods Summary |
---|
public static com.sun.ejb.codegen.GeneratorException | createGeneratorException(java.lang.String key, com.sun.enterprise.deployment.EjbBundleDescriptor bundle)Create GeneratorException for this message key.
return new GeneratorException(I18NHelper.getMessage(
messages, key,
bundle.getApplication().getRegistrationName(),
getModuleName(bundle)));
|
public static com.sun.ejb.codegen.GeneratorException | createGeneratorException(java.lang.String key, com.sun.enterprise.deployment.EjbBundleDescriptor bundle, java.lang.Exception e)Create GeneratorException for this message key.
return new GeneratorException(I18NHelper.getMessage(
messages, key,
bundle.getApplication().getRegistrationName(),
getModuleName(bundle),
e.getMessage()));
|
public static com.sun.ejb.codegen.GeneratorException | createGeneratorException(java.lang.String key, java.lang.String beanName, com.sun.enterprise.deployment.EjbBundleDescriptor bundle)Create GeneratorException for this message key and bean name.
return new GeneratorException(I18NHelper.getMessage(
messages, key, beanName,
bundle.getApplication().getRegistrationName(),
getModuleName(bundle)));
|
public static com.sun.ejb.codegen.GeneratorException | createGeneratorException(java.lang.String key, java.lang.String beanName, com.sun.enterprise.deployment.EjbBundleDescriptor bundle, java.lang.Exception e)Create GeneratorException for this message key and bean name.
return createGeneratorException(key, beanName, bundle, e.getMessage());
|
public static com.sun.ejb.codegen.GeneratorException | createGeneratorException(java.lang.String key, java.lang.String beanName, com.sun.enterprise.deployment.EjbBundleDescriptor bundle, java.lang.Exception e, java.lang.StringBuffer buf)Create GeneratorException for this message key, bean name,
and a StringBuffer with validation exceptions.
String msg = (buf == null) ?
e.getMessage() :
buf.append(e.getMessage()).append('\n").toString();
return createGeneratorException(key, beanName, bundle, msg);
|
public static com.sun.ejb.codegen.GeneratorException | createGeneratorException(java.lang.String key, java.lang.String beanName, com.sun.enterprise.deployment.EjbBundleDescriptor bundle, java.lang.String msg)Create GeneratorException for this message key and bean name.
return new GeneratorException(I18NHelper.getMessage(
messages, key,
new Object[] {
beanName,
bundle.getApplication().getRegistrationName(),
getModuleName(bundle),
msg}
));
|
public static java.lang.String | getModuleName(com.sun.enterprise.deployment.EjbBundleDescriptor bundle)Calculate module name from a bundle.
String moduleName = null;
Application application = bundle.getApplication();
if (application.isVirtual()) {
// Stand-alone module is deployed.
moduleName = application.getRegistrationName();
} else {
// Module is deployed as a part of an Application.
String jarName = bundle.getModuleDescriptor().getArchiveUri();
int l = jarName.length();
// Remove ".jar" from the bundle's jar name.
moduleName = jarName.substring(0, l - 4);
}
return moduleName;
|