public MLLPTransportServiceComponent() {
}
protected void activate(ComponentContext ctxt) {
ConfigurationContext configContext;
HL7TransportService HL7Transport;
Properties props;
if (log.isDebugEnabled()) {
log.debug("MLLP Transport bundle is activated");
}
try {
if (contextService != null) {
// Getting server's configContext instance
configContext = contextService.getServerConfigContext();
} else {
throw new Exception(
"ConfigurationContext is not found while loading org.wso2.carbon.business.messaging.hl7.transport bundle");
}
// Save the transport configuration in the registry if not already done so
new TransportPersistenceManager(configContext.getAxisConfiguration()).saveTransportConfiguration(HL7TransportService.TRANSPORT_NAME,
ctxt.getBundleContext().getBundle().getResource(HL7TransportService.TRANSPORT_CONF));
// Instantiate HL7TransportService
HL7Transport = new HL7TransportService();
// This should ideally contain properties of HL7TransportService as a collection of
// key/value pair. Here we do not require to add any elements.
props = new Properties();