Subject | Maintaining single connection |
---|---|
Author | Shannon Lloyd |
Post date | 2004-11-16T01:33:56Z |
My problem is as follows:
Using a standalone application (jdk1.4.2, on Win32) to connect to a
FB1.5.1 (Linux) server. This application is only ever going to be used
by one person, mostly to perform simple tasks, so I am currently just
using a single connection. I would like to be able to maintain this
connection for the life of the application session, which has not been a
problem thus far, except that something seems to be preventing me from
drawing swing components while the connection is alive. I am retrieving
a ResultSet from a stored procedure on the server, then iterating over
it to generate a Vector of objects. This works fine, and I can output
debug msgs to the console to show that this is all happening as
expected. However, I then try to create a JList and populate it with one
of the fields, but the JList does not appear on the screen. If I close
the connection, however, the JList immediately appears on the screen
(with the correct data displayed). Any idea why I would need to close
the connection before I can display a JComponent? I'm using
DriverManager.getConnection to connect initially. I've only been playing
with FB for a few days, so forgive me if I'm missing something obvious.
Thanks,
Shannon
Using a standalone application (jdk1.4.2, on Win32) to connect to a
FB1.5.1 (Linux) server. This application is only ever going to be used
by one person, mostly to perform simple tasks, so I am currently just
using a single connection. I would like to be able to maintain this
connection for the life of the application session, which has not been a
problem thus far, except that something seems to be preventing me from
drawing swing components while the connection is alive. I am retrieving
a ResultSet from a stored procedure on the server, then iterating over
it to generate a Vector of objects. This works fine, and I can output
debug msgs to the console to show that this is all happening as
expected. However, I then try to create a JList and populate it with one
of the fields, but the JList does not appear on the screen. If I close
the connection, however, the JList immediately appears on the screen
(with the correct data displayed). Any idea why I would need to close
the connection before I can display a JComponent? I'm using
DriverManager.getConnection to connect initially. I've only been playing
with FB for a few days, so forgive me if I'm missing something obvious.
Thanks,
Shannon