I am on IICE 8.4 FP4. I am currently developing a FQT to handle some specifics for my MultiQuery federated search. Can you tell me what is the scope -- life cycle -- for the FQT. Ex. Does it need to be threadsafe? Does the specific instance of the MultiQuery object use that thread, and no one else uses it? And does the FQT say persistent during the entire MultiQuery operation? Thus, can I store a value in my FQT class during the preProcessMultiQuery(...) and still have that value during postProcessResultSet(...)?
Pinned topic Scope of FQT during a MultiQuery operation
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2010-02-04T14:56:51Z at 2010-02-04T14:56:51Z by JCanipe
Re: Scope of FQT during a MultiQuery operation2009-12-11T15:42:41ZThis is the accepted answer. This is the accepted answer.After continued reading of the documentation within the sample FQT, I am going to make a big assumption (yes I know) that each MultiQuery operation gets a new copy of an FQT and it says persistent throughout the entire MultiQuery operation. Given that, if I need to store a variable at the class level (i.e. private String xyz = ...) and I need to reference that variable during other methods in the FQT, it will not have been updated by another concurrent MultiQuery operation (i.e. mine does not need to be threadsafe). If I am incorrect on this, please let me know.
SystemAdmin 110000D4XK254 Posts
Re: Scope of FQT during a MultiQuery operation2009-12-11T23:02:34ZThis is the accepted answer. This is the accepted answer.
- JCanipe 060000CWUM
your assumption is correct. For each new MultiQuery, a new instance of the FQT is created. That FQT instance is used throughout the execution of the MultiQuery. However, the threads involved in one MultiQuery all share the same FQT instance. Hence, it is not safe to store repository-specific information in a FQT class-level variable. The methods preProcessQuery() and postProcessResults() must be programmed thread-safe.
Re: Scope of FQT during a MultiQuery operation2010-02-04T14:56:51ZThis is the accepted answer. This is the accepted answer.Thank you for the explanation of the scope of the FQT. Do you have any best practice advise (industry standards) on how to deploy/house the FQT. What I am referring to is: we run our Query process in WAS JVMs. Would it be a good idea to include the FQT within a package/class structure in our Query web app, thus the FQT class file is included in our Query application's .war file. Or would you recommend putting the FQT in it's own indep.jar file and letting it get loaded from this jar instead?