use of com.sun.enterprise.security.SecurityManager in project Payara by payara.
the class SingletonContainerFactory method createContainer.
@Override
public Container createContainer(EjbDescriptor ejbDescriptor, ClassLoader loader, DeploymentContext deployContext) throws Exception {
// hence we can always cast
assert ejbDescriptor instanceof EjbSessionDescriptor;
EjbSessionDescriptor sd = (EjbSessionDescriptor) ejbDescriptor;
AbstractSingletonContainer container;
SecurityManager sm = getSecurityManager(ejbDescriptor);
if (sd.hasContainerManagedConcurrency()) {
container = new CMCSingletonContainer(ejbDescriptor, loader, sm);
} else {
container = new BMCSingletonContainer(ejbDescriptor, loader, sm);
}
container.initializeHome();
return container;
}
use of com.sun.enterprise.security.SecurityManager in project Payara by payara.
the class StatelessContainerFactory method createContainer.
@Override
public Container createContainer(EjbDescriptor ejbDescriptor, ClassLoader loader, DeploymentContext deployContext) throws Exception {
SecurityManager sm = getSecurityManager(ejbDescriptor);
StatelessSessionContainer slsbContainer = new StatelessSessionContainer(ejbDescriptor, loader, sm);
slsbContainer.initializeHome();
return slsbContainer;
}
use of com.sun.enterprise.security.SecurityManager in project Payara by payara.
the class EntityContainerFactory method createContainer.
public Container createContainer(EjbDescriptor ejbDescriptor, ClassLoader loader, DeploymentContext deployContext) throws Exception {
EntityContainer container = null;
SecurityManager sm = getSecurityManager(ejbDescriptor);
// hence we can always cast
assert ejbDescriptor instanceof EjbEntityDescriptor;
if (((EjbEntityDescriptor) ejbDescriptor).getIASEjbExtraDescriptors().isIsReadOnlyBean()) {
container = new ReadOnlyBeanContainer(ejbDescriptor, loader, sm);
} else {
String commitOption = null;
IASEjbExtraDescriptors iased = ((EjbEntityDescriptor) ejbDescriptor).getIASEjbExtraDescriptors();
if (iased != null) {
commitOption = iased.getCommitOption();
}
if (commitOption == null) {
commitOption = ejbContainerDesc.getCommitOption();
}
if (commitOption.equals("A")) {
_logger.log(Level.WARNING, "entitybean.container.commit_option_A_not_supported", new Object[] { ejbDescriptor.getName() });
container = new EntityContainer(ejbDescriptor, loader, sm);
} else if (commitOption.equals("C")) {
_logger.log(Level.FINE, "Using commit option C for: " + ejbDescriptor.getName());
container = new CommitCEntityContainer(ejbDescriptor, loader, sm);
} else {
_logger.log(Level.FINE, "Using commit option B for: " + ejbDescriptor.getName());
container = new EntityContainer(ejbDescriptor, loader, sm);
}
}
container.initializeHome();
return container;
}
use of com.sun.enterprise.security.SecurityManager in project Payara by payara.
the class MessageBeanContainerFactory method createContainer.
@Override
public Container createContainer(EjbDescriptor ejbDescriptor, ClassLoader loader, DeploymentContext deployContext) throws Exception {
SecurityManager sm = getSecurityManager(ejbDescriptor);
MessageBeanContainer mdbContainer = new MessageBeanContainer(ejbDescriptor, loader, sm);
return mdbContainer;
}
use of com.sun.enterprise.security.SecurityManager in project Payara by payara.
the class ExpiredSessionsRemovalTask method createContainer.
@Override
public Container createContainer(EjbDescriptor ejbDescriptor, ClassLoader loader, DeploymentContext deployContext) throws Exception {
this.ejbDescriptor = ejbDescriptor;
// FIXME: Read from domain.xml iiop-service ip-addr
byte[] ipAddress = new byte[4];
try {
ipAddress = InetAddress.getLocalHost().getAddress();
} catch (Exception ex) {
long val = System.identityHashCode(ipAddress) + System.currentTimeMillis();
Utility.longToBytes(val, ipAddress, 0);
}
// FIXME: Read from domain.xml
int port = 8080;
cacheProps.init(ejbDescriptor);
SecurityManager sm = getSecurityManager(ejbDescriptor);
sfsbContainer = new StatefulSessionContainer(ejbDescriptor, loader, sm);
buildComponents(ipAddress, port, deployContext);
sfsbContainer.initializeHome();
return sfsbContainer;
}
Aggregations