Why doesn't
**org.apache.commons.configuration.DatabaseConfiguration
always accesses to DB whenever i access for a value?
I very much like to have a cachable DBConfiguration and also a DBReloading
strategy can be attached to it..
I didn't like commons-configuration for this non-cachable
elcin haktanir wrote:
Why doesn't
**org.apache.commons.configuration.DatabaseConfiguration
always accesses to DB whenever i access for a value?
I very much like to have a cachable DBConfiguration and also a
DBReloading strategy can be attached to it..
I didn't like commons-configuration
.? Is an exception thrown?
Oliver
-Original Message-
Date: Wed, 19 Apr 2006 20:30:37 +0200
Subject: [configuration] dbconfiguration
From: Borut Bol?ina
To: Jakarta Commons Users List
Hello,
an experimental question I have. Suppose I use database to store
configuration key and values
Hi Borut,
what exactly is the type you get, if you invoke
dbConfig.getProperty(someKeyAsString).getClass()?
Anyway, I solved the problem differenly now.
In which way?
Christian
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
Christian Hufgard pravi:
Hi Borut,
what exactly is the type you get, if you invoke
dbConfig.getProperty(someKeyAsString).getClass()?
Casting to String threw ClassCastException. I removed the code
completely (actualy it lives in byte heavens = svn), so I won't be able
to answer this
You probably get an instance of an implementation of the java.sql.Blob
interface specific to your JDBC driver. This causes the ClassCastException.
A possible solution could be to create a new class derived from
DatabaseConfiguration and overload the getProperty() method. In this
method you first
: [configuration] dbconfiguration
From: Borut Bol?ina
To: Jakarta Commons Users List
Hello,
an experimental question I have. Suppose I use database to store
configuration key and values. The database table has two columns:
key = VARCHAR
value = BLOB
The value is XML serialized from POJO with XStream
in DatabaseConfiguration too well because I was
not involved in this class. What problems do you have when you call
other methods like getString(), getInt() etc.? Is an exception thrown?
Oliver
-Original Message-
Date: Wed, 19 Apr 2006 20:30:37 +0200
Subject: [configuration
Hello,
an experimental question I have. Suppose I use database to store
configuration key and values. The database table has two columns:
key = VARCHAR
value = BLOB
The value is XML serialized from POJO with XStream. I can easily write
to databse with