Git Repository Public Repository

ISBets21MAUBRY

URLs

Copy to Clipboard
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
package dataAccess;


import configuration.ConfigXML;



public class ObjectdbManagerServerAWS {



	public static void main(String[] args) {

		ConfigXML c=ConfigXML.getInstance();
		
		if (c.isDatabaseLocal()) {
			System.out.println("\nERROR, the database is configured as local");
		}
		else {
		try{

			System.out.println("Lauching objectdb server");
		    try { // Se va a ejecutar en m�quina Linux: usar "/"
		    	String st="java -cp resources/objectdb.jar com.objectdb.Server -port "+ c.getDatabasePort()+" start";
		    	System.out.println(st);
		    	Runtime.getRuntime().exec(st);
		    } catch (Exception ioe) {
		    	System.out.println (ioe);
		    }
			
		    System.out.println("\nAccess granted to: "+c.getUser());
		    
		    System.out.println("\nPress key to exit this database server... ");
		    
		    while(System.in.available()==0){
		    	Thread.sleep(1000);
		    	}
			
		} catch (Exception e) {
			System.out.println("Something has happened in ObjectdbManagerServer: "+e.toString());

		}
		
		}
	}
		
	}


Commits for ISBets21MAUBRY/eclipse-workspace/ISBets21BRYMAUJONUNA/src/main/java/dataAccess/ObjectdbManagerServerAWS.java

Diff revisions: vs.
Revision Author Commited Message
cbae14 ... porkipig Thu 04 Mar, 2021 10:33:41 +0000

Versión del proyecto de Apuestas tras la iteración 1