This one time, at band camp, Martin Fuchs said:

MF>On 14.09.2004 20:20:52 Bruce Snyder wrote:
MF>
MF>> ...
MF>> The cast to java.sql.Connection is explained above. Castor has
MF>> always had plans to connected to data sources other than relational
MF>> databases. By allowing this method call to return a java.lang.Object,
MF>> we're allowing other types of connections to be returned.
MF>
MF>OK, thanks for the detailed explanation.
MF>So at least the (DatabaseImpl)-type cast can be avoided by
MF>exposing getConnection() in the Database interface.
MF>This makes things at least a bit more comfortable.  :)
MF>
MF>> I've been pondering this myself over the last month or so. Especially
MF>> in just the last couple of days. There are many applications that
MF>> need access to the JDBC connection simply to set parameters on it
MF>> (e.g. batching, holdability, read-only, transaction isolation
MF>> (especially this one!), etc.). The conclusion I've come to is that
MF>> we should expose such parameters via method calls. This brings up
MF>> another issue, however. We can't place JDBC-specific method calls
MF>> on the Database interface. Because of this, I've been thinking about
MF>> creating a new interface model like so:
MF>
MF>I can show you my typical needs for session intializations:
MF>
MF>    Statement stmt = conn.createStatement();
MF>
MF>    try {
MF>        stmt.execute("set role ROLE_XXX identified by PASSWORD");
MF>        stmt.execute("alter session set nls_language = GERMAN");
MF>        stmt.execute("alter session set nls_territory = GERMANY");
MF>        stmt.execute("alter session set nls_numeric_characters = ',.'");
MF>    } catch(...
MF>
MF>This just requires the ability to execute some SQL statements.
MF>Would this also be possible with the method calls, you are thinking about?

No, I was only speaking of exposing method calls on the java.sql.Connetion
object. The stmt.execute() calls above can be achieved using the
java.sql.Connection object obtained from Database.getConnection().
Or am I missing something?

Bruce
--
perl -e 'print unpack("u30","<0G)[EMAIL PROTECTED]&5R\"F9E<G)E=\$\!F<FEI+F-O;0\`\`");'

The Castor Project
http://www.castor.org/

Apache Geronimo
http://incubator.apache.org/projects/geronimo.html



----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to