Inconsistent results from INFORMATION_SCHEMA.system_sessions
Jeff Cadman <[email protected]>
| Newsgroups | gmane.comp.java.hsqldb.user |
|---|---|
| Message-ID | <[email protected]> |
Hi,
I have a java program running:
String sql = "select count(*) from INFORMATION_SCHEMA.system_sessions"; ResultSet rs = st.executeQuery(sql); while(rs.next()) { String n = rs.getString(1); System.out.println("connections: " + n); TimeUnit.SECONDS.sleep(3); }
No matter how many instances of this program are running, it always prints out:
connections: 1
Curiously, the execution of:
select * from INFORMATION_SCHEMA.system_sessions;
in the manager GUI (DatabaseManagerSwing) displays the correct result.
Either a) What am I missing, or b) How do I programmatically detect the number of sessions connected to the DB?
tnx...
------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Hsqldb-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/hsqldb-user