This commit is contained in:
Lucio Lelii 2008-04-22 17:17:05 +00:00
parent 71fe76d29a
commit 5fa66561ff
1 changed files with 13 additions and 6 deletions

View File

@ -131,9 +131,10 @@ public class DIStoDBUtil {
* @throws RemoteException * @throws RemoteException
*/ */
private static String makeQueryDIS(EndpointReferenceType epr, ExtendedGSSCredential cred, String query) throws RemoteException{ private static String makeQueryDIS(EndpointReferenceType epr, ExtendedGSSCredential cred, String query) throws RemoteException{
GeneralQueryManager q;
String results;
//GeneralQueryManager q;
String results= null;
/*
try { try {
DISHLSClient.init(); DISHLSClient.init();
q= DISHLSClient.getGeneralQueryManager(cred, epr); q= DISHLSClient.getGeneralQueryManager(cred, epr);
@ -142,7 +143,7 @@ public class DIStoDBUtil {
//logger.error("VDL Model Service: error initializing database"); //logger.error("VDL Model Service: error initializing database");
throw new RemoteException(e1.getMessage(), e1); throw new RemoteException(e1.getMessage(), e1);
} }
*/
return results; return results;
} }
@ -420,6 +421,8 @@ public class DIStoDBUtil {
for (String[] singleDHN:resultsDHNParsed) for (String[] singleDHN:resultsDHNParsed)
{ {
String[] riID; String[] riID;
/*
try { try {
riID=DISHLSClient.getRunningInstanceManager(cred,epr).getAllRunningInstancesOnDHN(singleDHN[0], cred, epr); riID=DISHLSClient.getRunningInstanceManager(cred,epr).getAllRunningInstancesOnDHN(singleDHN[0], cred, epr);
} catch (DISHLSClientException e) { } catch (DISHLSClientException e) {
@ -429,8 +432,10 @@ public class DIStoDBUtil {
//logger.error("VDLModel: Error initializing DB with DHN and RI (Credential error)"); //logger.error("VDLModel: Error initializing DB with DHN and RI (Credential error)");
throw new RemoteException("Error querying DIS-IP (Credential error)", e); throw new RemoteException("Error querying DIS-IP (Credential error)", e);
} }
*/
//retreiving related RIID with DHNID //retreiving related RIID with DHNID
/*
String[] temp; String[] temp;
for (String id: riID){ for (String id: riID){
temp=new String[2]; temp=new String[2];
@ -438,7 +443,7 @@ public class DIStoDBUtil {
temp[1]=id; temp[1]=id;
DNHRelatedRIArray.add(temp); DNHRelatedRIArray.add(temp);
} }
*/
} }
/* /*
@ -543,6 +548,7 @@ public class DIStoDBUtil {
String[][] resultsRIParsed= parseResults(results, "r"); String[][] resultsRIParsed= parseResults(results, "r");
String[] riID; String[] riID;
/*
try { try {
riID=DISHLSClient.getRunningInstanceManager(cred,epr).getAllRunningInstancesOnDHN(resourceID, cred, epr); riID=DISHLSClient.getRunningInstanceManager(cred,epr).getAllRunningInstancesOnDHN(resourceID, cred, epr);
} catch (DISHLSClientException e) { } catch (DISHLSClientException e) {
@ -552,17 +558,18 @@ public class DIStoDBUtil {
//logger.error("VDLModel: Error initializing DB with DHN and RI (Credential error)"); //logger.error("VDLModel: Error initializing DB with DHN and RI (Credential error)");
throw new RemoteException("Error querying DIS-IP (Credential error)", e); throw new RemoteException("Error querying DIS-IP (Credential error)", e);
} }
*/
//retreiving related RIID with DHNID //retreiving related RIID with DHNID
String[] temp; String[] temp;
/*
for (String id: riID){ for (String id: riID){
temp=new String[2]; temp=new String[2];
temp[0]=resourceID; temp[0]=resourceID;
temp[1]=id; temp[1]=id;
DNHRelatedRIArray.add(temp); DNHRelatedRIArray.add(temp);
} }
*/
try{ try{
DBInterface.connect(); DBInterface.connect();
DBInterface.InsertInto("dhn", resultsDHNParsed, false); DBInterface.InsertInto("dhn", resultsDHNParsed, false);