You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Paul Hammant <Pa...@yahoo.com> on 2002/03/21 01:20:07 UTC

Re: [Altrmi] PATCH Passing pf remote obj ' ref

Vinay,

I am unsure whether this change is a modification to the one you sent me 
yesterday (redirect).
If it is not, I am in trouble because I have applied all the patches 
locally, and it is still not compiling...

   "PipedObjectStreamServer should be declared abstract; it does not 
define getMethodInvocationHandler(java.lang.String) ..."
    .. (and others)..

Regards,

- Paul

>Paul,
>Client can now passes references of remote bak 
>to server .
>
>So the example that was crafted earlier
>,Consumer-Provider, works fine now .
>TestProvider tpi = (TestProvider) af.lookup("P");
>TestConsumer tci = (TestConsumer) af.lookup("C");
>tpi.getName(0);
>tci.getProviderName(tpi); /// <---- works now
>
>This has been done by  a hack in BaseServedObject.
>
>
>
>So you can try out the examples within tests2.xml
>, but I guess we still have to decorate this
>build script with the logger.jars .
>
>Comments.:-?
>
>
>Regards,
>V i n a y
>
>
>
>
>__________________________________________________
>Do You Yahoo!?
>Yahoo! Movies - coverage of the 74th Academy Awards®
>http://movies.yahoo.com/
>
>
>------------------------------------------------------------------------
>
>Index: src/java/org/apache/commons/altrmi/client/impl/BaseServedObject.java
>===================================================================
>RCS file: /home/cvspublic/jakarta-commons-sandbox/altrmi/src/java/org/apache/commons/altrmi/client/impl/BaseServedObject.java,v
>retrieving revision 1.12
>diff -r1.12 BaseServedObject.java
>195a196
>
>>		marshallCorrection(args);
>>
>271d271
>< 
>283a284,299
>
>>	
>>	private void marshallCorrection(Object[] args)
>>	{
>>		
>>		for (int i = 0; i < args.length; i++) 
>>		{
>>			//check whether its one of those remote ref that we got from the server
>>			//TODO : todo
>>			
>>    		if(mAltrmiFactory.getReferenceID(args[i])!=null)
>>    		{
>>				String objName=args[i].getClass().getName().substring(16);
>>				args[i]=makeFacadeRefHolder(args[i],objName);
>>    		}
>>        }
>>	}
>>
>Index: src/java/org/apache/commons/altrmi/server/AltrmiPublisher.java
>===================================================================
>RCS file: /home/cvspublic/jakarta-commons-sandbox/altrmi/src/java/org/apache/commons/altrmi/server/AltrmiPublisher.java,v
>retrieving revision 1.5
>diff -r1.5 AltrmiPublisher.java
>81a82,93
>
>>    /**
>>     * Method getMethodInvocationHandler
>>     *
>>     *
>>     * @param publishedName
>>     *
>>     * @return
>>     *
>>     */
>>
>>    MethodInvocationHandler getMethodInvocationHandler(String publishedName);
>>
>Index: src/java/org/apache/commons/altrmi/server/impl/DefaultMethodInvocationHandler.java
>===================================================================
>RCS file: /home/cvspublic/jakarta-commons-sandbox/altrmi/src/java/org/apache/commons/altrmi/server/impl/DefaultMethodInvocationHandler.java,v
>retrieving revision 1.4
>diff -r1.4 DefaultMethodInvocationHandler.java
>174d173
>< 
>205,207c204,205
><                     (DefaultMethodInvocationHandler) mAltrmiPublisher.getMethodInvocationHandler(mr,
><                         frh.getObjectName());
>< 
>---
>
>>                    (DefaultMethodInvocationHandler) 
>>					mAltrmiPublisher.getMethodInvocationHandler(frh.getObjectName());
>>
>211a210,222
>
>>	
>>    private void debug(Object[] args) {
>>
>>    	System.out.println("*************************");
>>        for (int i = 0; i < args.length; i++) {
>>            Object arg = args[i];
>>
>>            System.out.println("i = " + i + " class= " + args[i].getClass().getName() + " "
>>                               + args[i].toString());
>>        }
>>    	System.out.println("*************************");		
>>    }
>>	
>>
>Index: src/java/org/apache/commons/altrmi/server/impl/adapters/PublicationAdapter.java
>===================================================================
>RCS file: /home/cvspublic/jakarta-commons-sandbox/altrmi/src/java/org/apache/commons/altrmi/server/impl/adapters/PublicationAdapter.java,v
>retrieving revision 1.2
>diff -r1.2 PublicationAdapter.java
>104d103
>< 
>164a164,167
>
>>    public MethodInvocationHandler getMethodInvocationHandler(String publishedName) 
>>	{
>>        return (MethodInvocationHandler) mPublishedObjects.get(publishedName);
>>    }
>>
>
>
>------------------------------------------------------------------------
>
>--
>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: [Altrmi] PATCH Passing pf remote obj ' ref

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

Nice idea, but we would have to get the BEEP or homegrown multiplexer 
working first, yes?

- Paul

>Paul,
>org.apache.commons.altrmi.client.impl.stream.StreamInvocationHandler
>has synchronized handleInvocation(...) .
>With little efforts I guess we can make this
>class ThreadSafe and thus get rid of sync block ...
>
>Maybe we can  support async' calls with the altrmi 
>too ??? (todo item maybe)
>
>Comments ...:-?
>
>Regards,
>Vinay
>--- vinaysahil chandran <sa...@yahoo.com> wrote:
>
>>Paul,
>>
>>I worked with a fresh CVS checkout and it 
>>(pipeda from tests.xml)
>> target works well without any hiccups ..
>>I wasn't able to reproduce it out at my machine .
>>Morevoer the patch's that I sent second time 
>>doesn't
>>seems to be commited(Passing_Facade.patch).
>>Can you verify the way's I have employed there ???
>>Basically,
>> I have tried to pass Remote ref wrapped inside
>>FacadeREfHolder obj back to the Server.
>>( I think had written FacadeRefHolder for this 
>>purpose but missed out on using  it to wrap
>>arguments 
>>sent  from the client.I have just written the 
>>function to wrapp the Facade with
>>FacadeRefHolder at the client side .)
>>
>>I hope I have conveyed the stuff I did over the
>>past 2  patchs well across to you...
>>
>>Regards,
>>V i n a y
>>
>>--- Paul Hammant <Pa...@yahoo.com> wrote:
>>
>>>Vinay,
>>>
>>>I have applied that too, and it is looking good.
>>>One problem, test 'pipeda' fails now with a NPE at
>>>this line in correct 
>>>args :
>>>
>>>    args[i] =
>>>asih.mRefBeans.get(frh.getReferenceID());
>>>
>>>Can you take a look dude..?
>>>
>>>Regards,
>>>
>>>- Paul
>>>
>>>>Paul,
>>>>No excuses , I had NOT done *ant clean* 
>>>>before  building the src after the changes ..
>>>>Here is the patch that I  missed ...
>>>>
>>>>But can you get the reason behind the 
>>>>getMethodInvocationHandler(MethodRequest
>>>>
>>mr,String
>>
>>>>objectName)  ..
>>>>
>>>>Wont a more generic call like :
>>>>getMethodInvocationHandler(String puslishedname)
>>>>be better .
>>>>Comments ?
>>>>
>>>>Sorry for this glitch,
>>>>Vinay
>>>>
>>>>
>>>>
>>>>Index: AbstractServer.java
>>>>
>>===================================================================
>>
>>>>RCS file:
>>>>
>>/home/cvspublic/jakarta-commons-sandbox/altrmi/src/java/org/apache/commons/altrmi/server/impl/AbstractServer.java,v
>>
>>>>retrieving revision 1.21
>>>>diff -r1.21 AbstractServer.java
>>>>231a232,244
>>>>
>>>>>  /**
>>>>>    * Method getMethodInvocationHandler
>>>>>    *
>>>>>    *
>>>>>    * @param publishedName
>>>>>    *
>>>>>    * @return
>>>>>    *
>>>>>    */
>>>>>   public MethodInvocationHandler
>>>>>
>>>>getMethodInvocationHandler(String publishedName)
>>>>
>>{
>>
>>>>>       return
>>>>>
>>mInovcationHandlerAdapter.getMethodInvocationHandler(publishedName);
>>
>>>>>   }
>>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>__________________________________________________
>>>
>>>>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>
>>>
>>
>>__________________________________________________
>>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>
>>
>
>
>__________________________________________________
>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>


Re: [Altrmi] PATCH Passing pf remote obj ' ref

Posted by vinaysahil chandran <sa...@yahoo.com>.
Paul,
org.apache.commons.altrmi.client.impl.stream.StreamInvocationHandler
has synchronized handleInvocation(...) .
With little efforts I guess we can make this
class ThreadSafe and thus get rid of sync block ...

Maybe we can  support async' calls with the altrmi 
too ??? (todo item maybe)

Comments ...:-?

Regards,
Vinay
--- vinaysahil chandran <sa...@yahoo.com> wrote:
> Paul,
> 
> I worked with a fresh CVS checkout and it 
> (pipeda from tests.xml)
>  target works well without any hiccups ..
> I wasn't able to reproduce it out at my machine .
> Morevoer the patch's that I sent second time 
> doesn't
> seems to be commited(Passing_Facade.patch).
> Can you verify the way's I have employed there ???
> Basically,
>  I have tried to pass Remote ref wrapped inside
> FacadeREfHolder obj back to the Server.
> ( I think had written FacadeRefHolder for this 
> purpose but missed out on using  it to wrap
> arguments 
> sent  from the client.I have just written the 
> function to wrapp the Facade with
> FacadeRefHolder at the client side .)
> 
> I hope I have conveyed the stuff I did over the
> past 2  patchs well across to you...
> 
> Regards,
> V i n a y
> 
> --- Paul Hammant <Pa...@yahoo.com> wrote:
> > Vinay,
> > 
> > I have applied that too, and it is looking good.
> > One problem, test 'pipeda' fails now with a NPE at
> > this line in correct 
> > args :
> > 
> >     args[i] =
> > asih.mRefBeans.get(frh.getReferenceID());
> > 
> > Can you take a look dude..?
> > 
> > Regards,
> > 
> > - Paul
> > 
> > >Paul,
> > >No excuses , I had NOT done *ant clean* 
> > >before  building the src after the changes ..
> > >Here is the patch that I  missed ...
> > >
> > >But can you get the reason behind the 
> > >getMethodInvocationHandler(MethodRequest
> mr,String
> > >objectName)  ..
> > >
> > >Wont a more generic call like :
> > >getMethodInvocationHandler(String puslishedname)
> > >be better .
> > >Comments ?
> > >
> > >Sorry for this glitch,
> > >Vinay
> > >
> > >
> > >
> > >Index: AbstractServer.java
> >
>
>===================================================================
> > >RCS file:
> >
>
>/home/cvspublic/jakarta-commons-sandbox/altrmi/src/java/org/apache/commons/altrmi/server/impl/AbstractServer.java,v
> > >retrieving revision 1.21
> > >diff -r1.21 AbstractServer.java
> > >231a232,244
> > >
> > >>   /**
> > >>     * Method getMethodInvocationHandler
> > >>     *
> > >>     *
> > >>     * @param publishedName
> > >>     *
> > >>     * @return
> > >>     *
> > >>     */
> > >>    public MethodInvocationHandler
> > >>
> > >getMethodInvocationHandler(String publishedName)
> {
> > >
> > >>        return
> > >>
> >
>
>mInovcationHandlerAdapter.getMethodInvocationHandler(publishedName);
> > >
> > >>    }
> > >>
> > >
> > >
> > >
> > >
> > >
> > >
> >
> >__________________________________________________
> > >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>
> > 
> 
> 
> __________________________________________________
> 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>
> 


__________________________________________________
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] PATCH Passing pf remote obj ' ref

Posted by vinaysahil chandran <sa...@yahoo.com>.
Paul,

I worked with a fresh CVS checkout and it 
(pipeda from tests.xml)
 target works well without any hiccups ..
I wasn't able to reproduce it out at my machine .
Morevoer the patch's that I sent second time  doesn't
seems to be commited(Passing_Facade.patch).
Can you verify the way's I have employed there ???
Basically,
 I have tried to pass Remote ref wrapped inside
FacadeREfHolder obj back to the Server.
( I think had written FacadeRefHolder for this 
purpose but missed out on using  it to wrap arguments 
sent  from the client.I have just written the 
function to wrapp the Facade with
FacadeRefHolder at the client side .)

I hope I have conveyed the stuff I did over the
past 2  patchs well across to you...

Regards,
V i n a y

--- Paul Hammant <Pa...@yahoo.com> wrote:
> Vinay,
> 
> I have applied that too, and it is looking good.
> One problem, test 'pipeda' fails now with a NPE at
> this line in correct 
> args :
> 
>     args[i] =
> asih.mRefBeans.get(frh.getReferenceID());
> 
> Can you take a look dude..?
> 
> Regards,
> 
> - Paul
> 
> >Paul,
> >No excuses , I had NOT done *ant clean* 
> >before  building the src after the changes ..
> >Here is the patch that I  missed ...
> >
> >But can you get the reason behind the 
> >getMethodInvocationHandler(MethodRequest mr,String
> >objectName)  ..
> >
> >Wont a more generic call like :
> >getMethodInvocationHandler(String puslishedname)
> >be better .
> >Comments ?
> >
> >Sorry for this glitch,
> >Vinay
> >
> >
> >
> >Index: AbstractServer.java
>
>===================================================================
> >RCS file:
>
>/home/cvspublic/jakarta-commons-sandbox/altrmi/src/java/org/apache/commons/altrmi/server/impl/AbstractServer.java,v
> >retrieving revision 1.21
> >diff -r1.21 AbstractServer.java
> >231a232,244
> >
> >>   /**
> >>     * Method getMethodInvocationHandler
> >>     *
> >>     *
> >>     * @param publishedName
> >>     *
> >>     * @return
> >>     *
> >>     */
> >>    public MethodInvocationHandler
> >>
> >getMethodInvocationHandler(String publishedName) {
> >
> >>        return
> >>
>
>mInovcationHandlerAdapter.getMethodInvocationHandler(publishedName);
> >
> >>    }
> >>
> >
> >
> >
> >
> >
> >
> >__________________________________________________
> >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>
> 


__________________________________________________
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] PATCH Passing pf remote obj ' ref

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

I have applied that too, and it is looking good.
One problem, test 'pipeda' fails now with a NPE at this line in correct 
args :

    args[i] = asih.mRefBeans.get(frh.getReferenceID());

Can you take a look dude..?

Regards,

- Paul

>Paul,
>No excuses , I had NOT done *ant clean* 
>before  building the src after the changes ..
>Here is the patch that I  missed ...
>
>But can you get the reason behind the 
>getMethodInvocationHandler(MethodRequest mr,String
>objectName)  ..
>
>Wont a more generic call like :
>getMethodInvocationHandler(String puslishedname)
>be better .
>Comments ?
>
>Sorry for this glitch,
>Vinay
>
>
>
>Index: AbstractServer.java
>===================================================================
>RCS file:
>/home/cvspublic/jakarta-commons-sandbox/altrmi/src/java/org/apache/commons/altrmi/server/impl/AbstractServer.java,v
>retrieving revision 1.21
>diff -r1.21 AbstractServer.java
>231a232,244
>
>>   /**
>>     * Method getMethodInvocationHandler
>>     *
>>     *
>>     * @param publishedName
>>     *
>>     * @return
>>     *
>>     */
>>    public MethodInvocationHandler
>>
>getMethodInvocationHandler(String publishedName) {
>
>>        return
>>
>mInovcationHandlerAdapter.getMethodInvocationHandler(publishedName);
>
>>    }
>>
>
>
>
>
>
>
>__________________________________________________
>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>


Re: [Altrmi] PATCH Passing pf remote obj ' ref

Posted by vinaysahil chandran <sa...@yahoo.com>.
Paul,
No excuses , I had NOT done *ant clean* 
before  building the src after the changes ..
Here is the patch that I  missed ...

But can you get the reason behind the 
getMethodInvocationHandler(MethodRequest mr,String
objectName)  ..

Wont a more generic call like :
getMethodInvocationHandler(String puslishedname)
be better .
Comments ?

Sorry for this glitch,
Vinay



Index: AbstractServer.java
===================================================================
RCS file:
/home/cvspublic/jakarta-commons-sandbox/altrmi/src/java/org/apache/commons/altrmi/server/impl/AbstractServer.java,v
retrieving revision 1.21
diff -r1.21 AbstractServer.java
231a232,244
>    /**
>      * Method getMethodInvocationHandler
>      *
>      *
>      * @param publishedName
>      *
>      * @return
>      *
>      */
>     public MethodInvocationHandler
getMethodInvocationHandler(String publishedName) {
>         return
mInovcationHandlerAdapter.getMethodInvocationHandler(publishedName);
>     }
> 






__________________________________________________
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>