You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by vinaysahil chandran <sa...@yahoo.com> on 2002/03/30 02:42:07 UTC

[ALTRMI] ProxyGenerator fix

Paul,
The classloader fix sent proxy generation  for a toss.
:-)
(we were using Class.equals(Class) .
both loaded by  diff classloader's)

Here is the fix ...

Regards,
V i n a y


Index:
src/java/org/apache/commons/altrmi/generator/ProxyGeneratorImpl.java
===================================================================
RCS file:
/home/cvspublic/jakarta-commons-sandbox/altrmi/src/java/org/apache/commons/altrmi/generator/ProxyGeneratorImpl.java,v
retrieving revision 1.11
diff -r1.11 ProxyGeneratorImpl.java
564c564
<             if (clazz.equals(mAdditionalFacades[p]))
{
---
>             if
(clazz.getName().equals(mAdditionalFacades[p].getName()))
{



__________________________________________________
Do You Yahoo!?
Yahoo! Greetings - send holiday greetings for Easter, Passover
http://greetings.yahoo.com/

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [ALTRMI] ClassRetriever patch

Posted by Paul Hammant <Pa...@yahoo.com>.
Vinay,

Applied, thanks dude.

- Paul

>Paul,
>Patch to generate the exception correctly from
>classretrievers.
>[
>getResourceStream does NOT raise any exception but
>returns a 'null' InputStream on failure to find a
>resource
>]
>Regards,
>V i n a y
>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


[ALTRMI] ClassRetriever patch

Posted by vinaysahil chandran <sa...@yahoo.com>.
Paul,
Patch to generate the exception correctly from
classretrievers.
[
getResourceStream does NOT raise any exception but
returns a 'null' InputStream on failure to find a
resource
]
Regards,
V i n a y


Index: PlainClassRetriever.java
===================================================================
RCS file:
/home/cvspublic/jakarta-commons-sandbox/altrmi/src/java/org/apache/commons/altrmi/server/impl/classretrievers/PlainClassRetriever.java,v
retrieving revision 1.3
diff -r1.3 PlainClassRetriever.java
53,58c53,56
<         try {
<             is =
mClassLoader.getResourceAsStream(thingName);
<         } catch (Exception e) {
<             throw new ClassRetrievalException(
<                 "Generated class not found in
classloader specified : " + e.getMessage());
<         }
---
>         is =
mClassLoader.getResourceAsStream(thingName);
> 		if(is==null)
>             throw new
ClassRetrievalException("Generated class for
"+thingName+" not found in specified classloader "  );
> 




__________________________________________________
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://http://taxes.yahoo.com/

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [ALTRMI] ProxyGenerator patch

Posted by Paul Hammant <Pa...@yahoo.com>.
Vinay,

No I think all of them dude....
Thats is what interfaces are all about yes?  If you want to hide methods 
have them in different interfaces, and don't extend from them..?

- Paul

>Paul,
>We should generate proxies for 
>calls  declared in the remote interface ONLY ,
>and should NOT generate calls in proxies for methods
>inherited from the base interface(or class) .
>Am I right ..? 
>
>[See attached patch ]
>
>Regards,
>V i n a y
>
>Index: ProxyGeneratorImpl.java
>===================================================================
>RCS file:
>/home/cvspublic/jakarta-commons-sandbox/altrmi/src/java/org/apache/commons/altrmi/generator/ProxyGeneratorImpl.java,v
>retrieving revision 1.12
>diff -r1.12 ProxyGeneratorImpl.java
>252c252
><             Method[] methods = clazz.getMethods();
>---
>
>>            Method[] methods =
>>
>clazz.getDeclaredMethods();
>
>
>
>__________________________________________________
>Do You Yahoo!?
>Yahoo! Movies - coverage of the 74th Academy Awards®
>http://movies.yahoo.com/
>
>--
>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>
>




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


[ALTRMI] ProxyGenerator patch

Posted by vinaysahil chandran <sa...@yahoo.com>.
Paul,
We should generate proxies for 
calls  declared in the remote interface ONLY ,
and should NOT generate calls in proxies for methods
inherited from the base interface(or class) .
Am I right ..? 

[See attached patch ]

Regards,
V i n a y

Index: ProxyGeneratorImpl.java
===================================================================
RCS file:
/home/cvspublic/jakarta-commons-sandbox/altrmi/src/java/org/apache/commons/altrmi/generator/ProxyGeneratorImpl.java,v
retrieving revision 1.12
diff -r1.12 ProxyGeneratorImpl.java
252c252
<             Method[] methods = clazz.getMethods();
---
>             Method[] methods =
clazz.getDeclaredMethods();



__________________________________________________
Do You Yahoo!?
Yahoo! Movies - coverage of the 74th Academy Awards�
http://movies.yahoo.com/

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [ALTRMI] ProxyGenerator fix

Posted by vinaysahil chandran <sa...@yahoo.com>.
Paul,
I will give a look into the kewl work done on DGC
front ...
IMO we should have good unit tests too.
Most of the tests that we have are actually
samples/proof-of-concept works .
Maybe we should have proper junit testcases 
going around.
Thoughts ...?
And thus the present so-called 'test' samples
can be moved to examples/samples folder.
Thoughts ... ?

On another note , do you know of any good
opensource stress testing tool that we can
employ to get benchmarks against multiple
client hits  and they way its performs ..

Regards,
V i n a y


__________________________________________________
Do You Yahoo!?
Yahoo! Greetings - send holiday greetings for Easter, Passover
http://greetings.yahoo.com/

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [ALTRMI] ProxyGenerator fix

Posted by Paul Hammant <Pa...@yahoo.com>.
Vinay,

Applied.  Thanks for that dude.

- Paul

>Paul,
>The classloader fix sent proxy generation  for a toss.
>:-)
>(we were using Class.equals(Class) .
>both loaded by  diff classloader's)
>
>Here is the fix ...
>
>Regards,
>V i n a y
>
>
>Index:
>src/java/org/apache/commons/altrmi/generator/ProxyGeneratorImpl.java
>===================================================================
>RCS file:
>/home/cvspublic/jakarta-commons-sandbox/altrmi/src/java/org/apache/commons/altrmi/generator/ProxyGeneratorImpl.java,v
>retrieving revision 1.11
>diff -r1.11 ProxyGeneratorImpl.java
>564c564
><             if (clazz.equals(mAdditionalFacades[p]))
>{
>---
>
>>            if
>>
>(clazz.getName().equals(mAdditionalFacades[p].getName()))
>{
>
>
>
>__________________________________________________
>Do You Yahoo!?
>Yahoo! Greetings - send holiday greetings for Easter, Passover
>http://greetings.yahoo.com/
>
>--
>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>
>




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>