I am implementing a middleware service provider in a distributed system, which provide lock management to the methods which are calling it,
we may have many commands requiring this service
Actually this service checks some conditions to see if it is safe to execute the command and if it is safe then it executes the command on a remote object,
I was thinking of defining a wrapper which receives the command , do the locking and return the result of command execution,
Is there any way to implement such a pattern ?
Thanks , Arian