[Opensource] transferring connections to DBObjects with "split DB" context

Michael Rimov rimovm at centercomp.com
Wed Mar 26 17:42:34 PST 2003


At 03:14 PM 3/26/2003 +0100, you wrote:

>I think I cleared out some pbs I was having with transferring connections 
>to DBObjects with "split DB" context, and that some of them are due to a 
>bug in Expresso :
>I first suggested a correction in DBObject.java in a section of method 
>setCacheSize() dealing with variable dbl ("DBObjLimit") in a mail entitled 
>"pb retrieving DBObjLimit with DB without setup tables", because I 
>observed the cache limit was looked for in the wrong DB ("pure data" DB 
>and not "setup DB", referring to a context/DB with no setup tables)
>Mike Rimov pointed out a pb. in the way I defined connections attached to 
>my DBObjects : I should use myDBObjClass(dbName, setupContext) as an 
>invocation to my own DBObjects constructors instead 
>of  myDBObjClass(dbName).  I corrected that, and tried to ensure that all 
>the DBObjects that should share a same connection were built this way - 
>but still had a pb. with DBObjLimit !
>
>After some debugging, I have one question and some suggestions :
>  - in class DBObject, does "originalDBName" or "originalDBKey"  means 
> "setup table context name" or "the initial context name before any 
> mapping occurs" as written in javadoc, or can have both meanings ?

I believe it means setupTableContext name... although I believe it's more 
bad wording regarding the javadocs, since technically it does mean 
both.  But the former is a better interpretation IMO.



>- if method getOriginalDBName of class DBObject  is indeed the method that 
>has to be called in order to get the "setup table context name" of the 
>underlying object, (in which case it could be renamed to smthg like 
>"getSetupContextName"),  then there are at least 2 bugs in Expresso :
>1. in method searchAndRetrieveList() of class DBObject , the line :
>   myObj.setDBName(getDBName());
>indirectly calls setOriginalDBName() and then assigns a potentially 
>different "setup context" for object myObj

Thanks, I'll get that fixed.  There's also a couple of fixes in 
JDBCExecutor along these lines too that you'll see in 5.0.4


>2. in method addToCache(DBObject theDBObj) of class DBObject, the line :
>   newObj.setDBName(theDBObj.getDBName());
>causes same pb. with object newObj.

Absolutely correct.  Thanks for the catch on this as well.


>...but it is surely not a good way and may be I am missing some concepts 
>of Expresso - does anyone agree with my observations or can clear out the 
>questions that I raised ?

I haven't looked at DBObject in depth for a couple of weeks, so the details 
are fuzzy right now, I'll take a look and see what we can come up with.

Thanks for the post!
                                                 -Mike 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.jcorporate.com/pipermail/opensource/attachments/20030326/26cf9c1e/attachment-0002.htm


More information about the Opensource mailing list