public void onConnectionIsAccepted(final SocketChannel socketChannel, final Selector selector) throws IOException { this.log.info("A connection is accepted: " + socketChannel.socket().toString()); final PipedDeserializer deserializer = new PipedDeserializerImpl(socketChannel, this.messageReceiver, this.logger, this.log); this.deserializationTasks.put(socketChannel, deserializer); socketChannel.register(selector, SelectionKey.OP_READ, new InputSocketChannelContext( socketChannel, deserializer, this)); }
@LifeCycle(on = LifeCycleType.STOP) public void stop() throws Exception { this.log.start(); this.log.debug("Stopping NIO Server agent."); this.serverSocketChannel.close(); this.log.info("The NIO Server agent is stopped."); this.threadPoolTaskExecutor.shutdownNow(); this.log.end(); }
public void stopContainer() throws Exception { this.log.start(); this.log.info("PEtALS is stopping..."); // launch the stop of the Petals server in a different thread this.petalsStopThread.start(); this.log.end(); }
log.info("Creating database tables"); statementCreate = connection.createStatement();
this.log.info("Installer of the component '" + componentName + "' loaded");
public void shutdownContainer() throws Exception { this.log.start(); this.log.info("PEtALS is shutting down..."); this.log.info(" 1/3 Undeploy Service Assemblies..."); try { this.deployment.shutdown(); } catch (Exception e) { this.log.error("Can not shut down the Deployment service.", e); } this.log.info(" 2/3 Uninstall Shared Libraries and Components..."); try { this.installation.shutdown(); } catch (Exception e) { this.log.error("Can not shut down the Installation service", e); } this.log.info(" 3/3 Stopping the server..."); // launch the stop of the Petals server in a different thread this.petalsStopThread.start(); this.log.end(); }
@LifeCycle(on = LifeCycleType.START) public void start() throws IOException { this.log = new LoggingUtil(this.logger); this.log.start(); final int listenPort = this.configurationService.getContainerConfiguration().getTCPPort(); final String host = this.configurationService.getContainerConfiguration().getHost(); this.log.debug("Starting NIO transporter server on port " + listenPort); this.serverSocket = new InetSocketAddress(host, listenPort); this.serverSocketChannel = ServerSocketChannel.open(); // Caution, as the queue of the thread pool is a LinkedBlockingQueue, // the parameters maxPoolSize and keep alive time have no sense. // TODO: When using JDK6, we can use // ThreadPoolExecutor.allowCoreThreadTimeOut to decrease the number of // thread in the pool. final int nbAcceptors = this.configurationService.getContainerConfiguration().getTCPReceivers(); this.threadPoolTaskExecutor = new ThreadPoolExecutor(nbAcceptors, nbAcceptors, 5, TimeUnit.SECONDS, new LinkedBlockingQueue<Runnable>(), new DeserializerThreadFactory()); // TODO: Set socket options // this.serverSocketChannel.socket().setPerformancePreferences(0, 1, 2); this.serverSocketChannel.socket().bind(this.serverSocket, 100); this.serverSocketChannel.configureBlocking(false); this.log.info("The NIO transporter server is ready to process request on port " + listenPort); this.selectorAgent.register(SelectionKey.OP_ACCEPT, this.serverSocketChannel, this); }
this.log.info("Shared Library '" + installationContext.getEntityName() + "' with version '" + installationContext.getEntityVersion() + "' installed");
+ "' deployed with some SU deployment in failure"); } else { this.log.info("Service Assembly '" + deploymentContext.getEntityName() + "' deployed");
/** * load the Regulation configuration. * * @throws RegulationException */ private boolean loadRegulationConfiguration() throws RegulationException { boolean result = false; final URL regulationUrl = this.getClass().getResource("/" + REGULATION_CONFIGURATION_FILE); if (regulationUrl != null) { final Regulation regulation = RegulationBuilder.createRegulation(regulationUrl .getFile()); for (Flow flow : regulation.getFlow()) { RouterMonitorFilter routerMonitorFilter = new RouterMonitorFilter(flow .getInterface(), flow.getService(), flow.getEndpoint(), flow.getOperation(), false); if (flow.getRate() != null) { this.rates.put(routerMonitorFilter, new _Rate(flow.getRate())); this.log.info("Add a flow control on " + routerMonitorFilter + " with rate " + flow.getRate()); } } result = true; } return result; } }
+ sharedLibraryStateHolder.getName() + "' failed", processResult); } else { this.log.info("Shared library '" + slName + "' with version '" + sharedLibraryStateHolder.getVersion() + "' uninstalled");
public void loadSharedLibrary() throws PetalsException { this.log.start(); final String slName = this.sharedLibrary.getIdentification().getName(); final String slVersion = this.sharedLibrary.getVersion(); final String classLoaderId = slName + "-" + slVersion; final List<String> classpathUrls = this.sharedLibrary.getSharedLibraryClassPath() .getPathElement(); this.loaderService.createSharedLibraryClassLoader(classLoaderId, this.baseUrls, classpathUrls, this.useParentFirst); this.state = SharedLibraryLifeCycleImpl.INSTALLED; this.log.info("Shared library '" + slName + "' (" + slVersion + ") loaded."); this.log.end(); }
public void handleNotification(Notification notification, Object handback) { if (MemoryNotificationInfo.MEMORY_THRESHOLD_EXCEEDED.equals(notification.getType())) { this.log.info("Memory threshold reached, persist some pending exchange if any"); int pendingMessage = this.exchangePriority0.size() + this.exchangePriority1.size() + this.exchangePriority2.size() + this.exchangePriority3.size();
this.log.info("Kernel Web service '" + serviceName + "' has been added and is available at '" + url + "'");
this.filters.put(routerMonitorFilter, new _Filter(flow.getFilter().getValue(), flow.getFilter().getWindow())); this.log.info("Add a flow filter on " + routerMonitorFilter + " with threshold " + flow.getFilter().getValue() + " on window " + flow.getFilter().getWindow());
+ sharedLibraryStateHolder.getName() + "'", processResult); } else { this.log.info("Shared library '" + slName + "' with version '" + sharedLibraryStateHolder.getVersion() + "' uninstalled");
this.log.info("JMX RMI server started at : " + "service:jmx:rmi://" + this.cs.getAddress().getURLPath());
this.log.info("The registry is ready process requests on " + this.registry.getContext().getConfiguration().getMessageReceiverURL());