String modulename =
com.sun.enterprise.util.io.FileUtils.makeFriendlyFilename(archiveuri);
String ejbname = ejbDescriptor.getName();
IASEjbExtraDescriptors iased = null;
//Server svr = null;
Config cfg = null;
EjbContainer ejbContainerDesc = null;
try {
// instantiate container class
if (ejbDescriptor instanceof EjbSessionDescriptor) {
EjbSessionDescriptor sd = (EjbSessionDescriptor)ejbDescriptor;
if ( sd.isStateless() ) {
container = new StatelessSessionContainer(ejbDescriptor, loader);
} else {
//container = new StatefulSessionContainer(ejbDescriptor, loader);
BaseContainerBuilder builder =
new StatefulContainerBuilder();
builder.buildContainer(ejbDescriptor, loader,
dynamicConfigContext);
container = builder.getContainer();
//containers.put(ejbDescriptor.getUniqueId(), container);
//builder.completeInitialization(sm);
}
} else if ( ejbDescriptor instanceof EjbMessageBeanDescriptor ) {
container = new MessageBeanContainer(ejbDescriptor, loader);
// Message-driven beans don't have a home or remote interface.
hasHome = false;
} else {
if (((EjbEntityDescriptor)ejbDescriptor).getIASEjbExtraDescriptors()
.isIsReadOnlyBean()) {
EjbEntityDescriptor robDesc = (EjbEntityDescriptor) ejbDescriptor;
container = new ReadOnlyBeanContainer (ejbDescriptor, loader);
} else
if ((ejbDescriptor.getLocalHomeClassName() != null) &&
(ejbDescriptor.getLocalHomeClassName()
.equals("com.sun.ejb.containers.TimerLocalHome"))) {
container = new TimerBeanContainer(ejbDescriptor, loader);
} else {
iased = ((EjbEntityDescriptor)ejbDescriptor).
getIASEjbExtraDescriptors();
if (iased != null) {
commitOption = iased.getCommitOption();
}
if (commitOption == null) {
try {
ServerContext sc =
ApplicationServer.getServerContext();