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/02/18 08:25:03 UTC

[AltRMI] Passing stubs around

Hi,
The client stubs should be capable 
of being passed around as an argument(s)..
a simple program to give the stub 
one got from the server back to it is attached
herewith,
One would hope that it would resolve on the server ,
to the impl registered with it....
What would be right way to acheive the same .?

One way I found was working with making all 
proxies as (AltrmiProxy ) being serializable.
(java.rmi.server.RemoteObject is  serializable for
this cause)
Maybe DefaultMethodHandler during its correctArgs(..)
call will replace the stub with remote impl registered

with server.
makes sense .

V i n a y


__________________________________________________
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com

Re: [AltRMI] Event Notifier

Posted by vinaysahil chandran <sa...@yahoo.com>.
> 
> There was also that (LGPL) project at sourceforge
> that could multiplex 
> any traffic over one connection.  
I guess BEEP protocol also address  multiplexing 
over single TCP socket connection.
http://www.beepcore.org
Again there is a LGPL java beep library at sourceforge
.
http://sourceforge.net/projects/beepcore-java/

????

V i n a y

__________________________________________________
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com

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


Re: [AltRMI] Event Notifier

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

>Anyways on another page , I feel it would be good 
>exercise to have the Event Notifier pattern working 
>over AltRMI transport, 
>something along the lines of the same pattern
>over RMI .(ref 
>http://www.javareport.com/html/from_pages/oldarticles.asp?ArticleID=132
>
>)
>
>This would neccessiate a form of callbacks to be 
>made avaliable within the Altrmi realm.
>Maybe by keeping a Message-Loop Thread at the
>client-end Open for receipt of REQUEST messages back
>from the server.
>Essentially implying REQUEST messages can flow
>from the server to the client too :-)
>
Yup this would be cool.  The problem as I see is that we would have to 
have a second connection open.  I am sure smarter people could get 
duplex working over one connection usine notify/wait etc, but I can't 
see the solution without two connections (one for the server to listen 
on and one for the client to listen on).

Does anyone have any experience on duplex over one socket connection?

There was also that (LGPL) project at sourceforge that could multiplex 
any traffic over one connection.  It was very good in that it could 
shove data before it was even picked up at the other end.  Not so 
relevent to us as we have multiple transports types...

>This can again form one those so called (non-junit) 
>*test* cases which actually does more than *testing*.
>
He he.

- Paul


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


[AltRMI] Event Notifier

Posted by vinaysahil chandran <sa...@yahoo.com>.
Hi,
> Sorry dude, I turned the bat files into ant targets
> :
> 
>    ant -buildfile tests2.xml procon-serve
>    ant -buildfile tests2.xml procon-client

Dont be sorry ! .
I should be .
Ant targets are more a consistent means to work with.
Anyways on another page , I feel it would be good 
exercise to have the Event Notifier pattern working 
over AltRMI transport, 
something along the lines of the same pattern
over RMI .(ref 
http://www.javareport.com/html/from_pages/oldarticles.asp?ArticleID=132

)

This would neccessiate a form of callbacks to be 
made avaliable within the Altrmi realm.
Maybe by keeping a Message-Loop Thread at the
client-end Open for receipt of REQUEST messages back
from the server.
Essentially implying REQUEST messages can flow
from the server to the client too :-)

This can again form one those so called (non-junit) 
*test* cases which actually does more than *testing*.

Regards,
V i n a y

--- Paul Hammant <Pa...@yahoo.com> wrote:
> Vinay,
> 
> >Paul,
> >
> >>This submitted too.  Thanks.
> >>
> >welcome..
> >So what would be the right way to 
> >make the Provider-Consumer example run?
> >
> 
> - Paul
> 
> 
> --
> To unsubscribe, e-mail:  
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> 


__________________________________________________
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com

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


Re: [AltRMI] Passing stubs around

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

>Paul,
>
>>This submitted too.  Thanks.
>>
>welcome..
>So what would be the right way to 
>make the Provider-Consumer example run?
>
Sorry dude, I turned the bat files into ant targets :

   ant -buildfile tests2.xml procon-serve
   ant -buildfile tests2.xml procon-client

- Paul


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


Re: [AltRMI] Passing stubs around

Posted by vinaysahil chandran <sa...@yahoo.com>.
Paul,
> This submitted too.  Thanks.
welcome..
So what would be the right way to 
make the Provider-Consumer example run?

V i n a y.




__________________________________________________
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com

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


Re: [AltRMI] Passing stubs around

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

This submitted too.  Thanks.

- Paul

>Hi,
>The client stubs should be capable 
>of being passed around as an argument(s)..
>a simple program to give the stub 
>one got from the server back to it is attached
>herewith,
>One would hope that it would resolve on the server ,
>to the impl registered with it....
>What would be right way to acheive the same .?
>
>One way I found was working with making all 
>proxies as (AltrmiProxy ) being serializable.
>(java.rmi.server.RemoteObject is  serializable for
>this cause)
>Maybe DefaultMethodHandler during its correctArgs(..)
>call will replace the stub with remote impl registered
>
>with server.
>makes sense .
>
>V i n a y
>
>
>__________________________________________________
>Do You Yahoo!?
>Yahoo! Sports - Coverage of the 2002 Olympic Games
>http://sports.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>


Re: [PATCH] ALTRMI ClassLoaderInputStream

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

>Hi,
>Patch to enable the ObjectInputStream a chance to
>use its resolveClass(..) to load classes .
>
Applied - thanks :-)

- Paul



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


[PATCH] ALTRMI ClassLoaderInputStream

Posted by vinaysahil chandran <sa...@yahoo.com>.
Hi,
Patch to enable the ObjectInputStream a chance to
use its resolveClass(..) to load classes .

V i n a y


Index: ClassLoaderObjectInputStream.java
===================================================================
RCS file:
/home/cvspublic/jakarta-commons-sandbox/altrmi/src/java/org/apache/commons/altrmi/common/ClassLoaderObjectInputStream.java,v
retrieving revision 1.1
diff -r1.1 ClassLoaderObjectInputStream.java
40c40,43
<         final Class clazz =
---
> 		Class clazz =null;
> 		try
> 		{
> 			clazz =
42c45,50
< 
---
> 		}
> 		catch(ClassNotFoundException cnfe)
> 		{
> 		}



__________________________________________________
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com

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


Re: [AltRMI] Passing stubs around

Posted by vinaysahil chandran <sa...@yahoo.com>.
Another option would be to use
Annotations; 
annotateClass(..) overrides  in our
ClassLoaderObjectOutputStream(todo)
to pass the extra class information which 
ClassLoaderObjectInputStream can use to dynamically
load new classes ....
Have not given much thought on the way we 
can achieve the same & the repercussions it might have

, but I guess this would be a much cleaner way .
comments????

V i n a y
--- vinaysahil chandran <sa...@yahoo.com> wrote:
> Hi,
> The client stubs should be capable 
> of being passed around as an argument(s)..
> a simple program to give the stub 
> one got from the server back to it is attached
> herewith,
> One would hope that it would resolve on the server ,
> to the impl registered with it....
> What would be right way to acheive the same .?
> 
> One way I found was working with making all 
> proxies as (AltrmiProxy ) being serializable.
> (java.rmi.server.RemoteObject is  serializable for
> this cause)
> Maybe DefaultMethodHandler during its
> correctArgs(..)
> call will replace the stub with remote impl
> registered
> 
> with server.
> makes sense .
> 
> V i n a y
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Sports - Coverage of the 2002 Olympic Games
> http://sports.yahoo.com

> ATTACHMENT part 2 application/x-zip-compressed
name=more_tests_with_altrmi.zip
> --
> To unsubscribe, e-mail:  
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>


__________________________________________________
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com

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