JNDIConnectionSource.activateOptions calls ConnectionSourceSkeleton.discoverConnnectionProperties which sets dialectCode but JNDIConnectionSource redeclares dialectCode from what is declared in the super class ConnectionSourceSkeleton.
Developers, is it supposed to redeclare dialectCode? On Thu, 24 Feb 2005 10:14:17 +0100 (MET), Arthur Brown <[EMAIL PROTECTED]> wrote: > > I do not adding anything new, I just try to use the class with > Oracle 9, and it doesn't work. > > I'm getting the error: Unknown SQLDialect. > > After I've debugged it, I figured out, what I've described: > > the class > JNDIConnectionSource > returns all the time the own instance of SQLDialect attribute > (UKNOWN) > , whereas > the base class function > ConnectionSourceSkeleton::discoverConnnectionProperties > discover correct the Oracle Dialect but assign it to its own (!) > instance. > > To explain it. I will try to make a schema, after the function > discoverConnnectionProperties has been called: > > Instance JNDIConnectionSource > dialectCode = ConnectionSource.UNKNOWN_DIALECT; > Base Class: > ConnectionSourceSkeleton > dialectCode = ConnectionSource.Oracle; > > that's the situation. > the function overwite the base class getter function: > > JNDIConnectionSource::getSQLDialectCode() > returns JNDIConnectionSource::dialectCode (always UNKNOWN) > > whereas the correct value in > ConnectionSourceSkeleton::dialectCode > is never seen. > > To fix it, just remove the own attribute and the own > getter function for dialectCode in > JNDIConnectionSource class. > > In this case the base class value (the correct one) is returned, and all is > fine. > > Regards, > Arthur Brown > > > Are you trying to make a new OracleDialet? > > What is the bug in the current class? I guess I don't quite > > understand your problem and how you are trying to fix it. > > > > On Wed, 23 Feb 2005 09:18:05 +0100 (MET), Arthur Brown > > <[EMAIL PROTECTED]> wrote: > > > Hi James, > > > > > > no, I'm trying to use it with Oracle. > > > However it cannot work with any dialect, because as I described, > > > it has a bug. > > > > > > The dialect attribute is set in base class: > > > ConnectionSourceSkeleton > > > > > > and the getter in the derived class JNDIConnectionSource > > > getSQLDialectCode() is returning the attribute from the class > > > JNDIConnectionSource > > > where the dialect attribute is initialized with UNKKNOWN and has that > > value > > > forever. > > > > > > To fix, simple comment this code in > > > > > > /** > > > * int dialectCode = ConnectionSource.UNKNOWN_DIALECT; > > > * public int getSQLDialectCode() { > > > * return dialectCode; > > > * } > > > **/ > > > > > > in JNDIConnectionSource > > > and everything is fine. > > > > > > Thanks > > > Arthur Brown > > > > > > > Are you adding a new Dialect? If yes, then you probably need to > > > > change at lest a bit of log4j code to know about that new dialect. > > > > > > > > -- > > > > James Stauffer > > > > http://www.geocities.com/stauffer_james/ > > > > > > > > --------------------------------------------------------------------- > > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > >>Hi, > > > >> > > > >>I have fund a small problem with > > > >>JNDIConnectionSource. > > > >> > > > >>It overwrite the attribute and getter for > > > >> > > > >> int dialectCode = ConnectionSource.UNKNOWN_DIALECT; > > > >> public int getSQLDialectCode() { > > > >> return dialectCode; > > > >> } > > > >> > > > >>from it's parent class > > > >>ConnectionSourceSkeleton. > > > >> > > > >>However, the function > > > >>discoverConnnectionProperties() > > > >>that called to discover the SQL dialect > > > >>is located in the parent class, where the attribute is set. > > > >> > > > >>Evidently, the getter in JNDIConnectionSource is always returning > > > >>UNKNOWN_DIALECT. > > > >> > > > >>Can somebody with write permission correct this please? > > > >> > > > >>Thanks > > > >>Arthur Brown > > > > > > -- > > > Lassen Sie Ihren Gedanken freien Lauf... z.B. per FreeSMS > > > GMX bietet bis zu 100 FreeSMS/Monat: http://www.gmx.net/de/go/mail > > > > > > > > > -- > > James Stauffer > > http://www.geocities.com/stauffer_james/ > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > -- > Lassen Sie Ihren Gedanken freien Lauf... z.B. per FreeSMS > GMX bietet bis zu 100 FreeSMS/Monat: http://www.gmx.net/de/go/mail > -- James Stauffer http://www.geocities.com/stauffer_james/ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]