Hi,
I am trying to make a DSRequest fetch from service using new DSRequest() and I am getting following exception :
I have a DatasourceA fetch from client that I am catching on server.
I have tried to set the rpcManager to the new request as given below:
After this while running execute() the system hangs. No exception nothing happens.
The DatasourceB fetch is given below:
The service method is :
Kindly suggest. Thanks in advance.
I am trying to make a DSRequest fetch from service using new DSRequest() and I am getting following exception :
Code:
java.lang.Exception: RequestContext is missing the ServletContext. Please ensure you privide either a PageContext, a Servlet, or a ServletContext to your RequestContex.instance() call. at com.isomorphic.rpc.ServerObject.<init>(ServerObject.java:225) at com.isomorphic.rpc.ServerObject.<init>(ServerObject.java:70)
Code:
@Override public DSResponse fetch(final DSRequest req, final RPCManager rpcManager) throws Exception { // Execute Another DS Fetch final DSRequest dsRequest= new DSRequest("DatasourceB", DS_OPERATIONTYPE_FETCH); dsRequest.execute(); //this line is throwing exception }
Code:
dsRequest.setRPCManager(rpcManager);
The DatasourceB fetch is given below:
Code:
<operationBindings> <operationBinding operationType="fetch"> <serverObject lookupStyle="spring" bean="myService" className="com.test.MyServiceImpl" /> </operationBinding> </operationBindings>
Code:
@Override public DSResponse fetch(final DSRequest dsRequest,final RPCManager rpcManager) throws Exception { // some logic return dsRequest.execute(); }
Comment