Re: Inconsistent results from INFORMATION_SCHEMA.system_sessions
Fred Toussi <[email protected]>
| Newsgroups | gmane.comp.java.hsqldb.user |
|---|---|
| Message-ID | <[email protected]> |
What happens when you execute the same query in DatabaseManager?
Are you running a Server and connecting to it from several instances of
YOUR program?
Fred
On Mon, Jan 27, 2014, at 16:10, Jeff Cadman wrote:
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.
[1]http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ost
g.clktrk
_______________________________________________
Hsqldb-user mailing list
[2][email protected]
[3]https://lists.sourceforge.net/lists/listinfo/hsqldb-user
References
1. http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
2. mailto:[email protected]
3. https://lists.sourceforge.net/lists/listinfo/hsqldb-user
------------------------------------------------------------------------------
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