[Opensource] DB contexts and ControllerRequest.getDBName() - proposed change

Michael Rimov rimovm at centercomp.com
Sat Oct 5 15:02:24 PDT 2002


At 06:26 PM 10/4/2002 -0500, you wrote:
>Right now, it seems that the db context is driven by the request object 
>and the only way to override that is by programmatically changing that. 
>But, there is the handy constructor Schema.addDBObject(String class, 
>String dbName). It seems right now that setting the dbName for a DBOject 
>using this constructor does nothing.
>
>I believe that if ControllerRequest.getDBName() were changed (pretty much 
>a one-liner) to first check this (before the request object), then this 
>functionality would be added to expresso. A benefit off the bat would be 
>that DBMaint could work with DBObjects outside of "default", which it does 
>not right now - unless I am missing something big.

Yes <big grin>

Use that constructor Schema.addDBOBject(class, dbName)... then run 
DBCREATE... you'll now see entries in DBOtherMap.  Then you use 
ControllerRequest.getDBName() just as you would normally, but Expresso maps 
those one or two tables to the other database.... after it's checked 
security for the current context.

HTH!
                                                 -Mike





More information about the Opensource mailing list