1 | try↵ | | 1 | try↵
|
2 | {↵ | | 2 | {↵
|
3 | pstmt = conn.prepareStatement(SQL);↵ | | 3 | pstmt = conn.prepareStatement(SQL);↵
|
4 | rs = pstmt.executeQuery();↵ | | 4 | rs = pstmt.executeQuery();↵
|
5 | while (rs.next())↵ | | 5 | while (rs.next())↵
|
6 | {↵ | | 6 | {↵
|
7 | IDatabaseObjectInfo doi = new DatabaseObjectInfo(↵ | | 7 | ↵
|
8 | null, null, rs.getString(1), IObjectTypes.INSTANCE, md);↵ | | |
|
9 | // final Map map = new HashMap();↵ | | |
|
10 | // map.put("Instance Number", new Integer(rs.getInt(1)));↵ | | |
|
11 | // map.put("Name", rs.getString(2));↵ | | |
|
12 | // map.put("Host Name", rs.getString(3));↵ | | |
|
13 | // map.put("Version", rs.getString(4));↵ | | |
|
14 | // map.put("Startup Time", rs.getDate(5));↵ | | |
|
15 | // map.put("Instance Status", rs.getString(6));↵ | | |
|
16 | // map.put("Parallel", rs.getString(7));↵ | | |
|
17 | // map.put("Thread #", new Integer(rs.getInt(8)));↵ | | |
|
18 | // map.put("Archiver", rs.getString(9));↵ | | |
|
19 | // map.put("Log Switch Wait", rs.getString(10));↵ | | |
|
20 | // map.put("Logins", rs.getString(11));↵ | | |
|
21 | // map.put("Shutdown Pending", rs.getString(12));↵ | | |
|
22 | // map.put("Database Status", rs.getString(13));↵ | | |
|
23 | // map.put("Instance Role", rs.getString(14)↵ | | 8 | // There is a reason that we don't want to use DatabaseObjectType.SESSION here. The "session"↵
|
| | | 9 | // nodes that this expander is creating should not be confused with the SQuirreL session. These↵
|
| | | 10 | // session nodes are Oracle sessions that an administrator has the privileges to see. So we ↵
|
| | | 11 | // must not use DatabaseObjectType.SESSION, or else these nodes get expanded with the database↵
|
| | | 12 | // DefaultdatabasExpander.↵
|
| | | 13 | IDatabaseObjectInfo doi =↵
|
24 | );↵ | | 14 | new DatabaseObjectInfo(null, schemaName, rs.getString(1), IObjectTypes.SESSION, md);↵
|
25 | childNodes.add(new ObjectTreeNode(session, doi));↵ | | 15 | childNodes.add(new ObjectTreeNode(session, doi));↵
|
26 | }↵ | | 16 | }↵
|
27 | } ↵ | | 17 | }↵
|
28 | finally↵ | | 18 | finally↵
|
29 | {↵ | | 19 | {↵
|
30 | SQLUtilities.closeResultSet(rs, true);↵ | | 20 | SQLUtilities.closeResultSet(rs, true);↵
|
31 | } | | 21 | }
|