:) That is what I want to know. I just want to double confirm Jess only create one instance of my userfunction if I only add it once by:Jess doesn't do anything to create additional instances of your Userfunction class.
Rete r = new Rete();
r.addUserfunction(new myUserfunction());
thanks
Gang
From: [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Re: JESS: User function.
Date: Tue, 1 Oct 2002 14:09:15 -0700 (PDT)
I think Gang Liu wrote:
> hi, all
> Thanks for your help in advance.
> This quesion is about userfunction. I define a userfunction ,add it to Jess
> and use it as a command. Whether we only have one instance of this java
> class (userfunction) in jess? Since we only create this instance once when
> we add it to jess, then use it forever:
>
> Rete r = new Rete();
> r.addUserfunction(new ExMyUpcase());
>
> thanks
> Gang
>
Not sure what you're asking. Jess doesn't do anything to create
additional instances of your Userfunction class. The function is only
available in the Rete object you add it to, so you could have one per
Rete object, or you could use a single one and share it among many
Rete objects. But in any case, however many you create, that's all
there are.
---------------------------------------------------------
Ernest Friedman-Hill
Distributed Systems Research Phone: (925) 294-2154
Sandia National Labs FAX: (925) 294-2234
Org. 8920, MS 9012 [EMAIL PROTECTED]
PO Box 969 http://herzberg.ca.sandia.gov
Livermore, CA 94550
--------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the list
(use your own address!) List problems? Notify [EMAIL PROTECTED]
--------------------------------------------------------------------
_________________________________________________________________ Chat with friends online, try MSN Messenger: http://messenger.msn.com -------------------------------------------------------------------- To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]' in the BODY of a message to [EMAIL PROTECTED], NOT to the list (use your own address!) List problems? Notify [EMAIL PROTECTED] --------------------------------------------------------------------
