@Override protected void doStart() throws MuleException { try { quartzScheduler.start(); } catch (Exception e) { throw new ConnectorException(CoreMessages.failedToStart("Quartz provider"), this, e); } }
@Override public void start() throws MuleException { try { mBeanServer.invoke(adaptorName, "start", null, null); } catch (InstanceNotFoundException e) { throw new JmxManagementException( CoreMessages.failedToStart("Jdmk agent"), adaptorName, e); } catch (MBeanException e) { throw new JmxManagementException( CoreMessages.failedToStart("Jdmk agent"), adaptorName, e); } catch (ReflectionException e) { // ignore } }
@Override protected void doStart() throws MuleException { try { httpServer.start(); for (ConnectorHolder<?, ?> contextHolder : holders.values()) { contextHolder.start(); } } catch (Exception e) { throw new LifecycleException(CoreMessages.failedToStart("Jetty Http Receiver"), e, this); } }
public void start() throws MuleException { if (mBeanServer == null) { throw new InitialisationException(MessageFactory.createStaticMessage("mBeanServer has not yet been created"), this); } try { mBeanServer.invoke(adaptorName, "start", null, null); } catch (InstanceNotFoundException e) { throw new JmxManagementException( CoreMessages.failedToStart("Mx4j agent"), adaptorName, e); } catch (MBeanException e) { throw new JmxManagementException( CoreMessages.failedToStart("Mx4j agent"), adaptorName, e); } catch (ReflectionException e) { // ignore } }
@Override public void initialise() throws InitialisationException { try { mBeanServer = MBeanServerFactory.findMBeanServer(null).get(0); final Object adaptor = createAdaptor(); if (StringUtils.isBlank(jmxAdaptorUrl)) { if (StringUtils.isNotBlank(host) && StringUtils.isNotBlank(port)) { jmxAdaptorUrl = PROTOCOL_PREFIX + host + ":" + port; } else { jmxAdaptorUrl = DEFAULT_JMX_ADAPTOR_URL; } } // TODO use Jmx support classes adaptorName = new ObjectName("Adaptor:class=" + adaptor.getClass().getName()); mBeanServer.registerMBean(adaptor, adaptorName); } catch (Exception e) { throw new InitialisationException(CoreMessages.failedToStart("Jdmk Agent"), e, this); } }
throw new JmxManagementException(CoreMessages.failedToStart("Jmx Agent"), e); throw new JmxManagementException(CoreMessages.failedToStart("Jmx Agent"), e);
@Override protected void doInitialise() throws InitialisationException { try { jmxSupport = jmxSupportFactory.getJmxSupport(); mBeanServer = MBeanServerFactory.findMBeanServer(null).get(0); broadcasterObjectName = ObjectName.getInstance(jmxSupport.getDomainName(muleContext) + ":" + BROADCASTER_JMX_OBJECT_NAME); broadcastNotificationMbean = new BroadcastNotificationService(); mBeanServer.registerMBean(broadcastNotificationMbean, broadcasterObjectName); if (registerListenerMbean) { listenerObjectName = ObjectName.getInstance(jmxSupport.getDomainName(muleContext) + ":" + LISTENER_JMX_OBJECT_NAME); NotificationListener mbean = new NotificationListener(); broadcastNotificationMbean.addNotificationListener(mbean, null, null); mBeanServer.registerMBean(mbean, listenerObjectName); } } catch (Exception e) { throw new InitialisationException(CoreMessages.failedToStart("JMX Server Notification Agent"), e, this); } }
/** * Propagates start() life-cycle to component object implementations if they * implement the mule {@link Startable} interface. NOT: It is up to component * implementations to ensure their implementation of start() is thread-safe. */ @Override public void start() throws MuleException { if (isStartable) { try { ((Startable) componentObject).start(); started = true; } catch (Exception e) { throw new DefaultMuleException(CoreMessages.failedToStart("Service: " + flowConstruct.getName()), e); } } else { started = true; } }
public void onTransition(String phaseName, SedaStageInterceptingMessageProcessor object) throws MuleException { if (queue == null) { throw new IllegalStateException("Not initialised"); } SedaStageInterceptingMessageProcessor.super.start(); try { workManagerSource.getWorkManager().scheduleWork( SedaStageInterceptingMessageProcessor.this, WorkManager.INDEFINITE, null, new AsyncWorkListener(next)); } catch (WorkException e) { throw new LifecycleException(CoreMessages.failedToStart(getStageDescription()), e, this); } } });
@Override protected void doStart() throws MuleException { super.doStart(); if (Startable.class.isAssignableFrom(objectFactory.getObjectClass())) { try { ((Startable) objectFactory.getInstance(muleContext)).start(); } catch (Exception e) { throw new ServiceException(CoreMessages.failedToStart("Service '" + flowConstruct.getName() + "'"), e); } } }
public void initialise() throws InitialisationException { if(!isApiAvailable()) { logger.warn("Cannot find YourKit API. Profiler JMX Agent will be unregistered."); unregisterMeQuietly(); return; } final List servers = MBeanServerFactory.findMBeanServer(null); if(servers.isEmpty()) { throw new InitialisationException(ManagementMessages.noMBeanServerAvailable(), this); } try { mBeanServer = (MBeanServer) servers.get(0); profilerName = jmxSupport.getObjectName(jmxSupport.getDomainName(muleContext) + ":" + PROFILER_OBJECT_NAME); // unregister existing YourKit MBean first if required unregisterMBeansIfNecessary(); mBeanServer.registerMBean(new YourKitProfilerService(), profilerName); } catch(Exception e) { throw new InitialisationException(CoreMessages.failedToStart(this.getName()), e, this); } }
throw new InitialisationException(CoreMessages.failedToStart("wrapper agent"), e, this);
CoreMessages.failedToStart("Mule server from builder"), e); throw new ConfigurationException(CoreMessages.failedToStart("Mule server from builder"), e);
throw new MuleRuntimeException(CoreMessages.failedToStart("local channel work manager"), e);
throw new EndpointException(CoreMessages.failedToStart("Quartz receiver"), e);
public void initialise() throws InitialisationException { try { jmxSupport = jmxSupportFactory.getJmxSupport(); mBeanServer = MBeanServerFactory.getOrCreateMBeanServer(); if (StringUtils.isBlank(jmxAdaptorUrl)) { if (StringUtils.isNotBlank(host) && StringUtils.isNotBlank(port)) { jmxAdaptorUrl = PROTOCOL_PREFIX + host + ":" + port; } else { jmxAdaptorUrl = DEFAULT_JMX_ADAPTOR_URL; } } adaptor = createAdaptor(); adaptorName = jmxSupport.getObjectName(jmxSupport.getDomainName(muleContext) + ":" + HTTP_ADAPTER_OBJECT_NAME); unregisterMBeansIfNecessary(); mBeanServer.registerMBean(adaptor, adaptorName); } catch (Exception e) { throw new InitialisationException(CoreMessages.failedToStart("mx4j agent"), e, this); } }
@Override public void onNotification(MuleContextNotification notification) { if (notification.getAction() == MuleContextNotification.CONTEXT_STARTED) { //We delay starting until the context has been started since we need the MuleAjaxServlet to initialise first setInitialStateStopped(false); try { start(); // update the agent displaying webapp urls to the user final JettyWebappServerAgent agent = (JettyWebappServerAgent) muleContext.getRegistry().lookupAgent(JettyWebappServerAgent.NAME); if (agent != null) { agent.onJettyConnectorStarted(JettyHttpConnector.this); } } catch (MuleException e) { throw new MuleRuntimeException(CoreMessages.failedToStart(getName()), e); } } } });
throw new ServiceException(CoreMessages.failedToStart("Service '" + flowConstruct.getName() + "'"), e);