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 <[EMAIL PROTECTED]>

Reply via email to