@LifeCycle(on = LifeCycleType.START) protected void start() { this.log = new LoggingUtil(this.logger); this.log.debug("Starting..."); }
/** * Start of the shared library lifecycle. * */ @LifeCycle(on = LifeCycleType.START) public void start() { this.log = new LoggingUtil(this.logger); this.log.call(); }
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(); }
/** * {@inheritDoc} */ public boolean shutdown(String saId) throws PEtALSWebServiceException { if (this.log.isDebugEnabled()) { this.log.debug("Entering method : shutdown with params saId = " + saId); } boolean result = true; try { result = this.deploymentService.shutdown(saId); } catch (PetalsException e) { String message = "Can not shutdown the SA with ID " + saId; this.log.warning(message, e); throw new PEtALSWebServiceException(message + "(" + e.getMessage() + ")"); } return result; }
@LifeCycle(on = LifeCycleType.START) protected void start() throws Exception { this.log = new LoggingUtil(this.logger); this.localContainerConfiguration = this.configurationService.getContainerConfiguration(); this.log.error(e.getMessage(), e); if ((this.registry != null) && (this.registry.isInitialized() || this.registry.isStarted())) { if (this.log.isDebugEnabled()) { this.log.warning(message, e); } else { this.log.warning(message); this.log.info("The registry is ready process requests on " + this.registry.getContext().getConfiguration().getMessageReceiverURL());
@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); }
@LifeCycle(on = LifeCycleType.START) public void start() throws IOException { this.log = new LoggingUtil(this.logger); this.log.start(); this.selectorAgentThread = new Thread(this, "SelectorAgent Thread"); this.selectorAgentThread.setDaemon(true); this.selector = Selector.open(); this.selectorAgentThread.start(); this.log.end(); }
/** * {@inheritDoc} */ public boolean install(URL url) throws PEtALSWebServiceException { if (this.log.isDebugEnabled()) { this.log.debug("Entering method : install with params url = " + url); } return this.componentInstallationService.install(url); }
@LifeCycle(on = LifeCycleType.STOP) protected void stop() throws Exception { if (this.log.isDebugEnabled()) { this.log.debug("Stopping..."); this.registry.cleanRemoteData(); } catch (RegistryException e) { if (this.log.isErrorEnabled()) { this.log.error(e.getMessage()); this.registry.delete(this.getRootPath(), true); } catch (RegistryException e) { if (this.log.isErrorEnabled()) { this.log.error(e.getMessage());
public String deploy(String serviceAssemblyZipUrl) throws Exception { this.log.start(); this.log.warning("Service Assembly '" + deploymentContext.getEntityName() + "' deployed with some SU deployment in failure"); } else { this.log.info("Service Assembly '" + deploymentContext.getEntityName() + "' deployed"); this.log.error("Unable to deploy the service assembly at '" + serviceAssemblyZipUrl + "'", e);
if (this.log.isDebugEnabled()) { this.log.debug("Service URL is " + url); this.log.debug("Service WSDL is " + wsdl); if (this.log.isInfoEnabled()) { this.log.info("Kernel Web service '" + serviceName + "' has been added and is available at '" + url + "'");
@LifeCycle(on = LifeCycleType.STOP) protected void stop() { this.log.start(); if (this.initialContextDecorator != null) { try { this.initialContextDecorator.closeInitialContextDecorator(); } catch (final NamingException e) { this.log.error(e); } finally { this.initialContextDecorator = null; } } this.log.end(); }
public synchronized InitialContext getInitialContext() throws NamingException { //lazy synchronized on this method this.log.call(); if (this.initialContextDecorator == null) { this.log.debug("Create a new InitialContext decorator"); final Hashtable<String, Object> env = this.getJNDIEnv(); this.log.debug("JNDI properties used : " + env); this.initialContextDecorator = new InitialContextDecorator(env, this.log, this.jndiAgentService); } return this.initialContextDecorator; }
public MessageExchangeFactoryImpl(final DeliveryChannel deliveryChannel, final org.ow2.petals.jbi.messaging.endpoint.ServiceEndpoint consumerEndpoint, final Logger logger) { this.log = new LoggingUtil(logger); this.deliveryChannel = deliveryChannel; this.consumerEndpoint = consumerEndpoint; }
public void onRead(final PipedDeserializer deserializer) { try { this.threadPoolTaskExecutor.execute(deserializer); } catch (final RejectedExecutionException e) { this.log.error("A message deserialization task has been rejected (" + e.getMessage() + ")"); } }
public boolean uninstallSharedLibrary(String slName, String version) { this.log.start(); if (processResult != null) { result = false; this.log.error("Unable to uninstall the shared library '" + sharedLibraryStateHolder.getName() + "'", processResult); } else { this.log.info("Shared library '" + slName + "' with version '" + sharedLibraryStateHolder.getVersion() + "' uninstalled");
/** * {@inheritDoc} */ public void start() { if ((this.log != null) && this.log.isLoggable(BasicLevel.DEBUG)) { this.log.log(BasicLevel.LEVEL_DEBUG, this.name + "-START-" + classAndMethod()); } }