[Opensource] DB contexts and ControllerRequest.getDBName() -
proposed change
Peter A. J. Pilgrim
peterp at xenonsoft.demon.co.uk
Mon Oct 14 10:46:23 PDT 2002
larry hamel wrote:
> can you help me understand the proposal more?
>
> typically, a DBObject is constructed:
>
> MyDBObject obj = new MyDBObject();
> obj.setDBName( request.getDBName() ); // can substitute any dbname here
>
> under the proposal, how will this change? Will the object constructor figure out some default DB name, or will the request object somehow figure out what object the DB name is for?
>
> also, I'm not sure if this is related, but let me throw it out just in case:
>
> I recently ran into "sticky" behavior on DBObject when I used DBObject.setStringFilter(). setting the filter causes the cashed version of the DBObject to get the filter also, so that all DBObject of the given type get this filter after setting. (is this a feature or a bug? i'm talking about 4.02; haven't tried latest expresso)
>
> would the proposal be sticky like this? are you suggesting that dbname for an object, with dbname changed on-the-fly via setDBName(), becomes sticky thereafter, or that only the setting in the schema would be sticky?
>
> ok, I'm sure that I have confused the issue enough to stop now :-)
>
Mike R
Hmmm. Interesting opportunity. In the Expresso 5+/ 6 what did you have mind for
the new Data Object layer. I was thinking that DBObject or rather DataObject
might be constructed from factories.
DataObject dataObj1 = DefaultDOBuilder.create(
"datacontext",
com.jcorporate.expresso.services.dbobj.DefaultUserInfo.java )
DataObject dataObj2 = XMLDOBuilder.create(
"datacontext",
com.jcorporate.expresso.services.dbobj.DefaultUserInfo.java )
DataObject dataObj3 = EntityBeanDOBuilder.create(
"datacontext",
com.jcorporate.expresso.services.dbobj.DefaultUserInfo.java )
How it will be implemented? No idea yet.
--
Peter Pilgrim
The e-Commerce team keeps losing game after game.
Coach, what are you gonna do? Need a new [IT] striker?
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
| ``http://www.xenonsoft.demon.co.uk/no-it-striker.html'' |
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Follow the link to my on-line resume and interview videos.
More information about the Opensource
mailing list