private PersistenceManager getPersistanceManager(){ PersistenceManager persistenceManager = null; if (this.configurationContext.getProperty( MercuryConstants.RM_PERSISTANCE_MANAGER) != null){ persistenceManager = (PersistenceManager) this.configurationContext.getProperty(MercuryConstants.RM_PERSISTANCE_MANAGER); } return persistenceManager; }
private String getHTTPClientVersion() { Object version = configContext.getProperty(HTTPTransportConstants.HTTP_CLIENT_VERSION); if (version != null) { return String.valueOf(version); } return null; }
public void shutDown(ConfigurationContext configurationcontext, AxisService axisservice) { logger.info("Message box shutting down"); if (configurationcontext.getProperty(MsgBoxCommonConstants.MSGBOX_STORAGE) != null) { MsgBoxStorage msgBoxStorage = (MsgBoxStorage) configurationcontext .getProperty(MsgBoxCommonConstants.MSGBOX_STORAGE); msgBoxStorage.dispose(); } }
public void shutDown(ConfigurationContext configctx, AxisService service) { Registry registry = (JCRRegistry) configctx.getProperty(CONFIGURATION_CONTEXT_REGISTRY); String gfacURL = (String) configctx.getProperty(GFAC_URL); registry.deleteGFacDescriptor(gfacURL); thread.interrupt(); try { thread.join(); } catch (InterruptedException e) { log.info("GFacURL update thread is interrupted"); } }
private PersistenceManager getPersistanceManager(){ PersistenceManager persistenceManager = null; if (this.axis2Info.getConfigurationContext().getProperty( MercuryConstants.RM_PERSISTANCE_MANAGER) != null){ persistenceManager = (PersistenceManager) this.axis2Info.getConfigurationContext().getProperty(MercuryConstants.RM_PERSISTANCE_MANAGER); } return persistenceManager; }
public static ThrottleContext getApplicationThrottleContext(MessageContext synCtx, ConfigurationContext cc, String applicationId){ synchronized (lock) { Object throttleContext = cc.getProperty(APP_THROTTLE_CONTEXT_PREFIX + applicationId); if(throttleContext == null){ return createThrottleContext(synCtx, cc, applicationId); } return (ThrottleContext)throttleContext; } }
/** * Returns the TaskManager instance currently being used * * @return TaskManager */ private synchronized TaskManager getTaskManager() { return (TaskManager) getConfigContext().getProperty( TaskManager.CARBON_TASK_MANAGER); }
protected String getDataServiceFileExtension() { ConfigurationContext configCtx = this.getConfigContext(); String fileExtension = (String) configCtx.getProperty(DBConstants.DB_SERVICE_EXTENSION); return fileExtension; }
@Override protected void updateRegistry(AiravataAPI airavataAPI) throws Exception { URI localAddress = new URI((String) this.context.getProperty(GFAC_URL)); airavataAPI.getAiravataManager().addGFacURI(localAddress); log.debug("Updated GFac service URL in to Repository"); } }
@Override protected void doInit() throws AxisFault { super.doInit(); // set the synchronise callback table if (cfgCtx.getProperty(BaseConstants.CALLBACK_TABLE) == null){ cfgCtx.setProperty(BaseConstants.CALLBACK_TABLE, new ConcurrentHashMap()); } }
@Override protected void updateRegistry(AiravataAPI registry) throws Exception { URI localAddress = (URI) this.context.getProperty(SERVICE_URL); registry.getAiravataManager().setMessageBoxURI(localAddress); logger.debug("Updated Message box service URL in to Repository"); } }
private String getFilePathFromArchiveId(String archiveId) { ConfigurationContext configCtx = MessageContext.getCurrentMessageContext().getConfigurationContext(); Map fileResMap = (Map) configCtx.getProperty(org.wso2.wsas.ServerConstants.FILE_RESOURCE_MAP); return (String) fileResMap.get(archiveId); }
private String getFilePathFromFileId(String fileId) { ConfigurationContext configCtx = MessageContext.getCurrentMessageContext().getConfigurationContext(); Map fileResMap = (Map) configCtx.getProperty(ServerConstants.FILE_RESOURCE_MAP); return (String) fileResMap.get(fileId); } }
@Override protected void doInit() throws AxisFault { super.doInit(); // set the synchronise callback table if (cfgCtx.getProperty(BaseConstants.CALLBACK_TABLE) == null){ cfgCtx.setProperty(BaseConstants.CALLBACK_TABLE, new ConcurrentHashMap()); } }
public void init(ServiceContext context) throws AxisFault { this.storage = (MsgBoxStorage) context.getConfigurationContext().getProperty( MsgBoxCommonConstants.MSGBOX_STORAGE); logger.info("Start clean up thread for messagebox"); deletingThread = new Thread(new DeleteOldMessageRunnable()); deletingThread.start(); }
public DirectoryStructureMetaData getDirectoryStructure() throws JSONException { String repo = getAxisConfig().getRepository().getPath(); File folder = new File(repo); JSONObject obj = new JSONObject(); traverseParent(obj, folder, folder.getName()); obj.put(DIRECTORY_NAME_LABEL, folder.getName()); Boolean reloadRequiredProp = (Boolean) getConfigContext().getProperty(RELOAD_REQUIRED); boolean reloadRequired = (reloadRequiredProp != null) ? reloadRequiredProp : false; return new DirectoryStructureMetaData(obj.toString(), reloadRequired); }
protected void updateRegistry(AiravataAPI registry) { try { URI localAddress = (URI) this.context.getProperty(SERVICE_URL); registry.getAiravataManager().setEventingURI(localAddress); } catch (AiravataAPIInvocationException e) { e.printStackTrace(); } log.debug("Updated Eventing service URL in to Repository"); }
@Override protected MessageContext process(MessageContext inMsgContext, String operationName) throws AxisFault { ProcessingContext processingContext = builder.build(inMsgContext, WsEventingOperations.PUBLISH); try { WsmgConfigurationContext brokerConfigContext = (WsmgConfigurationContext) inMsgContext .getConfigurationContext().getProperty(WsmgCommonConstants.BROKER_WSMGCONFIG); brokerConfigContext.getNotificationProcessor().processMsg(processingContext, NameSpaceConstants.WSE_NS); } catch (Exception e) { throw new AxisFault("unable to process message", e); } return createOutputMessageContext(inMsgContext, processingContext); }
@Override protected MessageContext process(MessageContext inMsgContext, String operationName) throws AxisFault { ProcessingContext processingContext = builder.build(inMsgContext, WsEventingOperations.PUBLISH); try { WsmgConfigurationContext brokerConfigContext = (WsmgConfigurationContext) inMsgContext .getConfigurationContext().getProperty(WsmgCommonConstants.BROKER_WSMGCONFIG); brokerConfigContext.getNotificationProcessor().processMsg(processingContext, NameSpaceConstants.WSE_NS); } catch (Exception e) { throw new AxisFault("unable to process message", e); } return createOutputMessageContext(inMsgContext, processingContext); }
public void stop() { if (serviceClient != null) { // close all connections that we have initiated, so that the jetty server // can be restarted without seeing ConnectExceptions HttpClient httpClient = (HttpClient)serviceClient.getServiceContext().getConfigurationContext() .getProperty(HTTPConstants.CACHED_HTTP_CLIENT); if (httpClient != null) ((MultiThreadedHttpConnectionManager)httpClient.getHttpConnectionManager()).shutdown(); serviceClient = null; } }