make method return types in ResourceFactoryManagerRemote non-void?

John Sanda jsanda at redhat.com
Thu Sep 16 20:29:55 UTC 2010


  The methods in ResourceFactoryManagerRemote have return types of void. 
These methods are exposed to remote clients, namely the CLI. I want to 
see what folks think about making the return types non-void. In the case 
of the create methods, I suggest we return the CreateResourceHistory 
object that is persisted as part of these methods. And for the delete 
method, we would return the DeleteResourceHistory object. The reason I 
propose these changes is that it provides remote clients/CLI scripts a 
hook into the progress of these operations which take place out of band. 
If for example I write a script to deploy/undeloy an ear or war onto a 
jboss server, I don't have a good way to know 1) if/when the operation 
completes and 2) if it completes successfully. If we  pass back those 
history objects, then I can write some more intelligent scripts. I could 
make it appear that those operations are blocking while I poll (not 
indefinitely) for the history to get updated or I spin off a thread 
where I poll so that I can get the updated history asynchronously.

- John


More information about the rhq-devel mailing list