- logger.info("Running " + getCommandName() + " using " + Pz2Bean.get().getSearchClient()); \r
- HttpResponseWrapper httpResponse = Pz2Bean.get().getSearchClient().executeCommand(this);\r
+ return run(Pz2Bean.get().getSearchClient(),\r
+ Pz2Bean.get().getPzresp());\r
+ }\r
+ \r
+ /**\r
+ * For running the command in a thread. Client and Responses must be \r
+ * provided because at this point the CDI bean cannot be retrieved \r
+ * from within a thread.\r
+ * \r
+ * @param client\r
+ * @param pzresp\r
+ * @return\r
+ */\r
+ public ResponseDataObject run(SearchClient client,Responses pzresp) {\r
+ logger.info("Running " + getCommandName() + " using " + client); \r
+ HttpResponseWrapper httpResponse = client.executeCommand(this);\r