Index: /gssim_ui/branches/vine/gssimstudio/src/web/ui/flex/java/gssim/gssimstudio/flex/app/editor/GSSimStudio.java
===================================================================
--- /gssim_ui/branches/vine/gssimstudio/src/web/ui/flex/java/gssim/gssimstudio/flex/app/editor/GSSimStudio.java	(revision 394)
+++ /gssim_ui/branches/vine/gssimstudio/src/web/ui/flex/java/gssim/gssimstudio/flex/app/editor/GSSimStudio.java	(revision 396)
@@ -24,4 +24,12 @@
 import org.vinetoolkit.grms3client.web.app.GRMS3ResourceImpl;
 //import org.vinetoolkit.grms3client.web.app.GRMS3Status;
+
+import org.vinetoolkit.qcgbrokerclient.QCGBrokerClientModule;
+import org.vinetoolkit.qcgbrokerclient.QCGBrokerClientResource;
+import org.vinetoolkit.qcgbrokerclient.QCGBrokerJob;
+import org.vinetoolkit.qcgbrokerclient.QCGBrokerReservation;
+import org.vinetoolkit.qcgbrokerclient.QCGBrokerReservationRequest;
+import org.vinetoolkit.qcgbrokerclient.QCGBrokerResource;
+import org.vinetoolkit.qcgbrokerclient.QCGBrokerReturnType;
 
 import flex.messaging.FlexContext;
@@ -1565,7 +1573,7 @@
 		model.setExperimentListChanged(true);
 
-		GRMS3Job grms3job = null;
-		try {
-			grms3job = callGRMS3SubmitJob(jobDescription, grmsDN, grmsURL);
+		QCGBrokerJob grms3job = null;
+		try {
+			grms3job = callQCGBrokerSubmitJob(jobDescription, grmsDN, grmsURL);
 		} catch (Exception e) {
 			model.setErrorDescription(VineFlexUtilClass.getResourceString(resourceBoundle, "grms3.jobnotsubmitted")
@@ -1599,10 +1607,10 @@
 			model = (GSSimStudioModel) getModel();
 		}
-		GRMS3ReturnType grms3ReturnType = null;
+		QCGBrokerReturnType grms3ReturnType = null;
 		model.setGrmsDN(grmsDN);
 		model.setGrmsURL(grmsURL);
 		
 		try {
-			grms3ReturnType = callGRMS3GetJoblist(jobFrom, jobCount, grmsDN,
+			grms3ReturnType = callQCGBrokerGetJoblist(jobFrom, jobCount, grmsDN,
 					grmsURL);
 		} catch (Exception e) {
@@ -1616,5 +1624,5 @@
 		}
 		if (grms3ReturnType != null) {
-			List<GRMS3Job> grms3jobs = grms3ReturnType.getChildren();
+			List<QCGBrokerJob> grms3jobs = grms3ReturnType.getChildren();
 			//gRMS3ClientModel.setJobCount(grms3ReturnType.getJobCount());
 			//gRMS3ClientModel.setJobList(grms3jobs);
@@ -1636,4 +1644,17 @@
 
 	/**
+	 * Calls SubmitJob on QCG Broker server.
+	 */
+	protected QCGBrokerJob callQCGBrokerSubmitJob(String jobDescription, String grmsDN,
+			String grmsURL) throws Exception {
+		QCGBrokerClientModule QCGBrokerClientModule = getQCGBrokerClientModule(VineFlexUtilClass
+				.getServiceContext());
+		QCGBrokerJob QCGBrokerClientJob = QCGBrokerClientModule.submitJob(jobDescription,
+				grmsDN, grmsURL);
+		return QCGBrokerClientJob;
+
+	}
+	
+	/**
 	 * Calls GetJoblist on GRMS server.
 	 */
@@ -1644,4 +1665,16 @@
 
 		return gRMS3ClientModule.getJobList(jobFrom, jobCount, grmsDN, grmsURL);
+	}
+	
+	/**
+	 * Calls GetJoblist on QCG Broker server.
+	 */
+	protected QCGBrokerReturnType callQCGBrokerGetJoblist(int jobFrom, int jobCount,
+			String grmsDN, String grmsURL) throws Exception {
+		QCGBrokerClientModule QCGBrokerClientModule = getQCGBrokerClientModule(VineFlexUtilClass
+				.getServiceContext());
+
+		return QCGBrokerClientModule.getJobList(jobFrom, jobCount, grmsDN, grmsURL, true);
+
 	}
 	
@@ -1664,4 +1697,27 @@
 		} else {
 			log.error("getGRMS3ClientModule: no " + GRMS3ClientResource.KEY
+					+ " found in domain.xml");
+			return null;
+		}
+	}
+	
+	/**
+	 * Loads QCG Broker Client Module from resources, which is used to connect to QCG Broker server. 
+	 */
+	protected QCGBrokerClientModule getQCGBrokerClientModule(
+			ServiceContext serviceContext) {
+		ResourceManager rm = serviceContext.createResourceManager();
+		List QCGBrokerClientResourceList = rm
+				.getResourcesByType(QCGBrokerClientResource.KEY);
+		if (QCGBrokerClientResourceList.size() > 0) {
+			log.debug("getQCGBrokerClientModule: QCGBrokerClientResourceList len: "
+					+ QCGBrokerClientResourceList.size());
+
+			QCGBrokerClientResource QCGBrokerClientResource = (QCGBrokerClientResource) QCGBrokerClientResourceList
+					.get(0);
+			return (QCGBrokerClientModule) QCGBrokerClientResource
+					.createResourceModule(QCGBrokerClientModule.KEY, serviceContext);
+		} else {
+			log.error("getQCGBrokerClientModule: no " + QCGBrokerClientResource.KEY
 					+ " found in domain.xml");
 			return null;
