Skip to Main Content

Java APIs

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Simulate RMI call for unit/integration test

843793Oct 17 2006 — edited Oct 18 2006
When writing integration tests for code that will use RMI communication in production, I usually connect the client to a locally instantiated instance of the Remote object. However, because parameters and return values are treated differently for local and RMI method invocations, my integration tests are not completely correct. Sometimes I write an intermediary that makes copies of parameters, etc. to simulate what RMI would do, but this is less than ideal.

Is there a testing tool out there somewhere that can simulate RMI method invocation behaviour for unit/integration tests? Perhaps it would look something like:
		MyRemoteInterface remote = new MysteryRmiTool(new MyRemoteObject());
		Object someResult = remote.someMethod(someParameter);//tool makes copies of someParameter and someResult (unless they implement Remote, of course) 
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 15 2006
Added on Oct 17 2006
2 comments
384 views