Hi Rony,

Thanks for that - it seems there are three operations here.

there is 'registering' the function (handled via rxFuncLoad, rxFuncDrop) and
there is 'loading' and 'initialising', in this case both handled by the
libraries own functions 'SQLLoadFuncs' and 'SQLDropFuncs'.

The 
documentation<http://rexxsql.sourceforge.net/doc/rexxsql/SQLDROPFUNCS.html>for
rexxSQL says of SQLDropFuncs

> It should be called at the end of every Rexx/SQL program. In particular,
> this function should be called after a syntax error has been caught with
> SIGNAL ON SYNTAX.
>

Mark Hessling says in response to a bug
report<http://sourceforge.net/tracker/?func=detail&aid=3056981&group_id=30840&atid=400536>from
Brian Cherry

> SQLLoadFuncs() does some necessary initialisation, so SQLLoadFuncs() MUST
> be called for each Rex/SQL program. Internally, SQLLoadFuncs() checks if
> the other functions have been loaded, and loads then if not.
> The documentation will be changed to reflect this requirement.
>

Trying to make sense of this in the context of your comment, I surmise that
the SQLLoadFuncs and SQLdropFuncs functions don't necesarily load and drop
the functions, but sometimes only perform some
initialisation/uninitialisation tasks.  Looking at the code, I guess that
this is managed by the internal C variable RexxSQLInitialised

thanks

Jon



On 22 April 2011 11:34, Rony G. Flatscher <rony.flatsc...@wu-wien.ac.at>wrote:

> Jon:
>
> On 22.04.2011 11:16, Sahananda (Jon) Wolfers wrote:
> > What I kept running into, which floored me was that with rexx\sql you
> > have to run the loadfuncs function, when you start on a new thread,
> > even though rxFuncQuery reports the functions as already loaded.
> AFAIR you should *never* unload external Rexx functions, as they do not
> consume real resources but allow Rexx to keep ("globally") an inventory
> of which external functions are located in which library. This way
> resolving external function calls is possible for Rexx.
>
> If you unload external Rexx functions, then the unloading occurs
> "globally", i.e. if you have Rexx programs running in parallel in other
> processes (or threads for that matter), which rely on the presence of
> these external Rexx functions, they will stop to work as Rexx is not
> aware anymore that these external Rexx functions exist (and in which
> library), but will raise an appropriate error.
>
> HTH,
>
> ---rony
>
>
> ------------------------------------------------------------------------------
> Fulfilling the Lean Software Promise
> Lean software platforms are now widely adopted and the benefits have been
> demonstrated beyond question. Learn why your peers are replacing JEE
> containers with lightweight application servers - and what you can gain
> from the move. http://p.sf.net/sfu/vmware-sfemails
> _______________________________________________
> Oorexx-devel mailing list
> Oorexx-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/oorexx-devel
>
------------------------------------------------------------------------------
Fulfilling the Lean Software Promise
Lean software platforms are now widely adopted and the benefits have been 
demonstrated beyond question. Learn why your peers are replacing JEE 
containers with lightweight application servers - and what you can gain 
from the move. http://p.sf.net/sfu/vmware-sfemails
_______________________________________________
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to