/** * This is a deprecated method in Axis2 and this default implementation returns the first * result from the getEPRsForService() method */ public EndpointReference getEPRForService(String serviceName, String ip) throws AxisFault { return getEPRsForService(serviceName, ip)[0]; }
void internalStopListeningForService(AxisService service) { unregisterMBean(getEndpointMBeanName(service.getName())); stopListeningForService(service); }
public void start() throws AxisFault { if (state != BaseConstants.STARTED) { state = BaseConstants.STARTED; // register to receive updates on services for lifetime management // cfgCtx.getAxisConfiguration().addObservers(axisObserver); log.info(getTransportName().toUpperCase() + " listener started"); // iterate through deployed services and start serviceTracker.start(); } }
void internalStartListeningForService(AxisService service) { String serviceName = service.getName(); try { startListeningForService(service); } catch (AxisFault ex) { String transportName = getTransportName().toUpperCase(); String msg = "Unable to configure the service " + serviceName + " for the " + transportName + " transport: " + ex.getMessage() + ". " + "transport", ex); BaseUtils.markServiceAsFaulty(serviceName, msg, service.getAxisConfiguration()); disableTransportForService(service); return; } catch (Throwable ex) { String msg = "Unexpected error when configuring service " + serviceName + " for the " + getTransportName().toUpperCase() + " transport. It will be" + " disabled for this transport and marked as faulty."; log.error(msg, ex); BaseUtils.markServiceAsFaulty(serviceName, msg, service.getAxisConfiguration()); disableTransportForService(service); return; registerMBean(new TransportListenerEndpointView(this, serviceName), getEndpointMBeanName(serviceName));
/** * This is the TransportListener initialization method invoked by Axis2 * * @param cfgCtx the Axis configuration context * @param trpInDesc the TransportIn description */ public void init(ConfigurationContext cfgCtx, TransportInDescription trpInDesc) throws AxisFault { super.init(cfgCtx, trpInDesc); fixSessionFactory = FIXSessionFactory.getInstance(new FIXApplicationFactory(cfgCtx)); fixSessionFactory.setListenerThreadPool(this.workerPool); log.info("FIX transport listener initialized..."); }
public void destroy() { try { if (state == BaseConstants.STARTED) { try { stop(); } catch (AxisFault ignore) { log.warn("Error stopping the transport : " + getTransportName()); } } } finally { state = BaseConstants.STOPPED; mbeanSupport.unregister(); } try { workerPool.shutdown(10000); } catch (InterruptedException ex) { log.warn("Thread interrupted while waiting for worker pool to shut down"); } }
getTransportIn(FIXConstants.TRANSPORT_NAME).getReceiver(); MessageContext msgCtx = trpListener.createMessageContext(); msgCtx.setProperty(Constants.OUT_TRANSPORT_INFO, new FIXOutTransportInfo(sessionID)); trpListener.handleIncomingMessage( msgCtx, FIXUtils.getTransportHeaders(service.getName(), fixApplication),
public void serviceRemoved(AxisService service) { internalStopListeningForService(service); } });
public void serviceAdded(AxisService service) { internalStartListeningForService(service); }
void internalStartListeningForService(AxisService service) { String serviceName = service.getName(); try { startListeningForService(service); } catch (AxisFault ex) { String transportName = getTransportName().toUpperCase(); String msg = "Unable to configure the service " + serviceName + " for the " + transportName + " transport: " + ex.getMessage() + ". " + "transport", ex); BaseUtils.markServiceAsFaulty(serviceName, msg, service.getAxisConfiguration()); disableTransportForService(service); return; } catch (Throwable ex) { String msg = "Unexpected error when configuring service " + serviceName + " for the " + getTransportName().toUpperCase() + " transport. It will be" + " disabled for this transport and marked as faulty."; log.error(msg, ex); BaseUtils.markServiceAsFaulty(serviceName, msg, service.getAxisConfiguration()); disableTransportForService(service); return; registerMBean(new TransportListenerEndpointView(this, serviceName), getEndpointMBeanName(serviceName));
@Override public final void init(ConfigurationContext cfgCtx, TransportInDescription transportIn) throws AxisFault { super.init(cfgCtx, transportIn); doInit(); // Create endpoint configured at transport level (if available) E endpoint = createEndpoint(); endpoint.init(this, null); if (endpoint.loadConfiguration(transportIn)) { globalEndpoint = endpoint; } }
public void destroy() { try { if (state == BaseConstants.STARTED) { try { stop(); } catch (AxisFault ignore) { log.warn("Error stopping the transport : " + getTransportName()); } } } finally { state = BaseConstants.STOPPED; mbeanSupport.unregister(); } try { workerPool.shutdown(10000); } catch (InterruptedException ex) { log.warn("Thread interrupted while waiting for worker pool to shut down"); } }
public void serviceRemoved(AxisService service) { internalStopListeningForService(service); } });
public void serviceAdded(AxisService service) { internalStartListeningForService(service); }
void internalStopListeningForService(AxisService service) { unregisterMBean(getEndpointMBeanName(service.getName())); stopListeningForService(service); }
@Override public final void init(ConfigurationContext cfgCtx, TransportInDescription transportIn) throws AxisFault { super.init(cfgCtx, transportIn); doInit(); // Create endpoint configured at transport level (if available) E endpoint = createEndpoint(); endpoint.init(this, null); if (endpoint.loadConfiguration(transportIn)) { globalEndpoint = endpoint; } }
public void stop() throws AxisFault { if (state == BaseConstants.STARTED) { state = BaseConstants.STOPPED; // cancel receipt of service lifecycle events log.info(getTransportName().toUpperCase() + " Listener Shutdown"); serviceTracker.stop(); } }
/** * This is a deprecated method in Axis2 and this default implementation returns the first * result from the getEPRsForService() method */ public EndpointReference getEPRForService(String serviceName, String ip) throws AxisFault { return getEPRsForService(serviceName, ip)[0]; }
public void start() throws AxisFault { if (state != BaseConstants.STARTED) { state = BaseConstants.STARTED; // register to receive updates on services for lifetime management // cfgCtx.getAxisConfiguration().addObservers(axisObserver); log.info(getTransportName().toUpperCase() + " listener started"); // iterate through deployed services and start serviceTracker.start(); } }
public EndpointReference[] getEPRsForService(String serviceName, String ip) throws AxisFault { return getEPRsForService(serviceName); }