Paul, You are absolutely right .. I was trying to merely test the grounds with another 3rd interface .. Neverthelesss it wud had definitely confused a newbiew for sure .
Kewl, V i n a y --- Paul Hammant <[EMAIL PROTECTED]> wrote: > Vinay, > > >Paul, > >The referenceID that is generated from within > >DefaultMethodInvocationHandler must be class level > >variable. > > > Done. > > >The modified Testcases (I have done this excercise > >with only SocketServerTest , if you say I can do > the > >same with other publish methods too) > >for the same also attached along with the new > facade > >TestInterface3 (+impl) .... > > > > I have applied these but not committed them. My > feeling is that > TestInterface2 is exactly the same as TestInterface3 > and offers nothing > new by way of tests. It will complicate a person's > view of AltRMI if > they are trying to understand it via its tests. If > we add tests, they > should be for difficult usecases, not clones of > existing tests.. What > do you think? > > - Paul > > > > > > > > > > > > >*****************PATCH************** > > > > > >Index: DefaultMethodInvocationHandler.java > >=================================================================== > >RCS file: > >/home/cvspublic/jakarta-commons-sandbox/altrmi/src/java/org/apache/commons/altrmi/server/impl/DefaultMethodInvocationHandler.java,v > >retrieving revision 1.3 > >diff -r1.3 DefaultMethodInvocationHandler.java > >48c48 > >< private int mNextReference = 1; > >--- > > > >> private static int mNextReference = 1; > >> > >130d129 > >< > >150a150 > > > >> > >> > > > >*****************PATCH************** > > > > > >Index: TestInterfaceImpl.java > >=================================================================== > >RCS file: > >/home/cvspublic/jakarta-commons-sandbox/altrmi/src/java/org/apache/commons/altrmi/test/TestInterfaceImpl.java,v > >retrieving revision 1.4 > >diff -r1.4 TestInterfaceImpl.java > >29a30 > > > >> Vector ti3Holder = new Vector(); > >> > >137a139,156 > > > >> > >> /** > >> * Method makeTestInterface3 > >> * > >> * > >> * @param thingName > >> * > >> * @return > >> * > >> */ > >> public TestInterface3 > makeTestInterface3(String > >> > >thingName) { > > > >> TestInterface3 ti3 = new > >> > >TestInterface3Impl(thingName); > > > >> ti3Holder.add(ti3); > >> > >> return ti3; > >> } > >> > >195a215,234 > > > >> } > >> > >> return retVal; > >> } > >> > >> /** > >> * Method getTestInterface3s > >> * > >> * > >> * @return > >> * > >> */ > >> public TestInterface3[] getTestInterface3s() { > >> > >> TestInterface3[] retVal = new > >> > >TestInterface3[ti3Holder.size()]; > > > >> for (int i = 0; i < ti3Holder.size(); i++) > { > >> TestInterface3 interface3 = > >> > >(TestInterface3) ti3Holder.elementAt(i); > > > >> retVal[i] = interface3; > >> > > > > > >***************************************************** > > > > > > > > > > > > > >Index: TestInterface.java > >=================================================================== > >RCS file: > >/home/cvspublic/jakarta-commons-sandbox/altrmi/src/java/org/apache/commons/altrmi/test/TestInterface.java,v > >retrieving revision 1.4 > >diff -r1.4 TestInterface.java > >100a101,111 > > > >> * Method makeTestInterface3 > >> * > >> * > >> * @param thingName > >> * > >> * @return > >> * > >> */ > >> TestInterface3 makeTestInterface3(String > >> > >thingName); > > > >> /** > >> > >127a139,147 > > > >> /** > >> * Method getTestInterface3s > >> * > >> * > >> * @return > >> * > >> */ > >> TestInterface3[] getTestInterface3s(); > >> > > > >*************************************************** > > > >cvs -q diff TestClient.java (in directory > >C:jcommonscvsjakarta-commons-sandboxaltrmisrcjavaorgapachecommonsaltrmi est) > >Index: TestClient.java > >=================================================================== > >RCS file: > >/home/cvspublic/jakarta-commons-sandbox/altrmi/src/java/org/apache/commons/altrmi/test/TestClient.java,v > >retrieving revision 1.5 > >diff -r1.5 TestClient.java > >92a93,107 > > > >> System.out.println("CLT: Test Another Facade"); > >> TestInterface3 ti3One = > >> > >ti.makeTestInterface3("One3"); > > > >> TestInterface3 ti3Two = > >> > >ti.makeTestInterface3("Two3"); > > > >> System.out.println("CLT: One name = '" + > >> > >ti3One.getName3() + "'"); > > > >> System.out.println("CLT: Two name = '" + > >> > >ti3Two.getName3() + "'"); > > > >> > >> TestInterface3[] ti3s = ti.getTestInterface3s(); > >> > === message truncated === __________________________________________________ Do You Yahoo!? Try FREE Yahoo! Mail - the world's greatest free email! http://mail.yahoo.com/ -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>