Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[stellation-res] Comments to firebird, DBAccessPoint

hi,

after installing firebird you need to create a new user.
-to do so:
firebird\bin>gsec -user sysdba -password masterkey
add svc -pw svc_passwd
-now you can use isql to create a new database
isql
create database 'mytest' USER 'svc' PASSWORD 'scv_passwd';

an jdbc url look like
jdbc:firebirdsql:localhost/3050:i:\\path2database\\mytest

Available (needed) datatypes are
INTEGER 32 bits –2,147,483,648 to 2,147,483,647 Signed long (longword)
BLOB
VARCHAR (n) n characters • 1 to 32,765 bytes

Seems sufficient?

While writing the required FireBirdAccessPoint I noticed some points I want
to clear.
1. There is a static block to load the driver class into the classloader,
would not it be better to move this into its own method (e.g. initDriver())?
2. In this block there is a System.exit(0) in case of an Exception. It looks
very dangerous to me. I avoid those calls for exit at all cost, easy to kill
the whole jvm.
3. It seems that the db resources (statments), which are created, are not
explicitly freed (close() from a client class). A very dangerous approch,
depending on which jdbc driver is used. I remember running out of open
cursors while creating update statments, I never closed, on oracle.
4. There seems nothing like a url parameter to reference a database. What if
the database is running at a non default port?

I looked at the DatabaseAdapter of the turbine project at apache, I
mentioned at another post. Unfortunatly its not usable for stellation. It
covers other aspects of differences in db accesses. Basically it uses a xml
db-schema with the Adpater to create db-script for ddl operations.

martin



Back to the top