airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From msme...@apache.org
Subject [6/7] git commit: unicore provider using appcatalog and exposed through thrift https://issues.apache.org/jira/browse/AIRAVATA-1473
Date Mon, 20 Oct 2014 15:24:42 GMT
unicore provider using appcatalog and exposed through thrift 
https://issues.apache.org/jira/browse/AIRAVATA-1473

Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/1da5054a
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/1da5054a
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/1da5054a

Branch: refs/heads/master
Commit: 1da5054a26b23096a111f15ddba616c29219b654
Parents: 1e6a7ba
Author: msmemon <shahbaz.memon@gmail.com>
Authored: Mon Oct 20 16:32:26 2014 +0200
Committer: msmemon <shahbaz.memon@gmail.com>
Committed: Mon Oct 20 16:32:26 2014 +0200

----------------------------------------------------------------------
 .../server/handler/AiravataServerHandler.java   |  24 +-
 .../client/samples/CreateLaunchExperiment.java  | 150 ++++-
 .../tools/RegisterSampleApplications.java       |  77 ++-
 .../airavataAPI.thrift                          |  26 +
 .../appcatalog/cpi/ComputeResource.java         |  15 +
 .../catalog/data/impl/ComputeResourceImpl.java  |  56 +-
 .../data/resources/AbstractResource.java        |   9 +
 .../catalog/data/util/AppCatalogJPAUtils.java   |  20 +-
 .../data/util/AppCatalogResourceType.java       |   1 +
 .../data/util/AppCatalogThriftConversion.java   |  23 +
 .../src/main/resources/META-INF/persistence.xml |   1 +
 .../src/main/resources/appcatalog-derby.sql     |  11 +-
 .../src/main/resources/appcatalog-mysql.sql     |   8 +-
 .../server/src/main/assembly/bin-assembly.xml   | 558 ++++++++++---------
 modules/gfac/gfac-bes/pom.xml                   |   8 -
 .../gfac/bes/provider/impl/BESProvider.java     |   1 -
 .../bes/security/UNICORESecurityContext.java    |   2 +-
 .../airavata/gfac/core/cpi/BetterGfacImpl.java  |  20 +-
 18 files changed, 684 insertions(+), 326 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/1da5054a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
index 1051654..c666a94 100644
--- a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
+++ b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
@@ -1962,7 +1962,7 @@ public class AiravataServerHandler implements Airavata.Iface, Watcher {
             throw exception;
         }
     }
-
+    
     /**
      * Add a Cloud Job Submission details to a compute resource
      * App catalog will return a jobSubmissionInterfaceId which will be added to the jobSubmissionInterfaces.
@@ -1990,7 +1990,27 @@ public class AiravataServerHandler implements Airavata.Iface, Watcher {
         }
     }
 
-    /**
+    @Override
+	public boolean addUNICOREJobSubmissionDetails(String computeResourceId,
+			int priorityOrder, UnicoreJobSubmission unicoreJobSubmission)
+			throws InvalidRequestException, AiravataClientException,
+			AiravataSystemException, TException {
+		try {
+	        appCatalog = AppCatalogFactory.getAppCatalog();
+	        ComputeResource computeResource = appCatalog.getComputeResource();
+	        addJobSubmissionInterface(computeResource, computeResourceId,
+	        		computeResource.addUNICOREJobSubmission(unicoreJobSubmission), JobSubmissionProtocol.UNICORE, priorityOrder);
+	        return true;
+	    } catch (AppCatalogException e) {
+	        logger.error("Error while adding job submission interface to resource compute resource...", e);
+	        AiravataSystemException exception = new AiravataSystemException();
+	        exception.setAiravataErrorType(AiravataErrorType.INTERNAL_ERROR);
+	        exception.setMessage("Error while adding job submission interface to resource compute resource. More info : " + e.getMessage());
+	        throw exception;
+	    }
+	}
+
+	/**
      * Update the given SSH Job Submission details
      *
      * @param jobSubmissionInterfaceId The identifier of the JobSubmission Interface to be updated.

http://git-wip-us.apache.org/repos/asf/airavata/blob/1da5054a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
index ad05d92..66501fb 100644
--- a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
+++ b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
@@ -24,6 +24,12 @@ package org.apache.airavata.client.samples;
 import org.apache.airavata.api.Airavata;
 import org.apache.airavata.api.client.AiravataClientFactory;
 import org.apache.airavata.client.tools.RegisterSampleApplications;
+import org.apache.airavata.client.tools.RegisterSampleApplicationsUtils;
+import org.apache.airavata.model.appcatalog.computeresource.ComputeResourceDescription;
+import org.apache.airavata.model.appcatalog.computeresource.JobSubmissionInterface;
+import org.apache.airavata.model.appcatalog.computeresource.JobSubmissionProtocol;
+import org.apache.airavata.model.appcatalog.computeresource.SecurityProtocol;
+import org.apache.airavata.model.appcatalog.computeresource.UnicoreJobSubmission;
 import org.apache.airavata.model.error.*;
 import org.apache.airavata.model.util.ExperimentModelUtil;
 import org.apache.airavata.model.util.ProjectModelUtil;
@@ -46,42 +52,57 @@ public class CreateLaunchExperiment {
     private static final String DEFAULT_USER = "default.registry.user";
     private static final String DEFAULT_GATEWAY = "default.registry.gateway";
     private static Airavata.Client airavataClient;
-    private static String echoAppId = "Echo_f99c94a4-a663-492e-bce6-266e77c06978";
+    private static String echoAppId = "Echo_56c6e26c-ca77-45fe-91d1-58fa59676879";
     private static String wrfAppId = "WRF_5f097c9c-7066-49ec-aed7-4e39607b3adc";
     private static String amberAppId = "Amber_89906be6-5678-49a6-9d04-a0604fbdef2e";
 
     private static String localHost = "localhost";
     private static String trestlesHostName = "trestles.sdsc.xsede.org";
+    private static String unicoreHostName = "fsd-cloud15.zam.kfa-juelich.de";
     private static String stampedeHostName = "stampede.tacc.xsede.org";
     private static String br2HostName = "bigred2.uits.iu.edu";
-
-    public static void main(String[] args) {
-            try {
+    
+ // unicore service endpoint url
+    private static final String unicoreEndPointURL = "https://fsd-cloud15.zam.kfa-juelich.de:7000/INTEROP1/services/BESFactory?res=default_bes_factory";
+    
+    
+    public static void main(String[] args) throws Exception {
                 airavataClient = AiravataClientFactory.createAiravataClient(THRIFT_SERVER_HOST, THRIFT_SERVER_PORT);
                 System.out.println("API version is " + airavataClient.getAPIVersion());
-//            registerApplications(); // run this only the first time
-                for (int i = 0; i < 100; i++) {
-//            final String expId = createExperimentForSSHHost(airavata);
-                    final String expId = createEchoExperimentForTrestles(airavataClient);
-//            final String expId = createEchoExperimentForStampede(airavataClient);
-//            final String expId = createExperimentEchoForLocalHost(airavataClient);
-//            final String expId = createExperimentWRFTrestles(airavataClient);
-//            final String expId = createExperimentForBR2(airavataClient);
-//            final String expId = createExperimentForBR2Amber(airavataClient);
-//            final String expId = createExperimentWRFStampede(airavataClient);
-//            final String expId = createExperimentForStampedeAmber(airavataClient);
-//            final String expId = createExperimentForTrestlesAmber(airavataClient);
-
-//            System.out.println("Experiment ID : " + expId);
-//            updateExperiment(airavata, expId);
-                    launchExperiment(airavataClient, expId);
-                }
-            } catch (Exception e) {
-                logger.error("Error while connecting with server", e.getMessage());
-                e.printStackTrace();
-            }
+//                registerApplications(); // run this only the first time
+                createAndLaunchExp();
+    }
+    
+    private static String fsdResourceId;
+    
+    
+    
+    public static void createAndLaunchExp() {
+    	try {
+        for (int i = 0; i < 2; i++) {
+//    final String expId = createExperimentForSSHHost(airavata);
+            final String expId = createEchoExperimentForFSD(airavataClient);
+//    final String expId = createEchoExperimentForStampede(airavataClient);
+//    final String expId = createExperimentEchoForLocalHost(airavataClient);
+//    final String expId = createExperimentWRFTrestles(airavataClient);
+//    final String expId = createExperimentForBR2(airavataClient);
+//    final String expId = createExperimentForBR2Amber(airavataClient);
+//    final String expId = createExperimentWRFStampede(airavataClient);
+//    final String expId = createExperimentForStampedeAmber(airavataClient);
+//    final String expId = createExperimentForTrestlesAmber(airavataClient);
+
+//    System.out.println("Experiment ID : " + expId);
+//    updateExperiment(airavata, expId);
+            launchExperiment(airavataClient, expId);
+        }
+    } catch (Exception e) {
+        logger.error("Error while connecting with server", e.getMessage());
+        e.printStackTrace();
     }
 
+    }
+   
+    
     public static void registerApplications() {
         RegisterSampleApplications registerSampleApplications = new RegisterSampleApplications(airavataClient);
 
@@ -104,6 +125,27 @@ public class CreateLaunchExperiment {
         registerSampleApplications.registerAppInterfaces();
     }
 
+    public static String registerUnicoreEndpoint(String hostName, String hostDesc, JobSubmissionProtocol protocol, SecurityProtocol securityProtocol) throws TException {
+		
+		ComputeResourceDescription computeResourceDescription = RegisterSampleApplicationsUtils
+				.createComputeResourceDescription(hostName, hostDesc, null, null);
+		
+		fsdResourceId = airavataClient.registerComputeResource(computeResourceDescription);
+		
+		if (fsdResourceId.isEmpty())
+			throw new AiravataClientException();
+		
+		System.out.println("FSD Compute ResourceID: "+fsdResourceId);
+		
+		JobSubmissionInterface jobSubmission = RegisterSampleApplicationsUtils.createJobSubmissionInterface(fsdResourceId, protocol, 2);
+		UnicoreJobSubmission ucrJobSubmission = new UnicoreJobSubmission();
+		ucrJobSubmission.setSecurityProtocol(securityProtocol);
+		ucrJobSubmission.setUnicoreEndPointURL(unicoreEndPointURL);
+		
+		
+		return jobSubmission.getJobSubmissionInterfaceId();
+	}
+    
     public static String createEchoExperimentForTrestles(Airavata.Client client) throws TException {
         try {
             List<DataObjectType> exInputs = new ArrayList<DataObjectType>();
@@ -154,7 +196,65 @@ public class CreateLaunchExperiment {
         }
         return null;
     }
+    
+    
+    public static String createEchoExperimentForFSD(Airavata.Client client) throws TException {
+        try {
+            List<DataObjectType> exInputs = new ArrayList<DataObjectType>();
+            DataObjectType input = new DataObjectType();
+            input.setKey("Input_to_Echo");
+            input.setType(DataType.STRING);
+            input.setValue("Echoed_Output=Hello World");
+            exInputs.add(input);
+
+            List<DataObjectType> exOut = new ArrayList<DataObjectType>();
+            DataObjectType output = new DataObjectType();
+            output.setKey("echo_output");
+            output.setType(DataType.STRING);
+            output.setValue("");
+            exOut.add(output);
+            
+            echoAppId = "Echo_bdfe6dc3-0e80-41af-adb6-f89b1b05c3e8";
+            
+            Experiment simpleExperiment = 
+                    ExperimentModelUtil.createSimpleExperiment("default", "admin", "echoExperiment", "SimpleEcho2", echoAppId, exInputs);
+            simpleExperiment.setExperimentOutputs(exOut);
+            
+            
+            
+            Map<String, String> computeResources = airavataClient.getAvailableAppInterfaceComputeResources(echoAppId);
+            if (computeResources != null && computeResources.size() != 0) {
+                for (String id : computeResources.keySet()) {
+                    String resourceName = computeResources.get(id);
+                    if (resourceName.equals(unicoreHostName)) {
+                        ComputationalResourceScheduling scheduling = ExperimentModelUtil.createComputationResourceScheduling(id, 1, 1, 1, "normal", 1, 0, 1, "sds128");
+                        UserConfigurationData userConfigurationData = new UserConfigurationData();
+                        userConfigurationData.setAiravataAutoSchedule(false);
+                        userConfigurationData.setOverrideManualScheduledParams(false);
+                        userConfigurationData.setComputationalResourceScheduling(scheduling);
+                        simpleExperiment.setUserConfigurationData(userConfigurationData);
+                        return client.createExperiment(simpleExperiment);
+                    }
+                }
+            }
+        } catch (AiravataSystemException e) {
+            logger.error("Error occured while creating the experiment...", e.getMessage());
+            throw new AiravataSystemException(e);
+        } catch (InvalidRequestException e) {
+            logger.error("Error occured while creating the experiment...", e.getMessage());
+            throw new InvalidRequestException(e);
+        } catch (AiravataClientException e) {
+            logger.error("Error occured while creating the experiment...", e.getMessage());
+            throw new AiravataClientException(e);
+        } catch (TException e) {
+            logger.error("Error occured while creating the experiment...", e.getMessage());
+            throw new TException(e);
+        }
+        return null;
+    }
 
+    
+    
     public static String createExperimentWRFStampede(Airavata.Client client) throws TException {
         try {
             List<DataObjectType> exInputs = new ArrayList<DataObjectType>();

http://git-wip-us.apache.org/repos/asf/airavata/blob/1da5054a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplications.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplications.java b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplications.java
index 5e8bf60..789b475 100644
--- a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplications.java
+++ b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplications.java
@@ -53,14 +53,17 @@ public class RegisterSampleApplications {
     private final static Logger logger = LoggerFactory.getLogger(RegisterSampleApplications.class);
 //    private static final String DEFAULT_GATEWAY = "default";
     private static final String DEFAULT_GATEWAY = "php_reference_gateway";
-    private Airavata.Client airavataClient;
+    private static Airavata.Client airavataClient;
 
     //Host Id's
     private static String localhostId = "";
     private static String stampedeResourceId = "stampede.tacc.xsede.org_92ac5ed6-35a5-4910-82ef-48f128f9245a";
     private static String trestlesResourceId = "trestles.sdsc.xsede.org_db29986e-5a27-4949-ae7f-04a6012d0d35";
     private static String bigredResourceId = "bigred2.uits.iu.edu_3eae6e9d-a1a7-44ec-ac85-3796ef726ef1";
-
+    private static String fsdResourceId;
+ // unicore service endpoint url
+    private static final String unicoreEndPointURL = "https://fsd-cloud15.zam.kfa-juelich.de:7000/INTEROP1/services/BESFactory?res=default_bes_factory";
+    
     //Appplication Names
     private static final String echoName = "Echo";
     private static final String amberName = "Amber";
@@ -180,13 +183,47 @@ public class RegisterSampleApplications {
             bigredResourceId = registerComputeHost("bigred2.uits.iu.edu", "IU BigRed II Cluster",
                     ResourceJobManagerType.PBS, "push", "/opt/torque/torque-4.2.3.1/bin/", SecurityProtocol.SSH_KEYS, 22, "aprun -n");
             System.out.println("BigredII Resource Id is " + bigredResourceId);
+            
+            fsdResourceId = registerUnicoreEndpoint("fsd-cloud15.zam.kfa-juelich.de", "interop host", JobSubmissionProtocol.UNICORE, SecurityProtocol.GSI);
+            System.out.println("FSd Resource Id: "+fsdResourceId);
+            
 
         } catch (TException e) {
             e.printStackTrace();
         }
 
     }
-
+    
+    public static String registerUnicoreEndpoint(String hostName, String hostDesc, JobSubmissionProtocol protocol, SecurityProtocol securityProtocol) throws TException {
+		
+		ComputeResourceDescription computeResourceDescription = RegisterSampleApplicationsUtils
+				.createComputeResourceDescription(hostName, hostDesc, null, null);
+		
+		fsdResourceId = airavataClient.registerComputeResource(computeResourceDescription);
+		
+		
+		
+		if (fsdResourceId.isEmpty())
+			throw new AiravataClientException();
+		
+		System.out.println("FSD Compute ResourceID: "+fsdResourceId);
+		
+		JobSubmissionInterface jobSubmission = RegisterSampleApplicationsUtils.createJobSubmissionInterface(fsdResourceId, protocol, 2);
+		UnicoreJobSubmission ucrJobSubmission = new UnicoreJobSubmission();
+		ucrJobSubmission.setSecurityProtocol(securityProtocol);
+		ucrJobSubmission.setUnicoreEndPointURL(unicoreEndPointURL);
+		jobSubmission.setJobSubmissionProtocol(JobSubmissionProtocol.UNICORE);
+		
+		airavataClient.addUNICOREJobSubmissionDetails(fsdResourceId, 0, ucrJobSubmission);
+		
+		return jobSubmission.getJobSubmissionInterfaceId();
+	}
+    
+    public void registerfsd(){
+    	System.out.println("\n #### Registering XSEDE Computational Resources #### \n");
+    	
+    }
+    
     public void registerAppModules() {
         try {
             System.out.println("\n #### Registering Application Modules #### \n");
@@ -264,6 +301,11 @@ public class RegisterSampleApplications {
 
         //Registering BigRed II Apps
         registerBigRedApps();
+        
+        //Registering FSD Apps
+        registerFSDApps();
+
+        
     }
 
     public void registerAppInterfaces() {
@@ -939,7 +981,24 @@ public class RegisterSampleApplications {
             e.printStackTrace();
         }
     }
+    
+    public void registerFSDApps() {
+        try {
+            System.out.println("#### Registering Application Deployments on FSD #### \n");
+
+            //Register Echo
+            String echoAppDeployId = airavataClient.registerApplicationDeployment(
+                    RegisterSampleApplicationsUtils.createApplicationDeployment(echoModuleId, fsdResourceId,
+                            "/bin/date", ApplicationParallelismType.SERIAL, echoDescription));
+            System.out.println("Echo on FSD deployment Id " + echoAppDeployId);
 
+        } catch (TException e) {
+            e.printStackTrace();
+        }
+    }
+
+    
+    
     public String registerComputeHost(String hostName, String hostDesc,
                                              ResourceJobManagerType resourceJobManagerType,
                                              String monitoringEndPoint, String jobMangerBinPath,
@@ -978,7 +1037,11 @@ public class RegisterSampleApplications {
 
         return computeResourceId;
     }
-
+    
+    
+    
+    
+    
     public void registerGatewayResourceProfile() {
 
         try {
@@ -996,13 +1059,17 @@ public class RegisterSampleApplications {
             ComputeResourcePreference bigRedResourcePreferences = RegisterSampleApplicationsUtils.
                     createComputeResourcePreference(bigredResourceId, "TG-STA110014S", false, null, null, null,
                             "/N/dc2/scratch/cgateway/gta-work-dirs");
-
+            
+            ComputeResourcePreference fsdResourcePreferences = RegisterSampleApplicationsUtils.
+                    createComputeResourcePreference(fsdResourceId, null, false, null, null, null,null);
+            
             GatewayResourceProfile gatewayResourceProfile = new GatewayResourceProfile();
             gatewayResourceProfile.setGatewayID(DEFAULT_GATEWAY);
             gatewayResourceProfile.setGatewayName(DEFAULT_GATEWAY);
             gatewayResourceProfile.addToComputeResourcePreferences(stampedeResourcePreferences);
             gatewayResourceProfile.addToComputeResourcePreferences(trestlesResourcePreferences);
             gatewayResourceProfile.addToComputeResourcePreferences(bigRedResourcePreferences);
+            gatewayResourceProfile.addToComputeResourcePreferences(fsdResourcePreferences);
 
             String gatewayProfile = airavataClient.registerGatewayResourceProfile(gatewayResourceProfile);
             System.out.println("Gateway Profile is registered with Id " + gatewayProfile);

http://git-wip-us.apache.org/repos/asf/airavata/blob/1da5054a/airavata-api/thrift-interface-descriptions/airavataAPI.thrift
----------------------------------------------------------------------
diff --git a/airavata-api/thrift-interface-descriptions/airavataAPI.thrift b/airavata-api/thrift-interface-descriptions/airavataAPI.thrift
index e712d16..389c417 100644
--- a/airavata-api/thrift-interface-descriptions/airavataAPI.thrift
+++ b/airavata-api/thrift-interface-descriptions/airavataAPI.thrift
@@ -966,6 +966,32 @@ service Airavata {
             2: airavataErrors.AiravataClientException ace,
             3: airavataErrors.AiravataSystemException ase)
 
+  /**
+   * Add a UNICORE Job Submission details to a compute resource
+   *  App catalog will return a jobSubmissionInterfaceId which will be added to the jobSubmissionInterfaces.
+   *
+   * @param computeResourceId
+   *   The identifier of the compute resource to which JobSubmission protocol to be added
+   *
+   * @param priorityOrder
+   *   Specify the priority of this job manager. If this is the only jobmanager, the priority can be zero.
+   *
+   * @param unicoreJobSubmission
+   *   The UnicoreJobSubmission object to be added to the resource.
+   *
+   * @return status
+   *   Returns a success/failure of the deletion.
+   *
+  */
+  bool addUNICOREJobSubmissionDetails(1: required string computeResourceId,
+            2: required i32 priorityOrder,
+            3: required computeResourceModel.UnicoreJobSubmission unicoreJobSubmission)
+  	throws (1: airavataErrors.InvalidRequestException ire,
+            2: airavataErrors.AiravataClientException ace,
+            3: airavataErrors.AiravataSystemException ase)
+
+
+
  /**
    * Add a Cloud Job Submission details to a compute resource
    *  App catalog will return a jobSubmissionInterfaceId which will be added to the jobSubmissionInterfaces.

http://git-wip-us.apache.org/repos/asf/airavata/blob/1da5054a/modules/app-catalog/app-catalog-cpi/src/main/java/org/airavata/appcatalog/cpi/ComputeResource.java
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-cpi/src/main/java/org/airavata/appcatalog/cpi/ComputeResource.java b/modules/app-catalog/app-catalog-cpi/src/main/java/org/airavata/appcatalog/cpi/ComputeResource.java
index 23abe4d..4a38dba 100644
--- a/modules/app-catalog/app-catalog-cpi/src/main/java/org/airavata/appcatalog/cpi/ComputeResource.java
+++ b/modules/app-catalog/app-catalog-cpi/src/main/java/org/airavata/appcatalog/cpi/ComputeResource.java
@@ -71,6 +71,13 @@ public interface ComputeResource {
      */
     String addGlobusJobSubmission (GlobusJobSubmission globusJobSubmission) throws AppCatalogException;
 
+    /**
+     * This method will add a UNICOREJobSubmission to the database
+     * @param unicoreJobSubmission 
+     * @return uniquely generated submission id
+     */
+    String addUNICOREJobSubmission (UnicoreJobSubmission unicoreJobSubmission) throws AppCatalogException;
+
 
     String addLocalDataMovement (LOCALDataMovement localDataMovement) throws AppCatalogException;
 
@@ -144,7 +151,15 @@ public interface ComputeResource {
      * @return GSISSHSubmission object
      */
     SSHJobSubmission getSSHJobSubmission (String submissionId) throws AppCatalogException;
+    
+    /**
+     * This method will retrieve UnicoreJobSubmission object
+     * @param submissionId unique submission id
+     * @return UnicoreSubmission object
+     */
+    UnicoreJobSubmission getUNICOREJobSubmission (String submissionId) throws AppCatalogException;
 
+    
 
     /**
      * This method will retrieve GSISSHJobSubmission object

http://git-wip-us.apache.org/repos/asf/airavata/blob/1da5054a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/ComputeResourceImpl.java
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/ComputeResourceImpl.java b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/ComputeResourceImpl.java
index 9104e41..5aab593 100644
--- a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/ComputeResourceImpl.java
+++ b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/ComputeResourceImpl.java
@@ -196,6 +196,24 @@ public class ComputeResourceImpl implements ComputeResource {
             throw new AppCatalogException(e);
         }
     }
+    
+	@Override
+	public String addUNICOREJobSubmission(UnicoreJobSubmission unicoreJobSubmission)
+			throws AppCatalogException {
+		 try {
+			 	unicoreJobSubmission.setJobSubmissionInterfaceId(AppCatalogUtils.getID("UNICORE"));
+			 	UnicoreJobSubmissionResource resource = AppCatalogThriftConversion.getUnicoreJobSubmission(unicoreJobSubmission);
+			 	resource.setUnicoreEndpointUrl(unicoreJobSubmission.getUnicoreEndPointURL());
+			 	resource.save();
+	            return resource.getjobSubmissionInterfaceId();
+	        }catch (Exception e){
+	            logger.error("Error while retrieving SSH Job Submission...", e);
+	            throw new AppCatalogException(e);
+	        }
+		 
+	}
+
+    
 
     @Override
     public void addJobSubmissionProtocol(String computeResourceId, JobSubmissionInterface jobSubmissionInterface) throws AppCatalogException {
@@ -518,7 +536,42 @@ public class ComputeResourceImpl implements ComputeResource {
         }
     }
 
-    @Override
+    //    @Override
+	//    public List<GridFTPDataMovement> getGridFTPDataMovementList(Map<String, String> filters) throws AppCatalogException {
+	//        try {
+	//            GridftpDataMovementResource resource = new GridftpDataMovementResource();
+	//            for (String fieldName : filters.keySet() ){
+	//                if (fieldName.equals(AbstractResource.GridFTPDataMovementConstants.SECURITY_PROTOCOL)){
+	//                    List<Resource> resources = resource.get(AbstractResource.GridFTPDataMovementConstants.SECURITY_PROTOCOL, filters.get(fieldName));
+	//                    if (resources != null && !resources.isEmpty()){
+	//                        return AppCatalogThriftConversion.getGridFTPDataMovementList(resources);
+	//                    }
+	//                }else {
+	//                    logger.error("Unsupported field name for GridFTP Data movement.", new IllegalArgumentException());
+	//                    throw new IllegalArgumentException("Unsupported field name for GridFTP Data movement.");
+	//                }
+	//            }
+	//        }catch (Exception e){
+	//            logger.error("Error while retrieving GridFTP Data movement list...", e);
+	//            throw new AppCatalogException(e);
+	//        }
+	//        return null;
+	//    }
+	
+	    @Override
+		public UnicoreJobSubmission getUNICOREJobSubmission(String submissionId)
+				throws AppCatalogException {
+	    	try {
+	            UnicoreJobSubmissionResource resource = new UnicoreJobSubmissionResource();
+	            resource = (UnicoreJobSubmissionResource)resource.get(submissionId);
+	            return AppCatalogThriftConversion.getUnicoreJobSubmissionDescription(resource);
+	        }catch (Exception e){
+	            logger.error("Error while retrieving UNICORE Job Submission model instance...", e);
+	            throw new AppCatalogException(e);
+	        }
+		}
+
+	@Override
     public CloudJobSubmission getCloudJobSubmission(String submissionId) throws AppCatalogException {
         try {
             CloudSubmissionResource resource = new CloudSubmissionResource();
@@ -719,4 +772,5 @@ public class ComputeResourceImpl implements ComputeResource {
 		localDataMovementResource = (LocalDataMovementResource) localDataMovementResource.get(datamovementId);
 		return AppCatalogThriftConversion.getLocalDataMovement(localDataMovementResource);
 	}
+
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/1da5054a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/AbstractResource.java
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/AbstractResource.java b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/AbstractResource.java
index 005f12b..dc6a00a 100644
--- a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/AbstractResource.java
+++ b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/AbstractResource.java
@@ -31,6 +31,7 @@ public abstract class AbstractResource implements Resource {
     public static final String GSISSH_PREJOBCOMMAND = "GSISSHPreJobCommand";
     public static final String GSISSH_POSTJOBCOMMAND = "GSISSHPostJobCommand";
     public static final String GLOBUS_SUBMISSION = "GlobusJobSubmission";
+    public static final String UNICORE_JOB_SUBMISSION = "UnicoreJobSubmission";
     public static final String GLOBUS_GK_ENDPOINT = "GlobusGKEndpoint";
     public static final String SSH_SUBMISSION = "SSHSubmission";
 	public static final String SCP_DATA_MOVEMENT = "ScpDataMovement";
@@ -116,6 +117,14 @@ public abstract class AbstractResource implements Resource {
         public static final String GLOBUS_GATEKEEPER_EP = "globusEP";
     }
 
+    // Unicore Post Job Command Table
+    public final class UnicoreJobSubmissionConstants {
+        public static final String SUBMISSION_ID = "submissionID";
+        public static final String SECURITY_PROTOCAL = "securityProtocol";
+        public static final String UNICORE_ENDPOINT_URL = "unicoreEndpointUrl";
+    }
+
+    
     public final class GlobusEPConstants{
         public static final String SUBMISSION_ID = "submissionID";
         public static final String ENDPOINT = "endpoint";

http://git-wip-us.apache.org/repos/asf/airavata/blob/1da5054a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogJPAUtils.java
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogJPAUtils.java b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogJPAUtils.java
index c4420f8..cad51f8 100644
--- a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogJPAUtils.java
+++ b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogJPAUtils.java
@@ -116,6 +116,14 @@ public class AppCatalogJPAUtils {
                     logger.error("Object should be a GSISSH Submission", new IllegalArgumentException());
                     throw new IllegalArgumentException("Object should be a GSISSH Submission.");
                 }
+            case UNICORE_JOB_SUBMISSION:
+                if (o instanceof UnicoreJobSubmission){
+                    return createUnicoreJobSubmission((UnicoreJobSubmission) o);
+                }else {
+                    logger.error("Object should be a GSISSH Submission", new IllegalArgumentException());
+                    throw new IllegalArgumentException("Object should be a GSISSH Submission.");
+                }
+
             case GSISSH_EXPORT:
                 if (o instanceof GSISSHExport){
                     return createGSISSHExport((GSISSHExport) o);
@@ -496,7 +504,17 @@ public class AppCatalogJPAUtils {
         }
         return submissionResource;
     }
-
+    
+    
+    private static Resource createUnicoreJobSubmission(UnicoreJobSubmission o) {
+        UnicoreJobSubmissionResource submissionResource = new UnicoreJobSubmissionResource();
+        if (o != null) {
+            submissionResource.setjobSubmissionInterfaceId(o.getSubmissionID());
+            submissionResource.setUnicoreEndpointUrl(o.getUnicoreEndpointUrl());
+        }
+        return submissionResource;
+    }
+    
     private static Resource createGSISSHExport(GSISSHExport o){
         GSISSHExportResource resource = new GSISSHExportResource();
         if (o != null) {

http://git-wip-us.apache.org/repos/asf/airavata/blob/1da5054a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogResourceType.java
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogResourceType.java b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogResourceType.java
index eea1426..d9787a3 100644
--- a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogResourceType.java
+++ b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogResourceType.java
@@ -30,6 +30,7 @@ public enum AppCatalogResourceType {
     GSISSH_PREJOBCOMMAND,
     GSISSH_POSTJOBCOMMAND,
     GLOBUS_SUBMISSION,
+    UNICORE_JOB_SUBMISSION,
     GLOBUS_GK_ENDPOINT,
     SSH_JOB_SUBMISSION,
 	SCP_DATA_MOVEMENT,

http://git-wip-us.apache.org/repos/asf/airavata/blob/1da5054a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogThriftConversion.java
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogThriftConversion.java b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogThriftConversion.java
index dc7766e..a10788c 100644
--- a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogThriftConversion.java
+++ b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogThriftConversion.java
@@ -232,7 +232,21 @@ public class AppCatalogThriftConversion {
         resource.setSshPort(submission.getSshPort());
         return resource;
     }
+    
+    
+    public static UnicoreJobSubmissionResource getUnicoreJobSubmission (UnicoreJobSubmission submission){
+    	UnicoreJobSubmissionResource resource = new UnicoreJobSubmissionResource();
+        
+        resource.setjobSubmissionInterfaceId(submission.getJobSubmissionInterfaceId());
+        
+        if (submission.getSecurityProtocol() != null){
+            resource.setSecurityProtocol(submission.getSecurityProtocol().toString());
+        }
+        resource.setUnicoreEndpointUrl(submission.getUnicoreEndPointURL());
+        return resource;
+    }
 
+    
     public static CloudSubmissionResource getCloudJobSubmission (CloudJobSubmission submission){
         CloudSubmissionResource resource = new CloudSubmissionResource();
         resource.setJobSubmissionInterfaceId(submission.getJobSubmissionInterfaceId());
@@ -314,7 +328,16 @@ public class AppCatalogThriftConversion {
     	sshJobSubmission.setSshPort(submission.getSshPort());
         return sshJobSubmission;
     }
+    
+    public static UnicoreJobSubmission getUnicoreJobSubmissionDescription (UnicoreJobSubmissionResource submission) throws AppCatalogException {
+    	UnicoreJobSubmission unicoreJobSubmission = new UnicoreJobSubmission();
+    	unicoreJobSubmission.setUnicoreEndPointURL(submission.getUnicoreEndpointUrl());
+    	unicoreJobSubmission.setJobSubmissionInterfaceId(submission.getjobSubmissionInterfaceId());
+    	unicoreJobSubmission.setSecurityProtocol(SecurityProtocol.GSI);
+        return unicoreJobSubmission;
+    }
 
+    
     public static CloudJobSubmission getCloudJobSubmissionDescription (CloudSubmissionResource submission) throws AppCatalogException {
         CloudJobSubmission cloudJobSubmission = new CloudJobSubmission();
         cloudJobSubmission.setJobSubmissionInterfaceId(submission.getJobSubmissionInterfaceId());

http://git-wip-us.apache.org/repos/asf/airavata/blob/1da5054a/modules/app-catalog/app-catalog-data/src/main/resources/META-INF/persistence.xml
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/resources/META-INF/persistence.xml b/modules/app-catalog/app-catalog-data/src/main/resources/META-INF/persistence.xml
index b0d5a1a..63e990e 100644
--- a/modules/app-catalog/app-catalog-data/src/main/resources/META-INF/persistence.xml
+++ b/modules/app-catalog/app-catalog-data/src/main/resources/META-INF/persistence.xml
@@ -30,6 +30,7 @@
         <class>org.apache.aiaravata.application.catalog.data.model.GSISSHExport</class>
         <class>org.apache.aiaravata.application.catalog.data.model.GSISSHPreJobCommand</class>
         <class>org.apache.aiaravata.application.catalog.data.model.GSISSHPostJobCommand</class>
+        <class>org.apache.aiaravata.application.catalog.data.model.UnicoreJobSubmission</class>
         <class>org.apache.aiaravata.application.catalog.data.model.HostAlias</class>
         <class>org.apache.aiaravata.application.catalog.data.model.HostIPAddress</class>
         <class>org.apache.aiaravata.application.catalog.data.model.ScpDataMovement</class>

http://git-wip-us.apache.org/repos/asf/airavata/blob/1da5054a/modules/app-catalog/app-catalog-data/src/main/resources/appcatalog-derby.sql
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/resources/appcatalog-derby.sql b/modules/app-catalog/app-catalog-data/src/main/resources/appcatalog-derby.sql
index 9129559..dec5029 100644
--- a/modules/app-catalog/app-catalog-data/src/main/resources/appcatalog-derby.sql
+++ b/modules/app-catalog/app-catalog-data/src/main/resources/appcatalog-derby.sql
@@ -1,4 +1,4 @@
-/*
+/*
  *
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -87,6 +87,15 @@ CREATE TABLE GLOBUS_SUBMISSION
          PRIMARY KEY(SUBMISSION_ID)
 );
 
+CREATE TABLE UNICORE_SUBMISSION
+(
+         SUBMISSION_ID VARCHAR(255),
+         SECURITY_PROTOCAL VARCHAR(255),
+         UNICORE_ENDPOINT_URL VARCHAR(255),
+         PRIMARY KEY(SUBMISSION_ID)
+);
+
+
 CREATE TABLE GLOBUS_GK_ENDPOINT
 (
          SUBMISSION_ID VARCHAR(255),

http://git-wip-us.apache.org/repos/asf/airavata/blob/1da5054a/modules/app-catalog/app-catalog-data/src/main/resources/appcatalog-mysql.sql
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/resources/appcatalog-mysql.sql b/modules/app-catalog/app-catalog-data/src/main/resources/appcatalog-mysql.sql
index f00fb3b..7c21382 100644
--- a/modules/app-catalog/app-catalog-data/src/main/resources/appcatalog-mysql.sql
+++ b/modules/app-catalog/app-catalog-data/src/main/resources/appcatalog-mysql.sql
@@ -85,7 +85,13 @@ CREATE TABLE GLOBUS_SUBMISSION
          SECURITY_PROTOCAL VARCHAR(255),
          PRIMARY KEY(SUBMISSION_ID)
 );
-
+CREATE TABLE UNICORE_SUBMISSION
+(
+         SUBMISSION_ID VARCHAR(255),
+         SECURITY_PROTOCAL VARCHAR(255),
+         UNICORE_ENDPOINT_URL VARCHAR(255),
+         PRIMARY KEY(SUBMISSION_ID)
+);
 CREATE TABLE GLOBUS_GK_ENDPOINT
 (
          SUBMISSION_ID VARCHAR(255),

http://git-wip-us.apache.org/repos/asf/airavata/blob/1da5054a/modules/distribution/server/src/main/assembly/bin-assembly.xml
----------------------------------------------------------------------
diff --git a/modules/distribution/server/src/main/assembly/bin-assembly.xml b/modules/distribution/server/src/main/assembly/bin-assembly.xml
index bec5b12..cfb4f05 100644
--- a/modules/distribution/server/src/main/assembly/bin-assembly.xml
+++ b/modules/distribution/server/src/main/assembly/bin-assembly.xml
@@ -1,10 +1,13 @@
-<!--Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file 
-    distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under 
-    the Apache License, Version 2.0 (theÏ "License"); you may not use this file except in compliance with the License. You may 
-    obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to 
-    in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 
-    ANY ~ KIND, either express or implied. See the License for the specific language governing permissions and limitations under 
-    the License. -->
+<!--Licensed to the Apache Software Foundation (ASF) under one or more contributor 
+	license agreements. See the NOTICE file distributed with this work for additional 
+	information regarding copyright ownership. The ASF licenses this file to 
+	you under the Apache License, Version 2.0 (theÏ "License"); you may not use 
+	this file except in compliance with the License. You may obtain a copy of 
+	the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required 
+	by applicable law or agreed to in writing, software distributed under the 
+	License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 
+	OF ANY ~ KIND, either express or implied. See the License for the specific 
+	language governing permissions and limitations under the License. -->
 
 <!DOCTYPE assembly [
         <!ELEMENT assembly (id|includeBaseDirectory|baseDirectory|formats|fileSets|dependencySets)*>
@@ -23,284 +26,283 @@
         <!ELEMENT dependencySet (outputDirectory|includes)*>
         ]>
 <assembly>
-    <id>bin</id>
-    <includeBaseDirectory>true</includeBaseDirectory>
-    <baseDirectory>${archieve.name}-${version}</baseDirectory>
-    <formats>
-        <format>tar.gz</format>
-        <format>zip</format>
-    </formats>
+	<id>bin</id>
+	<includeBaseDirectory>true</includeBaseDirectory>
+	<baseDirectory>${archieve.name}-${version}</baseDirectory>
+	<formats>
+		<format>tar.gz</format>
+		<format>zip</format>
+	</formats>
 
-    <fileSets>
+	<fileSets>
 
-        <!-- ********************** copy release notes files ********************** -->
-        <fileSet>
-            <directory>../../../</directory>
-            <outputDirectory>.</outputDirectory>
-            <includes>
-                <include>RELEASE_NOTES</include>
-            </includes>
-        </fileSet>
-        <!-- ********************** copy licenses, readme etc. ********************** -->
-        <fileSet>
-            <directory>src/main/resources/</directory>
-            <outputDirectory>.</outputDirectory>
-            <includes>
-                <include>LICENSE</include>
-                <include>NOTICE</include>
-                <include>README</include>
-                <include>INSTALL</include>
-            </includes>
-        </fileSet>
+		<!-- ********************** copy release notes files ********************** -->
+		<fileSet>
+			<directory>../../../</directory>
+			<outputDirectory>.</outputDirectory>
+			<includes>
+				<include>RELEASE_NOTES</include>
+			</includes>
+		</fileSet>
+		<!-- ********************** copy licenses, readme etc. ********************** -->
+		<fileSet>
+			<directory>src/main/resources/</directory>
+			<outputDirectory>.</outputDirectory>
+			<includes>
+				<include>LICENSE</include>
+				<include>NOTICE</include>
+				<include>README</include>
+				<include>INSTALL</include>
+			</includes>
+		</fileSet>
 
-        <!-- ********************** copy database scripts ********************** -->
-        <fileSet>
-            <directory>../../ws-messenger/messagebroker/src/main/resources/database_scripts
-            </directory>
-            <outputDirectory>bin/database_scripts
-            </outputDirectory>
-            <includes>
-                <include>*sql*</include>
-            </includes>
-        </fileSet>
-        <fileSet>
-            <directory>../../ws-messenger/messagebox/src/main/resources/database_scripts
-            </directory>
-            <outputDirectory>bin/database_scripts
-            </outputDirectory>
-            <includes>
-                <include>*sql*</include>
-            </includes>
-        </fileSet>
-        <fileSet>
-            <directory>../../registry/airavata-jpa-registry/src/main/resources
-            </directory>
-            <outputDirectory>bin/database_scripts
-            </outputDirectory>
-            <includes>
-                <include>*sql*</include>
-            </includes>
-        </fileSet>
-        <fileSet>
-            <directory>../../app-catalog/app-catalog-data/src/main/resources
-            </directory>
-            <outputDirectory>bin/database_scripts
-            </outputDirectory>
-            <includes>
-                <include>*sql*</include>
-            </includes>
-        </fileSet>
-        <fileSet>
-            <directory>src/main/resources/bin</directory>
-            <outputDirectory>bin</outputDirectory>
-            <fileMode>777</fileMode>
-            <includes>
-                <include>*.sh</include>
-                <include>*.bat</include>
-                <include>logo.txt</include>
-                <include>startNetworkServer</include>
-            </includes>
-        </fileSet>
-        <fileSet>
-            <directory>${project.build.directory}/conf</directory>
-            <outputDirectory>bin</outputDirectory>
-            <includes>
-                <include>airavata-server.properties</include>
-		<include>zoo.cfg</include>
-                <include>registry.properties</include>
-                <include>log4j.properties</include>
-                <include>host.xml</include>
-                <include>persistence.xml</include>
-                <include>provenance.sql</include>
-                <include>gfac-config.xml</include>
-                <include>PBSTemplate.xslt</include>
-                <include>SLURMTemplate.xslt</include>
-                <include>SGETemplate.xslt</include>
-                <include>gsissh.properties</include>
-            </includes>
-        </fileSet>
+		<!-- ********************** copy database scripts ********************** -->
+		<fileSet>
+			<directory>../../ws-messenger/messagebroker/src/main/resources/database_scripts
+			</directory>
+			<outputDirectory>bin/database_scripts
+			</outputDirectory>
+			<includes>
+				<include>*sql*</include>
+			</includes>
+		</fileSet>
+		<fileSet>
+			<directory>../../ws-messenger/messagebox/src/main/resources/database_scripts
+			</directory>
+			<outputDirectory>bin/database_scripts
+			</outputDirectory>
+			<includes>
+				<include>*sql*</include>
+			</includes>
+		</fileSet>
+		<fileSet>
+			<directory>../../registry/airavata-jpa-registry/src/main/resources
+			</directory>
+			<outputDirectory>bin/database_scripts
+			</outputDirectory>
+			<includes>
+				<include>*sql*</include>
+			</includes>
+		</fileSet>
+		<fileSet>
+			<directory>../../app-catalog/app-catalog-data/src/main/resources
+			</directory>
+			<outputDirectory>bin/database_scripts
+			</outputDirectory>
+			<includes>
+				<include>*sql*</include>
+			</includes>
+		</fileSet>
+		<fileSet>
+			<directory>src/main/resources/bin</directory>
+			<outputDirectory>bin</outputDirectory>
+			<fileMode>777</fileMode>
+			<includes>
+				<include>*.sh</include>
+				<include>*.bat</include>
+				<include>logo.txt</include>
+				<include>startNetworkServer</include>
+			</includes>
+		</fileSet>
+		<fileSet>
+			<directory>${project.build.directory}/conf</directory>
+			<outputDirectory>bin</outputDirectory>
+			<includes>
+				<include>airavata-server.properties</include>
+				<include>zoo.cfg</include>
+				<include>registry.properties</include>
+				<include>log4j.properties</include>
+				<include>host.xml</include>
+				<include>persistence.xml</include>
+				<include>provenance.sql</include>
+				<include>gfac-config.xml</include>
+				<include>PBSTemplate.xslt</include>
+				<include>SLURMTemplate.xslt</include>
+				<include>SGETemplate.xslt</include>
+				<include>gsissh.properties</include>
+			</includes>
+		</fileSet>
 
-        <!-- ********************** Copy Axis2 startup scripts to stand alone server ********************** -->
-        <fileSet>
-            <directory>src/main/resources/axis2-standalone-bin
-            </directory>
-            <outputDirectory>bin</outputDirectory>
-            <fileMode>777</fileMode>
-            <includes>
-                <include>*.sh</include>
-                <include>*.bat</include>
-            </includes>
-        </fileSet>
+		<!-- ********************** Copy Axis2 startup scripts to stand alone server 
+			********************** -->
+		<fileSet>
+			<directory>src/main/resources/axis2-standalone-bin</directory>
+			<outputDirectory>bin</outputDirectory>
+			<fileMode>777</fileMode>
+			<includes>
+				<include>*.sh</include>
+				<include>*.bat</include>
+			</includes>
+		</fileSet>
 
-        <fileSet>
-            <directory>src/main/resources/conf</directory>
-            <outputDirectory>bin</outputDirectory>
-            <includes>
-                <include>**/*</include>
-            </includes>
-        </fileSet>
+		<fileSet>
+			<directory>src/main/resources/conf</directory>
+			<outputDirectory>bin</outputDirectory>
+			<includes>
+				<include>**/*</include>
+			</includes>
+		</fileSet>
 
-        <!-- ********************** Copy samples ********************** -->
-        <fileSet>
-            <directory>${project.build.directory}/samples/applications</directory>
-            <outputDirectory>samples</outputDirectory>
-            <includes>
-                <include>*.sh</include>
-                <include>*.bat</include>
-            </includes>
-        </fileSet>
+		<!-- ********************** Copy samples ********************** -->
+		<fileSet>
+			<directory>${project.build.directory}/samples/applications
+			</directory>
+			<outputDirectory>samples</outputDirectory>
+			<includes>
+				<include>*.sh</include>
+				<include>*.bat</include>
+			</includes>
+		</fileSet>
 
-    </fileSets>
+	</fileSets>
 
-    <dependencySets>
-        <dependencySet>
-            <outputDirectory>lib</outputDirectory>
-            <outputFileNameMapping>${artifact.artifactId}.${artifact.extension}</outputFileNameMapping>
-            <includes>
-                <include>org.apache.derby:derby:jar</include>
-                <include>org.apache.derby:derbytools:jar</include>
-                <include>org.apache.derby:derbynet:jar</include>
-                <include>org.apache.derby:derbyclient:jar</include>
-            </includes>
-        </dependencySet>
-        <dependencySet>
-            <outputDirectory>lib</outputDirectory>
-            <includes>
-                <include>org.slf4j:slf4j-api:jar</include>
-                <include>org.slf4j:slf4j-jcl:jar</include>
-                <include>org.slf4j:slf4j-log4j12:jar</include>
-                <include>log4j:log4j:jar</include>
-                <include>javax.jcr:jcr:jar</include>
-                <include>commons-collections:commons-collections</include>
-                <include>commons-configuration:commons-configuration</include>
-                <include>commons-lang:commons-lang</include>
-                <include>commons-io:commons-io</include>
-                <include>org.ogce:xpp3:jar</include>
-                <include>org.ogce:xpp5:jar</include>
-                <include>org.ogce:xsul:jar</include>
-                <include>org.ogce:xsul5:jar</include>
-                <include>org.ogce:gpel-client:jar</include>
-                <include>org.ogce:atomixmiser:jar</include>
-                <include>org.ogce:yfilter:jar</include>
-                <include>org.python:jython:jar</include>
-                <include>org.jglobus:gss</include>
-                <include>org.jglobus:gram</include>
-                <include>org.jglobus:myproxy</include>
-                <include>org.jglobus:gridftp</include>
-                <include>org.jglobus:ssl-proxies</include>
-                <include>org.jglobus:jsse</include>
-                <include>org.jglobus:io</include>
-                <include>org.jglobus:axis</include>
-                <include>org.apache.xmlbeans:xmlbeans</include>
-                <include>com.amazonaws:aws-java-sdk</include>
-                <include>net.java.dev.jets3t:jets3t</include>
-                <include>org.apache.airavata:airavata-standalone-server:jar</include>
-                <include>org.apache.airavata:airavata-common-utils:jar</include>
-                <include>org.apache.airavata:airavata-orchestrator-service:jar</include>
-                <include>org.apache.airavata:airavata-orchestrator-core:jar</include>
-                <include>org.apache.airavata:airavata-gfac-schema-utils:jar</include>
-                <include>org.apache.airavata:airavata-workflow-execution-context:jar</include>
-                <include>org.apache.airavata:airavata-registry-cpi:jar</include>
-                <include>org.apache.airavata:airavata-jpa-registry:jar</include>
-                <include>org.apache.airavata:app-catalog-cpi:jar</include>
-                <include>org.apache.airavata:app-catalog-data:jar</include>
-                <include>org.apache.airavata:airavata-data-models:jar</include>
-                <include>org.apache.airavata:airavata-credential-store:jar</include>
-                <include>org.apache.airavata:airavata-gfac-core:jar</include>
-                <include>org.apache.airavata:airavata-gfac-service:jar</include>
-                <include>org.apache.airavata:airavata-gfac-ssh:jar</include>
-                <include>org.apache.airavata:airavata-gfac-local:jar</include>
-                <include>org.apache.airavata:airavata-gfac-gsissh:jar</include>
-                <include>org.apache.airavata:airavata-gfac-hpc-monitor:jar</include>
-                <include>org.apache.airavata:airavata-gfac-hadoop:jar</include>
-                <include>org.apache.airavata:airavata-gfac-bes:jar</include>
-                <include>org.apache.airavata:airavata-gfac-gram:jar</include>
-                <include>org.apache.airavata:airavata-message-monitor:jar</include>
-                <include>org.apache.airavata:airavata-workflow-model-core:jar</include>
-                <include>org.apache.airavata:airavata-messenger-commons:jar</include>
-                <include>org.apache.airavata:airavata-messenger-client:jar</include>
-                <include>org.apache.airavata:airavata-workflow-tracking:jar</include>
-                <include>org.apache.airavata:airavata-workflow-engine:jar</include>
-                <include>org.apache.airavata:gsissh:jar</include>
-                <include>org.apache.airavata:airavata-model-utils:jar</include>
-                <include>org.apache.airavata:airavata-api-server:jar</include>
-                <include>org.apache.airavata:airavata-api-stubs:jar</include>
-                <include>org.apache.openjpa:openjpa-all:jar</include>
-                <include>org.bouncycastle:bcprov-jdk16</include>
-                <include>javax.servlet:javax.servlet-api</include>
-                <include>xerces:xercesImpl:jar:2.9.1</include>
-                <include>com.ibm.icu:icu4j</include>
-                <include>com.google.guava:guava</include>
-                <include>org.apache.hadoop:hadoop-core</include>
-                <include>org.apache.hadoop:hadoop-client</include>
-                <include>org.apache.whirr:whirr-hadoop</include>
-                <include>org.hamcrest:hamcrest-all</include>
-                <include>org.mockito:mockito-all</include>
-                <include>com.jcraft:jsch</include>
-                <include>net.sf.jopt-simple:jopt-simple</include>
-                <include>net.schmizz:sshj</include>
-                <include>j2ssh:j2ssh-core</include>
-                <include>j2ssh:j2ssh-common</include>
-                <include>org.apache.httpcomponents:httpcore:jar:4.1</include>
-                <include>org.apache.httpcomponents:httpclient:jar:4.1</include>
-                <include>de.odysseus.staxon:staxon:jar:1.2</include>
-                <include>de.odysseus.staxon:staxon-jackson:jar:1.2</include>
-                <include>org.ebaysf.web:cors-filter:jar:1.0.0</include>
-                <include>org.ogce:bcgss</include>
-                <include>org.apache.xmlbeans:xmlbeans</include>
-                <include>org.apache.thrift:libthrift:jar:0.9.1</include>
-                <include>commons-cli:commons-cli</include>
-                <include>commons-codec:commons-codec</include>
-                <include>com.rabbitmq:amqp-client</include>
-                <include>com.fasterxml.jackson.core:jackson-databind</include>
-                <include>com.fasterxml.jackson.core:jackson-core</include>
-                <include>com.fasterxml.jackson.core:jackson-annotations</include>
-                <include>org.apache.zookeeper:zookeeper</include>
-                <!-- unicore start
-                    <include>eu.unicore:ogsabes-client</include>
-                    <include>eu.unicore:ogsabes-types</include>
-                    <include>de.fzj.unicore:jsdl-xmlbeans</include>
-                    <include>eu.unicore:cis-u6-infoprovider-types</include>
-                    <include>eu.unicore.services:use-wsrftypes</include>
-                    <include>eu.unicore:uas-types</include>
-                    <include>eu.unicore:uas-client</include>
-                    <include>eu.unicore.services:use-wsrfclient</include>
-                    <include>org.apache.xmlbeans:xmlbeans-xpath</include>
-                    <include>net.sf.saxon:saxon</include>
-                    <include>net.sf.saxon:saxon-dom</include>
-                    <include>net.sf.saxon:saxon-xpath</include>
-                    <include>eu.unicore.security:secutils-cxf</include>
-                    <include>eu.unicore.security:securityLibrary</include>
-                    <include>log4j:apache-log4j-extras</include>
-                    <include>eu.eu-emi.security:canl</include>
-                    <include>org.bouncycastle:bcpkix-jdk15on</include>
-                    <include>pl.edu.icm.saml:samly2</include>
-                    <include>eu.unicore.security:SAMLtypes</include>
-                    <include>org.apache.ws.security:wss4j</include>
-                    <include>org.json:json</include>
-                    <include>org.apache.cxf:cxf-rt-databinding-xmlbeans</include>
-                    <include>org.apache.cxf:cxf-api</include>
-                    <include>org.codehaus.woodstox:woodstox-core-asl</include>
-                    <include>org.codehaus.woodstox:stax2-api</include>
-                    <include>org.apache.ws.xmlschema:xmlschema-core</include>
-                    <include>org.apache.cxf:cxf-rt-core</include>
-                    <include>com.sun.xml.bind:jaxb-impl</include>
-                    <include>org.apache.cxf:cxf-rt-frontend-jaxws</include>
-                    <include>xml-resolver:xml-resolver</include>
-                    <include>asm:asm</include>
-                    <include>org.apache.cxf:cxf-rt-bindings-soap</include>
-                    <include>org.apache.cxf:cxf-rt-databinding-jaxb</include>
-                    <include>org.apache.cxf:cxf-rt-bindings-xml</include>
-                    <include>org.apache.cxf:cxf-rt-frontend-simple</include>
-                    <include>org.apache.cxf:cxf-rt-ws-addr</include>
-                    <include>org.apache.cxf:cxf-rt-ws-policy</include>
-                    <include>org.apache.cxf:cxf-rt-transports-http</include>
-                    <include>org.apache.cxf:cxf-rt-features-clustering</include>
-                    <include>eu.unicore:uftp-core</include>
-                    unicore end-->
-            </includes>
-        </dependencySet>
-        
-    </dependencySets>
+	<dependencySets>
+		<dependencySet>
+			<outputDirectory>lib</outputDirectory>
+			<outputFileNameMapping>${artifact.artifactId}.${artifact.extension}
+			</outputFileNameMapping>
+			<includes>
+				<include>org.apache.derby:derby:jar</include>
+				<include>org.apache.derby:derbytools:jar</include>
+				<include>org.apache.derby:derbynet:jar</include>
+				<include>org.apache.derby:derbyclient:jar</include>
+			</includes>
+		</dependencySet>
+		<dependencySet>
+			<outputDirectory>lib</outputDirectory>
+			<includes>
+				<include>org.slf4j:slf4j-api:jar</include>
+				<include>org.slf4j:slf4j-jcl:jar</include>
+				<include>org.slf4j:slf4j-log4j12:jar</include>
+				<include>log4j:log4j:jar</include>
+				<include>javax.jcr:jcr:jar</include>
+				<include>commons-collections:commons-collections</include>
+				<include>commons-configuration:commons-configuration</include>
+				<include>commons-lang:commons-lang</include>
+				<include>commons-io:commons-io</include>
+				<include>org.ogce:xpp3:jar</include>
+				<include>org.ogce:xpp5:jar</include>
+				<include>org.ogce:xsul:jar</include>
+				<include>org.ogce:xsul5:jar</include>
+				<include>org.ogce:gpel-client:jar</include>
+				<include>org.ogce:atomixmiser:jar</include>
+				<include>org.ogce:yfilter:jar</include>
+				<include>org.python:jython:jar</include>
+				<include>org.jglobus:gss</include>
+				<include>org.jglobus:gram</include>
+				<include>org.jglobus:myproxy</include>
+				<include>org.jglobus:gridftp</include>
+				<include>org.jglobus:ssl-proxies</include>
+				<include>org.jglobus:jsse</include>
+				<include>org.jglobus:io</include>
+				<include>org.jglobus:axis</include>
+				<include>org.apache.xmlbeans:xmlbeans</include>
+				<include>com.amazonaws:aws-java-sdk</include>
+				<include>net.java.dev.jets3t:jets3t</include>
+				<include>org.apache.airavata:airavata-standalone-server:jar
+				</include>
+				<include>org.apache.airavata:airavata-common-utils:jar</include>
+				<include>org.apache.airavata:airavata-orchestrator-service:jar
+				</include>
+				<include>org.apache.airavata:airavata-orchestrator-core:jar
+				</include>
+				<include>org.apache.airavata:airavata-gfac-schema-utils:jar
+				</include>
+				<include>org.apache.airavata:airavata-workflow-execution-context:jar
+				</include>
+				<include>org.apache.airavata:airavata-registry-cpi:jar</include>
+				<include>org.apache.airavata:airavata-jpa-registry:jar</include>
+				<include>org.apache.airavata:app-catalog-cpi:jar</include>
+				<include>org.apache.airavata:app-catalog-data:jar</include>
+				<include>org.apache.airavata:airavata-data-models:jar</include>
+				<include>org.apache.airavata:airavata-credential-store:jar</include>
+				<include>org.apache.airavata:airavata-gfac-core:jar</include>
+				<include>org.apache.airavata:airavata-gfac-service:jar</include>
+				<include>org.apache.airavata:airavata-gfac-ssh:jar</include>
+				<include>org.apache.airavata:airavata-gfac-local:jar</include>
+				<include>org.apache.airavata:airavata-gfac-gsissh:jar</include>
+				<include>org.apache.airavata:airavata-gfac-hpc-monitor:jar</include>
+				<include>org.apache.airavata:airavata-gfac-hadoop:jar</include>
+				<include>org.apache.airavata:airavata-gfac-bes:jar</include>
+				<include>org.apache.airavata:airavata-gfac-gram:jar</include>
+				<include>org.apache.airavata:airavata-message-monitor:jar</include>
+				<include>org.apache.airavata:airavata-workflow-model-core:jar
+				</include>
+				<include>org.apache.airavata:airavata-messenger-commons:jar
+				</include>
+				<include>org.apache.airavata:airavata-messenger-client:jar</include>
+				<include>org.apache.airavata:airavata-workflow-tracking:jar
+				</include>
+				<include>org.apache.airavata:airavata-workflow-engine:jar</include>
+				<include>org.apache.airavata:gsissh:jar</include>
+				<include>org.apache.airavata:airavata-model-utils:jar</include>
+				<include>org.apache.airavata:airavata-api-server:jar</include>
+				<include>org.apache.airavata:airavata-api-stubs:jar</include>
+				<include>org.apache.openjpa:openjpa-all:jar</include>
+				<include>org.bouncycastle:bcprov-jdk15on</include>
+				<include>javax.servlet:javax.servlet-api</include>
+				<include>xerces:xercesImpl:jar:2.9.1</include>
+				<include>com.ibm.icu:icu4j</include>
+				<include>com.google.guava:guava</include>
+				<include>org.apache.hadoop:hadoop-core</include>
+				<include>org.apache.hadoop:hadoop-client</include>
+				<include>org.apache.whirr:whirr-hadoop</include>
+				<include>org.hamcrest:hamcrest-all</include>
+				<include>org.mockito:mockito-all</include>
+				<include>com.jcraft:jsch</include>
+				<include>net.sf.jopt-simple:jopt-simple</include>
+				<include>net.schmizz:sshj</include>
+				<include>j2ssh:j2ssh-core</include>
+				<include>j2ssh:j2ssh-common</include>
+				<include>org.apache.httpcomponents:httpcore:jar:4.1</include>
+				<include>org.apache.httpcomponents:httpclient:jar:4.1</include>
+				<include>de.odysseus.staxon:staxon:jar:1.2</include>
+				<include>de.odysseus.staxon:staxon-jackson:jar:1.2</include>
+				<include>org.ebaysf.web:cors-filter:jar:1.0.0</include>
+				<include>org.ogce:bcgss</include>
+				<include>org.apache.xmlbeans:xmlbeans</include>
+				<include>org.apache.thrift:libthrift:jar:0.9.1</include>
+				<include>commons-cli:commons-cli</include>
+				<include>commons-codec:commons-codec</include>
+				<include>com.rabbitmq:amqp-client</include>
+				<include>com.fasterxml.jackson.core:jackson-databind</include>
+				<include>com.fasterxml.jackson.core:jackson-core</include>
+				<include>com.fasterxml.jackson.core:jackson-annotations</include>
+				<include>org.apache.zookeeper:zookeeper</include>
+
+				<!-- UNICORE Dependencies Start -->
+				<include>org.apache.xmlbeans:xmlbeans-xpath</include>
+				<include>net.sf.saxon:saxon</include>
+				<include>net.sf.saxon:saxon-dom</include>
+				<include>net.sf.saxon:saxon-xpath</include>
+				<include>log4j:apache-log4j-extras</include>
+				<include>eu.eu-emi.security:canl</include>
+				<include>org.bouncycastle:bcpkix-jdk15on</include>
+				<include>pl.edu.icm.saml:samly2</include>
+				<include>org.apache.ws.security:wss4j</include>
+				<include>org.json:json</include>
+				<include>org.apache.cxf:cxf-rt-databinding-xmlbeans</include>
+				<include>org.apache.cxf:cxf-api</include>
+				<include>org.codehaus.woodstox:woodstox-core-asl</include>
+				<include>org.codehaus.woodstox:stax2-api</include>
+				<include>org.apache.ws.xmlschema:xmlschema-core</include>
+				<include>org.apache.cxf:cxf-rt-core</include>
+				<include>com.sun.xml.bind:jaxb-impl</include>
+				<include>org.apache.cxf:cxf-rt-frontend-jaxws</include>
+				<include>xml-resolver:xml-resolver</include>
+				<include>asm:asm</include>
+				<include>org.apache.cxf:cxf-rt-bindings-soap</include>
+				<include>org.apache.cxf:cxf-rt-databinding-jaxb</include>
+				<include>org.apache.cxf:cxf-rt-bindings-xml</include>
+				<include>org.apache.cxf:cxf-rt-frontend-simple</include>
+				<include>org.apache.cxf:cxf-rt-ws-addr</include>
+				<include>org.apache.cxf:cxf-rt-ws-policy</include>
+				<include>org.apache.cxf:cxf-rt-transports-http</include>
+				<include>org.apache.cxf:cxf-rt-features-clustering</include>
+				<!-- UNICORE Dependencies End -->
+			</includes>
+		</dependencySet>
+
+	</dependencySets>
 
 </assembly>

http://git-wip-us.apache.org/repos/asf/airavata/blob/1da5054a/modules/gfac/gfac-bes/pom.xml
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-bes/pom.xml b/modules/gfac/gfac-bes/pom.xml
index 2f63d97..f27de1f 100644
--- a/modules/gfac/gfac-bes/pom.xml
+++ b/modules/gfac/gfac-bes/pom.xml
@@ -22,14 +22,6 @@
     <description>This is the extension of GFAC to use GRAM </description>
     <url>http://airavata.apache.org/</url>
 
-    <repositories>
-        <repository>
-            <id>unicore.eu</id>
-            <name>UNICORE repository</name>
-            <url>http://unicore-dev.zam.kfa-juelich.de/maven</url>
-        </repository>
-    </repositories>
-
     <dependencies>
         <dependency>
             <groupId>org.jglobus</groupId>

http://git-wip-us.apache.org/repos/asf/airavata/blob/1da5054a/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/provider/impl/BESProvider.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/provider/impl/BESProvider.java b/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/provider/impl/BESProvider.java
index 9578dd5..b9ea873 100644
--- a/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/provider/impl/BESProvider.java
+++ b/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/provider/impl/BESProvider.java
@@ -24,7 +24,6 @@ import java.util.Calendar;
 import java.util.Map;
 
 import org.apache.airavata.common.exception.ApplicationSettingsException;
-import org.apache.airavata.gfac.Constants;
 import org.apache.airavata.gfac.GFacException;
 import org.apache.airavata.gfac.bes.security.UNICORESecurityContext;
 import org.apache.airavata.gfac.bes.utils.ActivityInfo;

http://git-wip-us.apache.org/repos/asf/airavata/blob/1da5054a/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/security/UNICORESecurityContext.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/security/UNICORESecurityContext.java b/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/security/UNICORESecurityContext.java
index 690ad43..6bd4d22 100644
--- a/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/security/UNICORESecurityContext.java
+++ b/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/security/UNICORESecurityContext.java
@@ -53,7 +53,7 @@ public class UNICORESecurityContext extends GSISecurityContext {
 	private DefaultClientConfiguration secProperties;
 	protected static DirectoryCertChainValidator dcValidator;
 	
-	public static final String UNICORE_SECURITY_CONTEXT = "unicore";
+	public static final String UNICORE_SECURITY_CONTEXT = "unicore.security.context";
 	
 	public UNICORESecurityContext(CredentialReader credentialReader, RequestData requestData) {
 		super(credentialReader, requestData);

http://git-wip-us.apache.org/repos/asf/airavata/blob/1da5054a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java
index d4cd563..23c31c8 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java
@@ -81,6 +81,7 @@ import org.apache.airavata.model.appcatalog.computeresource.JobSubmissionInterfa
 import org.apache.airavata.model.appcatalog.computeresource.LOCALSubmission;
 import org.apache.airavata.model.appcatalog.computeresource.ResourceJobManager;
 import org.apache.airavata.model.appcatalog.computeresource.SSHJobSubmission;
+import org.apache.airavata.model.appcatalog.computeresource.UnicoreJobSubmission;
 import org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference;
 import org.apache.airavata.model.workspace.experiment.*;
 import org.apache.airavata.registry.cpi.Registry;
@@ -98,6 +99,7 @@ import org.apache.airavata.schemas.gfac.ProjectAccountType;
 import org.apache.airavata.schemas.gfac.QueueType;
 import org.apache.airavata.schemas.gfac.SSHHostType;
 import org.apache.airavata.schemas.gfac.ServiceDescriptionType;
+import org.apache.airavata.schemas.gfac.UnicoreHostType;
 import org.apache.zookeeper.*;
 import org.apache.zookeeper.data.Stat;
 import org.slf4j.Logger;
@@ -219,7 +221,13 @@ public class BetterGfacImpl implements GFac,Watcher {
         daemonHandlers = new ArrayList<ThreadedHandler>();
         startDaemonHandlers();
     }
+    
+    public BetterGfacImpl(Registry registry) {
+    	this();
+    	this.registry = registry;
+    }
 
+    
     /**
      * This is the job launching method outsiders of GFac can use, this will invoke the GFac handler chain and providers
      * And update the registry occordingly, so the users can query the database to retrieve status and output from Registry
@@ -249,7 +257,7 @@ public class BetterGfacImpl implements GFac,Watcher {
          * 1. Get the Task from the task ID and construct the Job object and save it in to registry
          * 2. Add properties of description documents to jobExecutionContext which will be used inside the providers.
          */
-
+        
         //Fetch the Task details for the requested experimentID from the registry. Extract required pointers from the Task object.
         TaskDetails taskData = (TaskDetails) registry.get(RegistryModelType.TASK_DETAIL, taskID);
 
@@ -383,6 +391,12 @@ public class BetterGfacImpl implements GFac,Watcher {
                             break;
                     }
                     break;
+                case UNICORE:
+                	UnicoreJobSubmission ucrSubmission = appCatalog.getComputeResource().getUNICOREJobSubmission(jobSubmissionInterface.getJobSubmissionInterfaceId());
+                	String unicoreEndpoint = ucrSubmission.getUnicoreEndPointURL();
+                	legacyHostDescription = new HostDescription(UnicoreHostType.type);
+                	((UnicoreHostType) legacyHostDescription.getType()).setUnicoreBESEndPointArray(new String[]{unicoreEndpoint});
+                	break;
                 default:
                     break;
             }
@@ -399,7 +413,9 @@ public class BetterGfacImpl implements GFac,Watcher {
 
         /////////////////////---------------- APPLICATION DESCRIPTOR ---------------------/////////////////////////
         //Fetch deployment information and fill-in legacy doc
-        if ((legacyHostDescType instanceof GsisshHostType) || (legacyHostDescType instanceof SSHHostType)) {
+        if ((legacyHostDescType instanceof GsisshHostType) 
+        		|| (legacyHostDescType instanceof SSHHostType) 
+        		|| (legacyHostDescType instanceof UnicoreHostType)) {
             legacyAppDescription = new ApplicationDescription(HpcApplicationDeploymentType.type);
             HpcApplicationDeploymentType legacyHPCAppDescType = (HpcApplicationDeploymentType) legacyAppDescription.getType();
             switch (applicationDeployment.getParallelism()) {


Mime
View raw message