cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nuno Santos <nsan...@electroplus.pt>
Subject Re: flow - database.js - Componentmanager
Date Fri, 20 Jun 2003 16:50:33 GMT
For what i can tell you, i didn't found  any reference to the
deprecation of the Database.js script, although i think it would be 
wiser to take the Database.getConnection to the ScriptableConnection.

On Fri, 2003-06-20 at 17:43, Geoff Howard wrote:
> um, isn't this database access directly from flow one of the deprecated
> parts of the API??
> 
> Geoff
> 
> At 11:55 AM 6/20/2003, you wrote:
> >I think i solve it. Check this new Database.js
> >I've changed the original one:
> >----------------------------[ Starts here ]---------------------------
> >//
> >// CVS $Id: Database.js,v 1.2 2003/03/20 02:46:32 vgritsenko Exp $
> >//
> >// Prototype Database API
> >//
> >// TBD: Move this Database stuff to its own library outside of flow
> >//
> >
> >defineClass("org.apache.cocoon.components.flow.javascript.ScriptableConnection");
> >defineClass("org.apache.cocoon.components.flow.javascript.ScriptableResult");
> >
> >Database.componentManager=this.cocoon.componentManager;
> >
> >Database.getConnection = function(selectorValue) {
> >   var selector =
> >this.componentManager.lookup(Packages.org.apache.avalon.excalibur.datasource.DataSourceComponent.ROLE

> >+ "Selector");
> >   try {
> >         var ds = selector.select(selectorValue);
> >     return new Database(ds.getConnection());
> >   } finally {
> >         this.componentManager.release(selector);
> >   }
> >}
> >
> >----------------------------[ Ends here ]---------------------------
> >
> >On Fri, 2003-06-20 at 16:25, Nuno Santos wrote:
> > > What i've found is that the flowscript works just fine when i start the
> > > cocoon engine, but whenever i make any change to the script, it
> > > just loose the cocoon.componentManager!
> > >
> > >
> > > On Fri, 2003-06-20 at 16:19, Frank Taffelt wrote:
> > > > > I also found this bug in the flow Database.js!
> > > > > It seems that the componentManager is null whenever the
> > > > > script is reloaded!
> > > >
> > > > Hmm, what do you mean with "script is reloaded"? I didn't find any 
> > rational
> > > > reason for this ...
> >--
> >Nuno Santos <nsantos@electroplus.pt>
-- 
Nuno Santos <nsantos@electroplus.pt>


Mime
View raw message