Question

I have an application that makes to remote method calls to a BlaseDS server that uses Java to connect to a 3rd party data system. It needs to make 2 remote method calls method_A() and method_B().

java method_A() is called on a timer of 5 seconds.

java method_B() is called by a user initiated action.

If the timer is complete and the Application calls method_A() and before method_A() is able to return any data method_B() is called, this causes method_A() from returning any data. Then method_B() throws an error.

any more calls to method_A() will work fine after the error is thrown but method_B() will not work after the error.

is there any way you can configure BlazeDS to ensure that method_A() finishes before method_B() is actioned or if method_A() and method_B() and be called concurrently with out any error? or should I refactor the service to conform to the command pattern?

Thank you in advance for any help that you may be able to provide

Was it helpful?

Solution

As far as I know there is no such concurrency feature included. The only concurrency feature is the "concurrency" variable, that affects only calls on the same method

So as you think, a solution would be to use the command pattern

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top