Examples of AiravataRegistry


Examples of org.apache.airavata.registry.api.AiravataRegistry

    public void testScheduleDynamically() throws IOException, URISyntaxException, WorkflowException {
        logger.info("Running CrossProductWorkflowTest...");
        URL systemResource = this.getClass().getClassLoader().getSystemResource("ForeachCrossProductLevenshteinDistance.xwf");
        Workflow workflow = new Workflow(WorkflowTestUtils.readWorkflow(systemResource));
        XBayaConfiguration conf = WorkflowTestUtils.getConfiguration();
        AiravataRegistry registry = conf.getJcrComponentRegistry()==null? null:conf.getJcrComponentRegistry().getRegistry();
    WorkflowInterpreterConfiguration workflowInterpreterConfiguration = new WorkflowInterpreterConfiguration(workflow, UUID.randomUUID().toString(),conf.getMessageBoxURL(), conf.getBrokerURL(), registry, conf, null,null,null,true);
    workflowInterpreterConfiguration.setNotifier(new StandaloneNotificationSender(workflowInterpreterConfiguration.getTopic(),workflowInterpreterConfiguration.getWorkflow()));

        WorkflowInterpreter interpretor = new WorkflowInterpreter(workflowInterpreterConfiguration,new SSWorkflowInterpreterInteractorImpl());
        interpretor.scheduleDynamically();
View Full Code Here

Examples of org.apache.airavata.registry.api.AiravataRegistry

        logger.info("Running ForEachWorkflowTest...");
        URL systemResource = this.getClass().getClassLoader().getSystemResource("SimpleEcho.xwf");
        Workflow workflow = new Workflow(WorkflowTestUtils.readWorkflow(systemResource));
        ((InputNode) workflow.getGraph().getNode("input")).setDefaultValue("1");
        XBayaConfiguration conf = WorkflowTestUtils.getConfiguration();
        AiravataRegistry registry = conf.getJcrComponentRegistry()==null? null:conf.getJcrComponentRegistry().getRegistry();
    WorkflowInterpreterConfiguration workflowInterpreterConfiguration = new WorkflowInterpreterConfiguration(workflow, UUID.randomUUID().toString(),conf.getMessageBoxURL(), conf.getBrokerURL(), registry, conf, null,null,null,true);
    workflowInterpreterConfiguration.setNotifier(new StandaloneNotificationSender(workflowInterpreterConfiguration.getTopic(),workflowInterpreterConfiguration.getWorkflow()));
    SSWorkflowInterpreterInteractorImpl ssWorkflowInterpreterInteractorImpl = new SSWorkflowInterpreterInteractorImpl();

        WorkflowInterpreter interpretor = new WorkflowInterpreter(workflowInterpreterConfiguration,ssWorkflowInterpreterInteractorImpl);
View Full Code Here

Examples of org.apache.airavata.registry.api.AiravataRegistry

 
  public void updateXBayaConfigurationServiceURLs() {
    try {
      if (this.getConfiguration().getJcrComponentRegistry()!=null && this.getConfiguration().getJcrComponentRegistry().getRegistry()!=null){
            AiravataRegistry registry=this.getConfiguration().getJcrComponentRegistry().getRegistry();
            List<URI> eventingServiceURLList = registry.getEventingServiceURLList();
        if (eventingServiceURLList.size()>0) {
          this.getConfiguration()
          .setBrokerURL(
              eventingServiceURLList.get(0));
          this.getMonitor()
              .getConfiguration()
              .setBrokerURL(
                  eventingServiceURLList.get(0));
        }
        List<URI> messageBoxServiceURLList = registry.getMessageBoxServiceURLList();
        if (messageBoxServiceURLList.size()>0) {
          this.getConfiguration()
          .setMessageBoxURL(
              messageBoxServiceURLList.get(0));
          this.getMonitor()
              .getConfiguration()
              .setMessageBoxURL(
                  messageBoxServiceURLList.get(0));
        }
        List<URI> interpreterServiceURLList = registry.getInterpreterServiceURLList();
        if (interpreterServiceURLList.size()>0) {
          this.getConfiguration()
              .setWorkflowInterpreterURL(interpreterServiceURLList.get(0));
        }
        List<String> gfacURLList = registry.getGFacDescriptorList();
        if (gfacURLList.size()>0) {
          try {
            this.getConfiguration().setGFacURL(new URI(gfacURLList.get(0)));
          } catch (URISyntaxException e) {
            e.printStackTrace();
View Full Code Here

Examples of org.apache.airavata.registry.api.AiravataRegistry

  private Thread thread;
   
    public void shutDown(ConfigurationContext configurationcontext, AxisService axisservice) {
        logger.info("Message box shutting down");
       
        AiravataRegistry registry =  (AiravataRegistry)configurationcontext.getProperty(JCR_REGISTRY);
        URI gfacURL = (URI) configurationcontext.getProperty(SERVICE_URL);
        try {
      registry.deleteMessageBoxServiceURL(gfacURL);
      thread.interrupt();
      try {
          thread.join();
      } catch (InterruptedException e) {
          logger.info("Message box url update thread is interrupted");
View Full Code Here

Examples of org.apache.airavata.registry.api.AiravataRegistry

                try {
            Thread.sleep(JCR_AVAIALABILITY_WAIT_INTERVAL);
          } catch (InterruptedException e1) {
            e1.printStackTrace();
          }
          AiravataRegistry registry = new AiravataJCRRegistry(new URI(map.get(ORG_APACHE_JACKRABBIT_REPOSITORY_URI)),map.get(JCR_CLASS), map.get(JCR_USER), map.get(JCR_PASS), map);
          String localAddress = ServiceUtils.generateServiceURLFromConfigurationContext(context, MESSAGE_BOX_SERVICE_NAME);
          logger.debug("MESSAGE BOX SERVICE_ADDRESS:" + localAddress);
                    context.setProperty(SERVICE_URL,new URI(localAddress));
          context.setProperty(JCR_REGISTRY,registry);
          /*
 
View Full Code Here

Examples of org.apache.airavata.registry.api.AiravataRegistry

        public void run() {
            try {
                while (true) {
                    try {
            AiravataRegistry registry = (AiravataRegistry)context.getProperty(JCR_REGISTRY);
            URI localAddress = (URI) this.context.getProperty(SERVICE_URL);
            registry.saveMessageBoxServiceURL(localAddress);
            logger.info("Updated the Message box URL in to Repository");
            Thread.sleep(GFAC_URL_UPDATE_INTERVAL);
          } catch (RegistryException e) {
            //in case of an registry exception best to retry sooner
            logger.error("Error saving Message box url",e);
View Full Code Here

Examples of org.apache.airavata.registry.api.AiravataRegistry

                    try {
                        jcrComponentRegistry = new JCRComponentRegistry(new URI(jcrURL),jcrUserName,jcrPassword);
                            List<HostDescription> hostList = getDefinedHostDescriptions();
                            for(HostDescription host:hostList){
                                // This will avoid the changes user is doing to one of the predefined Hosts during a restart of the system
                                AiravataRegistry registry = jcrComponentRegistry.getRegistry();
                if(registry.getHostDescription(host.getType().getHostName()) == null){
                                    log.info("Saving the predefined Host: " + host.getType().getHostName());
                                    registry.saveHostDescription(host);
                                }
                            }
                    } catch (RepositoryException e) {
                        e.printStackTrace()//To change body of catch statement use File | Settings | File Templates.
                    } catch (URISyntaxException e) {
View Full Code Here

Examples of org.apache.airavata.registry.api.AiravataRegistry

        } catch (URISyntaxException e1) {
            throw new WorkflowRuntimeException(e1);
        }
        WorkflowInterpretorEventListener listener = null;
        WorkflowInterpreter interpreter = null;
        AiravataRegistry registry = getRegistry();
    WorkflowInterpreterConfiguration workflowInterpreterConfiguration = new WorkflowInterpreterConfiguration(workflow,topic,conf.getMessageBoxURL(), conf.getBrokerURL(), registry, conf, null, null, null);
        workflowInterpreterConfiguration.setGfacEmbeddedMode(gfacEmbeddedMode);
        workflowInterpreterConfiguration.setActOnProvenance(provenance);
        listener = new WorkflowInterpretorEventListener(workflow, conf);
        interpreter = new WorkflowInterpreter(workflowInterpreterConfiguration, new SSWorkflowInterpreterInteractorImpl());
View Full Code Here

Examples of org.apache.airavata.registry.api.AiravataRegistry

            return vals.get(key);
        }
    return defaultVal;
  }
     public void shutDown(ConfigurationContext configctx, AxisService service) {
       AiravataRegistry registry =  jcrComponentRegistry.getRegistry();
         URI gfacURL = (URI) configctx.getProperty(SERVICE_URL);
         try {
       registry.deleteInterpreterServiceURL(gfacURL);
       thread.interrupt();
       try {
           thread.join();
       } catch (InterruptedException e) {
           log.info("GFacURL update thread is interrupted");
View Full Code Here

Examples of org.apache.airavata.registry.api.AiravataRegistry

        public void run() {
            try {
                while (true) {
                    try {
            AiravataRegistry registry = (AiravataRegistry )context.getProperty(JCR_REG);
            URI localAddress = (URI) this.context.getProperty(SERVICE_URL);
            registry.saveInterpreterServiceURL(localAddress);
            log.info("Updated Workflow Interpreter service URL in to Repository");
            Thread.sleep(URL_UPDATE_INTERVAL);
          } catch (RegistryException e) {
            //in case of an registry exception best to retry sooner
            log.severe("Error saving GFac descriptor",e);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.