Methods Summary |
---|
public void | backupSunDescriptor()
File file = getSunDescriptorFile();
if (file == null) return;
if (file.exists()) {
try {
FileUtils.copy(file, new File(file.getAbsolutePath() + ".bak"));
} catch (java.io.IOException ioe) {
}
}
|
public void | generate()
if (ejbBundleDescriptor == null) return;
java.util.Set ejbDescriptors = ejbBundleDescriptor.getEjbs();
for (Iterator it = ejbDescriptors.iterator(); it.hasNext();) {
EjbDescriptor ejbDescriptor = (EjbDescriptor) it.next();
String jndiName = ejbDescriptor.getJndiName();
if ((jndiName == null) || (jndiName.length() <1)) {
String homeName = ejbDescriptor.getHomeClassName();
ejbDescriptor.setJndiName(homeName);
}
}
|
private java.io.File | getSunDescriptorFile()
File file = null;
String archiveUri = ejbBundleDescriptor.getModuleDescriptor().getArchiveUri();
String friendlyFileName = FileUtils.makeFriendlyFilename(archiveUri);
String sunXmlFileName = (applicationDirectory + File.separator +
friendlyFileName + File.separator +
com.sun.enterprise.deployment.io.DescriptorConstants.S1AS_EJB_DD_ENTRY);
file = new File(sunXmlFileName);
return file;
|
public boolean | hasSunDescriptor()
File file = getSunDescriptorFile();
if (file == null) return false;
if (file.exists()) {
return true;
}
return false;
|
public static void | main(java.lang.String[] args)
System.out.println("Ejb");
String appDir = "/home/sreeni/TEMP/stateless-converterEjb_1";
System.out.println("Press enter to continue ...");
try {
System.in.read();
} catch (java.io.IOException ioe) {
}
FileArchive in = new FileArchive();
try {
in.open(appDir);
} catch (java.io.IOException ioe) {
}
EjbArchivist ejbArchivist = new EjbArchivist();
ejbArchivist.setXMLValidation(false);
ejbArchivist.setClassLoader(null);
com.sun.enterprise.deployment.Application application = null;
try {
application = (com.sun.enterprise.deployment.Application)
ApplicationArchivist.openArchive(ejbArchivist, in, true);
} catch (java.io.IOException ioe) {
} catch (org.xml.sax.SAXParseException saxpe) {
}
com.sun.enterprise.ddgenerator.sun.Application app =
new com.sun.enterprise.ddgenerator.sun.Application(application, appDir);
app.generate();
|
public void | setApplicationDirectory(java.lang.String applicationDirectory)
this.applicationDirectory = applicationDirectory;
|
public void | setDescriptor(com.sun.enterprise.deployment.Descriptor descriptor)
this.ejbBundleDescriptor = (com.sun.enterprise.deployment.EjbBundleDescriptor) descriptor;
|