use of org.apache.openejb.server.DiscoveryAgent in project tomee by apache.
the class EjbDaemon method init.
public void init(final Properties props) throws Exception {
containerSystem = SystemInstance.get().getComponent(ContainerSystem.class);
// deploymentIndex = new DeploymentIndex(containerSystem.deployments());
clientObjectFactory = new ClientObjectFactory(this, props);
ejbHandler = new EjbRequestHandler(this);
jndiHandler = new JndiRequestHandler(this);
authHandler = new AuthRequestHandler(this);
logoutHandler = new LogoutRequestHandler(this);
clusterHandler = new ClusterRequestHandler(this);
gzip = "true".equalsIgnoreCase(props.getProperty("gzip", "false"));
try {
this.timeout = Integer.parseInt(props.getProperty("timeout", "14400000"));
} catch (Exception e) {
// Ignore
}
final String serializer = props.getProperty("serializer", null);
if (serializer != null) {
try {
this.serializer = EJBDSerializer.class.cast(Thread.currentThread().getContextClassLoader().loadClass(serializer).newInstance());
} catch (final ClassNotFoundException | NoClassDefFoundError cnfe) {
// let's try later with app classloader
this.serializer = new ContextualSerializer(serializer);
}
}
final DiscoveryAgent discovery = SystemInstance.get().getComponent(DiscoveryAgent.class);
if (discovery != null) {
discovery.setDiscoveryListener(clusterHandler);
}
countStreams = Boolean.parseBoolean(props.getProperty("stream.count", Boolean.toString(jndiHandler.isDebug())));
securityService = SystemInstance.get().getComponent(SecurityService.class);
}
Aggregations