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:\jcommons\cvs\jakarta-commons-sandbox\altrmi\src\java\org\apache\commons\altrmi\test)
>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();
>>
>>              for (int i = 0; i < ti3s.length; i++) {
>>                  TestInterface3 ti3 = ti3s[i];
>>                  System.out.println("CLT: .. name["+i+"] = '" +
>>
>ti3s[i].getName3() + "'");
>
>>              }
>>              
>>              
>>              
>>
>
>*******************************************************
>
>cvs -q diff SocketServerTest.java (in directory
>C:\jcommons\cvs\jakarta-commons-sandbox\altrmi\src\java\org\apache\commons\altrmi\test)
>Index: SocketServerTest.java
>===================================================================
>RCS file:
>/home/cvspublic/jakarta-commons-sandbox/altrmi/src/java/org/apache/commons/altrmi/test/SocketServerTest.java,v
>retrieving revision 1.8
>diff -r1.8 SocketServerTest.java
>66c66
><         as.publish(ti, "Hello", new
>PublicationDescription(TestInterface.class,
>TestInterface2.class));
>---
>
>>        as.publish(ti, "Hello", new
>>
>PublicationDescription(TestInterface.class,new
>Class[]{TestInterface2.class,TestInterface3.class}));
>
>
>***************************************************
>cvs -q diff tests.xml (in directory
>C:\jcommons\cvs\jakarta-commons-sandbox\altrmi\)
>Index: tests.xml
>===================================================================
>RCS file:
>/home/cvspublic/jakarta-commons-sandbox/altrmi/tests.xml,v
>retrieving revision 1.7
>diff -r1.7 tests.xml
>100c100
><        
>additionalfacades="org.apache.commons.altrmi.test.TestInterface2">
>---
>
>>       
>>
>additionalfacades="org.apache.commons.altrmi.test.TestInterface2,org.apache.commons.altrmi.test.TestInterface3">
>
>*******************************************************
>
>
>
>
>__________________________________________________
>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]>
>




--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to