All,
I've solved the following issue (locally) but I am not quite ready to
check it in:
http://sourceforge.net/tracker/index.php?func=detail&aid=1276957&group_id=28383&atid=393414
(Oracle Protocol Violation)
My solution was to synchronize access to the DMD inside of
SQLDatabaseMetaData. Since it is
pretty common that we do
session.getConnection().getDatabaseMetaData.getXXX, there were
many places in the code that I had to touch to do this. Now what I've
discovered is, I've made the
"freezing" that SQuirreL does when you open a session much worse. I
believe the cause is the event
thread doing database work. So, in my new rabbit trail, I've discovered
an optimization for Oracle
that I'm not quite sure how to implement. The reason I'm picking on
Oracle, is because that is where
the "freezing" is the worst. And here is why. Unlike other databases
it seems when we ask for
schemas for Oracle, we get every schema in the database, not just the
ones that have tables that we
can access. And so, as we load the schemas into the object tree, we
access the database many times
for objects that we probably don't have access to. So, I've discovered
an Oracle-specific way to
determine what schemas we should display: select distinct owner from
user_tab_privs + dmd.getUserName.
In my Oracle 9i database this eliminates about 30 Oracle internal
schemas. Now here's my question:
In DatabaseExpander.createSchemaNodes we do md.getSchemas() and get this
big list. Should I
provide an alternative INodeExpander implementation for
DatabaseObjectType SESSION that
overrides this default behavior in DatabaseExpander? Or should it be a
new API method that plugins
would override that would return a list of schemas for a particular
database type and session?
In case someone has the idea that schema prefix session property or even
the object filter would suit this
purpose, I say those "solutions" are inadequate, because :
1) I believe session properties are global - it's not currently possible
to have alias-specific session properties
2) Even if we did have alias-specific session properties, I would have
to manually change these for *every*
session alias I've created. I currently have about 20 aliases
defined for Oracle. Having SQuirreL do this
for me every time I connect would be preferable over manually
setting this and changing it as things change
in the database.
Rob
CollabraSpace - Revolutionary Collaboration
Visit us at http://www.collabraspace.com
This message has been scanned for viruses by
ClamAV v0.83
|