Enable JSON on server B since A will be communicating to B via JSON
We have already enabled the JSON on server both the servers in web.xml file.
In A you have to edit webapps\konakart\WEB-INF\classes\konakart_app.properties so that it uses KKJSONEng instead of KKEng.
We have changed below propertie in server A konakart_app.properties:
konakart.app.engineclass=com.konakart.json.KKJSONEng
In A you have to edit webapps\konakart\WEB-INF\classes\konakart.properties to point konakart.json.engine.url to the URL of the JSON servlet in B since the JSON requests have to be sent to B.
We have edited below properties in server A konakart.properties:
torque.database.default = store2
konakart.KKEngIfImplClassName = com.konakart.json.KKJSONEng
konakart.app.json.engine.classname = com.konakart.json.KKJSONEng
konakart.json.engine.url = http://localhost:8082/nbStore/konakartjson
In BaseAction.java of A in the method getStoreIdFromRequest() you should always return the store id that A needs to access so that when the request is sent to B, it will contain a reference to the store against which the API call needs to be run.
From server A In BaseAction getStoreIdFromRequest() always returns store2 and BaseAction getStoreIdFromRequest() returns store1 in server B always.
After doing the above all four mentioned things, still if two different user tries to login in the two different stores then the user who logged in first store gets logged out when user in second store logs in.
I don't understand what you mean by KKBasePeer.executeQuery("Query") since this is code that can only run in the B engine when you customize a manager or in the OrderIntegrationMgr of B.
We are using KKBasePeer.executeQuery("Some SQL Query") statement in action class itself of server A. So did you mean, we will not be able to user the KKBasePeer in server A.
We have already enabled the JSON on server both the servers in web.xml file.
In A you have to edit webapps\konakart\WEB-INF\classes\konakart_app.properties so that it uses KKJSONEng instead of KKEng.
We have changed below propertie in server A konakart_app.properties:
konakart.app.engineclass=com.konakart.json.KKJSONEng
In A you have to edit webapps\konakart\WEB-INF\classes\konakart.properties to point konakart.json.engine.url to the URL of the JSON servlet in B since the JSON requests have to be sent to B.
We have edited below properties in server A konakart.properties:
torque.database.default = store2
konakart.KKEngIfImplClassName = com.konakart.json.KKJSONEng
konakart.app.json.engine.classname = com.konakart.json.KKJSONEng
konakart.json.engine.url = http://localhost:8082/nbStore/konakartjson
In BaseAction.java of A in the method getStoreIdFromRequest() you should always return the store id that A needs to access so that when the request is sent to B, it will contain a reference to the store against which the API call needs to be run.
From server A In BaseAction getStoreIdFromRequest() always returns store2 and BaseAction getStoreIdFromRequest() returns store1 in server B always.
After doing the above all four mentioned things, still if two different user tries to login in the two different stores then the user who logged in first store gets logged out when user in second store logs in.
I don't understand what you mean by KKBasePeer.executeQuery("Query") since this is code that can only run in the B engine when you customize a manager or in the OrderIntegrationMgr of B.
We are using KKBasePeer.executeQuery("Some SQL Query") statement in action class itself of server A. So did you mean, we will not be able to user the KKBasePeer in server A.