Commit e09b3c83 e09b3c839bf9d67e6c09b166dbbfdaf78b74f609 by Christian Gerdes

Added new class, Registry, which contains a static list of monitors.

Changed Testrunner to use the Registry class instead.
1 parent 120dfc5a
1 package se.lil.om;
2
3 import java.util.ArrayList;
4
5 public class Registry {
6 private static ArrayList<OraMon> oraList = null;
7
8 public static ArrayList<OraMon> getList() {
9 if (oraList == null) {
10 oraList = new ArrayList<OraMon>();
11 }
12 return oraList;
13 }
14 }
...@@ -14,7 +14,8 @@ public class TestRunner { ...@@ -14,7 +14,8 @@ public class TestRunner {
14 public static void main(String[] args) throws Throwable{ 14 public static void main(String[] args) throws Throwable{
15 // TODO Auto-generated method stub 15 // TODO Auto-generated method stub
16 16
17 ArrayList<OraMon> oraList = new ArrayList<OraMon>(); 17 //ArrayList<OraMon> oraList = new ArrayList<OraMon>();
18 ArrayList<OraMon> oraList = Registry.getList();
18 19
19 OraMon mon1 = new OraMon("jdbc:oracle:thin:@//hostname:1521/SID1","system","passw0rd"); 20 OraMon mon1 = new OraMon("jdbc:oracle:thin:@//hostname:1521/SID1","system","passw0rd");
20 OraMon mon2 = new OraMon("jdbc:oracle:thin:@//hostname:1521/SID1","system","passw0rd"); 21 OraMon mon2 = new OraMon("jdbc:oracle:thin:@//hostname:1521/SID1","system","passw0rd");
......