Expanding Search and query capability

Hello,

it looks as you need a solution for (A). Have a look at the class DirectCommandTag. Here, actions on documents are defined which have to be executed when the tag is evaluated. Extend the set of accepted actions (currently commit, abandon, create, …) by your command (e.g. ?twoThreadQuery?).
Within the DirectCommandTag invoke your threads with the queries (e.g. by using the workspace object of X-Application sessionContext.getWorkspace() or by programming against the Tamino API for Java).

Evaluate the two queries:
- If the result is just one document, you can register this document by a name within the workspace (workspace.map(?aName?, doc)). After the invocation of the directcommand within your JSP page (<bdm:directcommand type=?twoThreadQuery? …/> ), you can select the values of this document by using a form tag <bdm:form document=?aName?>…</bdm:form>.
- If the result is a set of documents, you must provide a derived class of Page, which handles your result set. Have a look the class BusinessDocumentPage of the X-Application Java API. It is able to handle one document cursor. You need a Page object which can deal with at least two cursors. Register the resulting Page object within the sessionContext (sessionContext.setPage(?aName?, page)). After the invocation of the directcommand within your JSP page (<bdm:directcommand type=?twoThreadQuery? …>, you can browse the values of this documents by using a browse tag <bdm:browse document=?aName?>…</bdm:browse>.

For our next version of X-Application 3.1.3, the extension of directcommand will be possible by using a new feature X-Application, the Plugin mechanism. Then you don?t have to change the code of the tag class, but can just plugin your new action ?twoThreadQuery? and implement it within your own class.

If the approach with the directcommand is ok for you, I think it will be easy for you to switch to the new version when it comes and to reuse the code you added to the DirectCommandTag.java file for the Plugin implementation.

I hope, I could help you.

Bye,
Christian.