Description: When calling ActiveSpaces browser.query, it throws "ASException: INVALID_ARG (bad_browser_config - reusable browser is not supported with timescope current) ".
Symptoms: <ns2:Message>Browse operation for space : MarketCodesReferenceData is failed with exception
com.tibco.as.space.ASException: INVALID_ARG (bad_browser_config - reusable browser is not supported with timescope current)
at Native.SpaceCursor::reset(SpaceCursor.cpp:116)
at Native.Api_Browser_Query(ApiBrowser.cpp:143)
at Native.Java_com_tibco_as_space_impl_NativeImpl_browserQuery(JBrowser.cpp:68)
at com.tibco.as.space.impl.NativeImpl.browserQuery(Native Method)
at com.tibco.as.space.impl.ASBrowser.query(ASBrowser.java:77)
at com.tmobile.as.service.ASService.executeSpaceOp(ASService.java:696)
at com.tmobile.as.service.ASService.executeSpaceOps(ASService.java:146)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.tibco.ae.processapi.ui.javachooser.JavaClassMethodUtility.invokeMethod(Unknown Source)
at com.tibco.plugin.java.JavaMethodActivity.for(Unknown Source)
at com.tibco.plugin.java.JavaMethodActivity.eval(Unknown Source)
at com.tibco.pe.plugin.Activity.eval(Unknown Source)
at com.tibco.pe.core.TaskImpl.eval(Unknown Source)
at com.tibco.pe.core.Job.a(Unknown Source)
at com.tibco.pe.core.Job.k(Unknown Source)
at com.tibco.pe.core.JobDispatcher$JobCourier.a(Unknown Source)
at com.tibco.pe.core.JobDispatcher$JobCourier.run(Unknown Source)</ns2:Message>
Cause: Code resembles the following:
===================
BrowserDef browserDef = BrowserDef.create(browseOpType.getTimeout())
.setDistributionScope(BrowserDef.DistributionScope.valueOf(browseOpType.getDistributionScope().value()))
.setTimeScope(BrowserDef.TimeScope.valueOf(browseOpType.getTimeScope().value()))
.setPrefetch(browseOpType.getPrefecth());
Browser browser = space.browse(BrowserDef.BrowserType.valueOf(browseOpType.getBrowserType().value()), browserDef);
browser.query(query);
==================
For Timescope, iterator is used for browser to browse all entries so the browser.query(query) is not needed.