methods with same name

View: New views
12 Messages — Rating Filter:   Alert me  

methods with same name

by Nicolás Pace :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

We are all supposing that methods there are not repetead method names,
aren't we?
i don't find the way to refernce one method between 2 with the same
name (different attributes/return type).
Regards,

--
Ing. Nicolás Pace
http://www.linkedin.com/in/nickar/
http://www.jornadasdelsur.org.ar/

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: methods with same name

by Lance Java :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I note that this issue is resolved in v3.0
http://bugs.directwebremoting.org/bugs/browse/DWR-274

I've never tried it though.

2009/6/9 Nicolás Pace <nicopace@...>
We are all supposing that methods there are not repetead method names,
aren't we?
i don't find the way to refernce one method between 2 with the same
name (different attributes/return type).
Regards,

--
Ing. Nicolás Pace
http://www.linkedin.com/in/nickar/
http://www.jornadasdelsur.org.ar/

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...



Re: methods with same name

by Nicolás Pace :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tue, Jun 9, 2009 at 6:07 PM, Lance Java<lance.java@...> wrote:
> I note that this issue is resolved in v3.0
> http://bugs.directwebremoting.org/bugs/browse/DWR-274
>
> I've never tried it though.

How do you do this? Which classes are involved?

Regards

>
> 2009/6/9 Nicolás Pace <nicopace@...>
>>
>> We are all supposing that methods there are not repetead method names,
>> aren't we?
>> i don't find the way to refernce one method between 2 with the same
>> name (different attributes/return type).
>> Regards,
>>
>> --
>> Ing. Nicolás Pace
>> http://www.linkedin.com/in/nickar/
>> http://www.jornadasdelsur.org.ar/
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@...
>> For additional commands, e-mail: users-help@...
>>
>
>



--
Ing. Nicolás Pace
http://www.linkedin.com/in/nickar/
http://www.jornadasdelsur.org.ar/

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: methods with same name

by davidmarginian :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

There is no how, it should just work.  I thought we had a few tests in
testdwr that cover this but I don't see them.  If they don't exist I
will create a JIRA for us to add them.  If you continue to have problems
I suggest sending us the class that you are trying to remote.

Nicolás Pace wrote:

> On Tue, Jun 9, 2009 at 6:07 PM, Lance Java<lance.java@...> wrote:
>  
>> I note that this issue is resolved in v3.0
>> http://bugs.directwebremoting.org/bugs/browse/DWR-274
>>
>> I've never tried it though.
>>    
>
> How do you do this? Which classes are involved?
>
> Regards
>
>  
>> 2009/6/9 Nicolás Pace <nicopace@...>
>>    
>>> We are all supposing that methods there are not repetead method names,
>>> aren't we?
>>> i don't find the way to refernce one method between 2 with the same
>>> name (different attributes/return type).
>>> Regards,
>>>
>>> --
>>> Ing. Nicolás Pace
>>> http://www.linkedin.com/in/nickar/
>>> http://www.jornadasdelsur.org.ar/
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@...
>>> For additional commands, e-mail: users-help@...
>>>
>>>      
>>    
>
>
>
>  


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: methods with same name

by Nicolás Pace :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tue, Jun 9, 2009 at 8:16 PM, David Marginian<david@...> wrote:
> There is no how, it should just work.  I thought we had a few tests in
> testdwr that cover this but I don't see them.  If they don't exist I will
> create a JIRA for us to add them.  If you continue to have problems I
> suggest sending us the class that you are trying to remote.

I'm not trying to remote anything :D
I'm working in integrating dwr, acegi and method invocation authorization.
We have done a service that asks acegi if a principal is authorized to
call a method, and we had problems because we where taking into
account just the methodName and not the arguments.
Is there anything to differeciate two calls to different methods with
the same name apart from the arguments?

Regards,


> Nicolás Pace wrote:
>>
>> On Tue, Jun 9, 2009 at 6:07 PM, Lance Java<lance.java@...>
>> wrote:
>>
>>>
>>> I note that this issue is resolved in v3.0
>>> http://bugs.directwebremoting.org/bugs/browse/DWR-274
>>>
>>> I've never tried it though.
>>>
>>
>> How do you do this? Which classes are involved?
>>
>> Regards
>>
>>
>>>
>>> 2009/6/9 Nicolás Pace <nicopace@...>
>>>
>>>>
>>>> We are all supposing that methods there are not repetead method names,
>>>> aren't we?
>>>> i don't find the way to refernce one method between 2 with the same
>>>> name (different attributes/return type).
>>>> Regards,
>>>>
>>>> --
>>>> Ing. Nicolás Pace
>>>> http://www.linkedin.com/in/nickar/
>>>> http://www.jornadasdelsur.org.ar/
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@...
>>>> For additional commands, e-mail: users-help@...
>>>>
>>>>
>>>
>>>
>>
>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
>
>



--
Ing. Nicolás Pace
http://www.linkedin.com/in/nickar/
http://www.jornadasdelsur.org.ar/

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: methods with same name

by davidmarginian :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

That question doesn't even make sense.  The parameter list is what makes
a method unique.

Nicolás Pace wrote:

> On Tue, Jun 9, 2009 at 8:16 PM, David Marginian<david@...> wrote:
>  
>> There is no how, it should just work.  I thought we had a few tests in
>> testdwr that cover this but I don't see them.  If they don't exist I will
>> create a JIRA for us to add them.  If you continue to have problems I
>> suggest sending us the class that you are trying to remote.
>>    
>
> I'm not trying to remote anything :D
> I'm working in integrating dwr, acegi and method invocation authorization.
> We have done a service that asks acegi if a principal is authorized to
> call a method, and we had problems because we where taking into
> account just the methodName and not the arguments.
> Is there anything to differeciate two calls to different methods with
> the same name apart from the arguments?
>
> Regards,
>
>
>  
>> Nicolás Pace wrote:
>>    
>>> On Tue, Jun 9, 2009 at 6:07 PM, Lance Java<lance.java@...>
>>> wrote:
>>>
>>>      
>>>> I note that this issue is resolved in v3.0
>>>> http://bugs.directwebremoting.org/bugs/browse/DWR-274
>>>>
>>>> I've never tried it though.
>>>>
>>>>        
>>> How do you do this? Which classes are involved?
>>>
>>> Regards
>>>
>>>
>>>      
>>>> 2009/6/9 Nicolás Pace <nicopace@...>
>>>>
>>>>        
>>>>> We are all supposing that methods there are not repetead method names,
>>>>> aren't we?
>>>>> i don't find the way to refernce one method between 2 with the same
>>>>> name (different attributes/return type).
>>>>> Regards,
>>>>>
>>>>> --
>>>>> Ing. Nicolás Pace
>>>>> http://www.linkedin.com/in/nickar/
>>>>> http://www.jornadasdelsur.org.ar/
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe@...
>>>>> For additional commands, e-mail: users-help@...
>>>>>
>>>>>
>>>>>          
>>>>        
>>>
>>>
>>>      
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@...
>> For additional commands, e-mail: users-help@...
>>
>>
>>    
>
>
>
>  


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: methods with same name

by Nicolás Pace :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tue, Jun 9, 2009 at 10:11 PM, David Marginian<david@...> wrote:
> That question doesn't even make sense.  The parameter list is what makes a
> method unique.

I'm aware that the signature is composed of return type, method name,
argument types (in order).
We just made a simplification because javascript doen't allow us to
distiguish between to methods just by reflection.We don't know until
we call, unless we define which method we will call with all the
signature definition, not just the name.

The idea is:
i know that in some screen i will need to call method1(arg1, arg2) &
method2(arg1),
So before y create that interface, i query securityService if my
credentials will allow me to call this methods (this applies only for
beforeinvocation).

But the problem arrise when you have 2 methods with the same name,
because we where querying just with the method name.

We have 2 ways, to ask for the whole signature or to ask not to use
the same method name for 2 methods in the same class.

The rest of the discussion and an implementation can be found here:
http://forum.springsource.org/showthread.php?t=72916

Regards,


What do you think?

>
> Nicolás Pace wrote:
>>
>> On Tue, Jun 9, 2009 at 8:16 PM, David Marginian<david@...>
>> wrote:
>>
>>>
>>> There is no how, it should just work.  I thought we had a few tests in
>>> testdwr that cover this but I don't see them.  If they don't exist I will
>>> create a JIRA for us to add them.  If you continue to have problems I
>>> suggest sending us the class that you are trying to remote.
>>>
>>
>> I'm not trying to remote anything :D
>> I'm working in integrating dwr, acegi and method invocation authorization.
>> We have done a service that asks acegi if a principal is authorized to
>> call a method, and we had problems because we where taking into
>> account just the methodName and not the arguments.
>> Is there anything to differeciate two calls to different methods with
>> the same name apart from the arguments?
>>
>> Regards,
>>
>>
>>
>>>
>>> Nicolás Pace wrote:
>>>
>>>>
>>>> On Tue, Jun 9, 2009 at 6:07 PM, Lance Java<lance.java@...>
>>>> wrote:
>>>>
>>>>
>>>>>
>>>>> I note that this issue is resolved in v3.0
>>>>> http://bugs.directwebremoting.org/bugs/browse/DWR-274
>>>>>
>>>>> I've never tried it though.
>>>>>
>>>>>
>>>>
>>>> How do you do this? Which classes are involved?
>>>>
>>>> Regards
>>>>
>>>>
>>>>
>>>>>
>>>>> 2009/6/9 Nicolás Pace <nicopace@...>
>>>>>
>>>>>
>>>>>>
>>>>>> We are all supposing that methods there are not repetead method names,
>>>>>> aren't we?
>>>>>> i don't find the way to refernce one method between 2 with the same
>>>>>> name (different attributes/return type).
>>>>>> Regards,
>>>>>>
>>>>>> --
>>>>>> Ing. Nicolás Pace
>>>>>> http://www.linkedin.com/in/nickar/
>>>>>> http://www.jornadasdelsur.org.ar/
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: users-unsubscribe@...
>>>>>> For additional commands, e-mail: users-help@...
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@...
>>> For additional commands, e-mail: users-help@...
>>>
>>>
>>>
>>
>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
>
>



--
Ing. Nicolás Pace
http://www.linkedin.com/in/nickar/
http://www.jornadasdelsur.org.ar/

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: methods with same name

by XMaNIaC :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

In short, you need the parameters (not the return type).

Regards

2009/6/10 Nicolás Pace <nicopace@...>
On Tue, Jun 9, 2009 at 10:11 PM, David Marginian<david@...> wrote:
> That question doesn't even make sense.  The parameter list is what makes a
> method unique.

I'm aware that the signature is composed of return type, method name,
argument types (in order).
We just made a simplification because javascript doen't allow us to
distiguish between to methods just by reflection.We don't know until
we call, unless we define which method we will call with all the
signature definition, not just the name.

The idea is:
i know that in some screen i will need to call method1(arg1, arg2) &
method2(arg1),
So before y create that interface, i query securityService if my
credentials will allow me to call this methods (this applies only for
beforeinvocation).

But the problem arrise when you have 2 methods with the same name,
because we where querying just with the method name.

We have 2 ways, to ask for the whole signature or to ask not to use
the same method name for 2 methods in the same class.

The rest of the discussion and an implementation can be found here:
http://forum.springsource.org/showthread.php?t=72916

Regards,


What do you think?

>
> Nicolás Pace wrote:
>>
>> On Tue, Jun 9, 2009 at 8:16 PM, David Marginian<david@...>
>> wrote:
>>
>>>
>>> There is no how, it should just work.  I thought we had a few tests in
>>> testdwr that cover this but I don't see them.  If they don't exist I will
>>> create a JIRA for us to add them.  If you continue to have problems I
>>> suggest sending us the class that you are trying to remote.
>>>
>>
>> I'm not trying to remote anything :D
>> I'm working in integrating dwr, acegi and method invocation authorization.
>> We have done a service that asks acegi if a principal is authorized to
>> call a method, and we had problems because we where taking into
>> account just the methodName and not the arguments.
>> Is there anything to differeciate two calls to different methods with
>> the same name apart from the arguments?
>>
>> Regards,
>>
>>
>>
>>>
>>> Nicolás Pace wrote:
>>>
>>>>
>>>> On Tue, Jun 9, 2009 at 6:07 PM, Lance Java<lance.java@...>
>>>> wrote:
>>>>
>>>>
>>>>>
>>>>> I note that this issue is resolved in v3.0
>>>>> http://bugs.directwebremoting.org/bugs/browse/DWR-274
>>>>>
>>>>> I've never tried it though.
>>>>>
>>>>>
>>>>
>>>> How do you do this? Which classes are involved?
>>>>
>>>> Regards
>>>>
>>>>
>>>>
>>>>>
>>>>> 2009/6/9 Nicolás Pace <nicopace@...>
>>>>>
>>>>>
>>>>>>
>>>>>> We are all supposing that methods there are not repetead method names,
>>>>>> aren't we?
>>>>>> i don't find the way to refernce one method between 2 with the same
>>>>>> name (different attributes/return type).
>>>>>> Regards,
>>>>>>
>>>>>> --
>>>>>> Ing. Nicolás Pace
>>>>>> http://www.linkedin.com/in/nickar/
>>>>>> http://www.jornadasdelsur.org.ar/
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: users-unsubscribe@...
>>>>>> For additional commands, e-mail: users-help@...
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@...
>>> For additional commands, e-mail: users-help@...
>>>
>>>
>>>
>>
>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
>
>



--
Ing. Nicolás Pace
http://www.linkedin.com/in/nickar/
http://www.jornadasdelsur.org.ar/

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...



Re: methods with same name

by Peter Schmidt-6 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Nicolás Pace schrieb:

> The idea is:
> i know that in some screen i will need to call method1(arg1, arg2) &
> method2(arg1),
> So before y create that interface, i query securityService if my
> credentials will allow me to call this methods (this applies only for
> beforeinvocation).
>
> But the problem arrise when you have 2 methods with the same name,
> because we where querying just with the method name.
>
> We have 2 ways, to ask for the whole signature or to ask not to use
> the same method name for 2 methods in the same class
You should allow the method name string in isCallable to be both, a
simple name or a signature like "methodname( string, int )".
If it's a simple name and there are more methods with this name throw an
exception.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: methods with same name

by davidmarginian :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

If you want to see how DWR handles finding the method to call (of course
the parameter list is a crucial part of finding the correct method) take
a look at Call.java, I believe there is a method called findMethod or
something like that (don't have the source in front of me right now).

Jose Noheda wrote:

> In short, you need the parameters (not the return type).
>
> Regards
>
> 2009/6/10 Nicolás Pace <nicopace@... <mailto:nicopace@...>>
>
>     On Tue, Jun 9, 2009 at 10:11 PM, David
>     Marginian<david@... <mailto:david@...>> wrote:
>     > That question doesn't even make sense.  The parameter list is
>     what makes a
>     > method unique.
>
>     I'm aware that the signature is composed of return type, method name,
>     argument types (in order).
>     We just made a simplification because javascript doen't allow us to
>     distiguish between to methods just by reflection.We don't know until
>     we call, unless we define which method we will call with all the
>     signature definition, not just the name.
>
>     The idea is:
>     i know that in some screen i will need to call method1(arg1, arg2) &
>     method2(arg1),
>     So before y create that interface, i query securityService if my
>     credentials will allow me to call this methods (this applies only for
>     beforeinvocation).
>
>     But the problem arrise when you have 2 methods with the same name,
>     because we where querying just with the method name.
>
>     We have 2 ways, to ask for the whole signature or to ask not to use
>     the same method name for 2 methods in the same class.
>
>     The rest of the discussion and an implementation can be found here:
>     http://forum.springsource.org/showthread.php?t=72916
>
>     Regards,
>
>
>     What do you think?
>
>     >
>     > Nicolás Pace wrote:
>     >>
>     >> On Tue, Jun 9, 2009 at 8:16 PM, David
>     Marginian<david@... <mailto:david@...>>
>     >> wrote:
>     >>
>     >>>
>     >>> There is no how, it should just work.  I thought we had a few
>     tests in
>     >>> testdwr that cover this but I don't see them.  If they don't
>     exist I will
>     >>> create a JIRA for us to add them.  If you continue to have
>     problems I
>     >>> suggest sending us the class that you are trying to remote.
>     >>>
>     >>
>     >> I'm not trying to remote anything :D
>     >> I'm working in integrating dwr, acegi and method invocation
>     authorization.
>     >> We have done a service that asks acegi if a principal is
>     authorized to
>     >> call a method, and we had problems because we where taking into
>     >> account just the methodName and not the arguments.
>     >> Is there anything to differeciate two calls to different
>     methods with
>     >> the same name apart from the arguments?
>     >>
>     >> Regards,
>     >>
>     >>
>     >>
>     >>>
>     >>> Nicolás Pace wrote:
>     >>>
>     >>>>
>     >>>> On Tue, Jun 9, 2009 at 6:07 PM, Lance
>     Java<lance.java@... <mailto:lance.java@...>>
>     >>>> wrote:
>     >>>>
>     >>>>
>     >>>>>
>     >>>>> I note that this issue is resolved in v3.0
>     >>>>> http://bugs.directwebremoting.org/bugs/browse/DWR-274
>     >>>>>
>     >>>>> I've never tried it though.
>     >>>>>
>     >>>>>
>     >>>>
>     >>>> How do you do this? Which classes are involved?
>     >>>>
>     >>>> Regards
>     >>>>
>     >>>>
>     >>>>
>     >>>>>
>     >>>>> 2009/6/9 Nicolás Pace <nicopace@...
>     <mailto:nicopace@...>>
>     >>>>>
>     >>>>>
>     >>>>>>
>     >>>>>> We are all supposing that methods there are not repetead
>     method names,
>     >>>>>> aren't we?
>     >>>>>> i don't find the way to refernce one method between 2 with
>     the same
>     >>>>>> name (different attributes/return type).
>     >>>>>> Regards,
>     >>>>>>
>     >>>>>> --
>     >>>>>> Ing. Nicolás Pace
>     >>>>>> http://www.linkedin.com/in/nickar/
>     >>>>>> http://www.jornadasdelsur.org.ar/
>     >>>>>>
>     >>>>>>
>     ---------------------------------------------------------------------
>     >>>>>> To unsubscribe, e-mail: users-unsubscribe@...
>     <mailto:users-unsubscribe@...>
>     >>>>>> For additional commands, e-mail:
>     users-help@... <mailto:users-help@...>
>     >>>>>>
>     >>>>>>
>     >>>>>>
>     >>>>>
>     >>>>>
>     >>>>
>     >>>>
>     >>>>
>     >>>
>     >>>
>     ---------------------------------------------------------------------
>     >>> To unsubscribe, e-mail: users-unsubscribe@...
>     <mailto:users-unsubscribe@...>
>     >>> For additional commands, e-mail: users-help@...
>     <mailto:users-help@...>
>     >>>
>     >>>
>     >>>
>     >>
>     >>
>     >>
>     >>
>     >
>     >
>     >
>     ---------------------------------------------------------------------
>     > To unsubscribe, e-mail: users-unsubscribe@...
>     <mailto:users-unsubscribe@...>
>     > For additional commands, e-mail: users-help@...
>     <mailto:users-help@...>
>     >
>     >
>
>
>
>     --
>     Ing. Nicolás Pace
>     http://www.linkedin.com/in/nickar/
>     http://www.jornadasdelsur.org.ar/
>
>     ---------------------------------------------------------------------
>     To unsubscribe, e-mail: users-unsubscribe@...
>     <mailto:users-unsubscribe@...>
>     For additional commands, e-mail: users-help@...
>     <mailto:users-help@...>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: methods with same name

by Nicolás Pace :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Wed, Jun 10, 2009 at 10:21 AM, David Marginian<david@...> wrote:
> If you want to see how DWR handles finding the method to call (of course the
> parameter list is a crucial part of finding the correct method) take a look
> at Call.java, I believe there is a method called findMethod or something
> like that (don't have the source in front of me right now).

That was exactly what i was looking for!!!
Thanks,


> Jose Noheda wrote:
>>
>> In short, you need the parameters (not the return type).
>>
>> Regards
>>
>> 2009/6/10 Nicolás Pace <nicopace@... <mailto:nicopace@...>>
>>
>>    On Tue, Jun 9, 2009 at 10:11 PM, David
>>    Marginian<david@... <mailto:david@...>> wrote:
>>    > That question doesn't even make sense.  The parameter list is
>>    what makes a
>>    > method unique.
>>
>>    I'm aware that the signature is composed of return type, method name,
>>    argument types (in order).
>>    We just made a simplification because javascript doen't allow us to
>>    distiguish between to methods just by reflection.We don't know until
>>    we call, unless we define which method we will call with all the
>>    signature definition, not just the name.
>>
>>    The idea is:
>>    i know that in some screen i will need to call method1(arg1, arg2) &
>>    method2(arg1),
>>    So before y create that interface, i query securityService if my
>>    credentials will allow me to call this methods (this applies only for
>>    beforeinvocation).
>>
>>    But the problem arrise when you have 2 methods with the same name,
>>    because we where querying just with the method name.
>>
>>    We have 2 ways, to ask for the whole signature or to ask not to use
>>    the same method name for 2 methods in the same class.
>>
>>    The rest of the discussion and an implementation can be found here:
>>    http://forum.springsource.org/showthread.php?t=72916
>>
>>    Regards,
>>
>>
>>    What do you think?
>>
>>    >
>>    > Nicolás Pace wrote:
>>    >>
>>    >> On Tue, Jun 9, 2009 at 8:16 PM, David
>>    Marginian<david@... <mailto:david@...>>
>>    >> wrote:
>>    >>
>>    >>>
>>    >>> There is no how, it should just work.  I thought we had a few
>>    tests in
>>    >>> testdwr that cover this but I don't see them.  If they don't
>>    exist I will
>>    >>> create a JIRA for us to add them.  If you continue to have
>>    problems I
>>    >>> suggest sending us the class that you are trying to remote.
>>    >>>
>>    >>
>>    >> I'm not trying to remote anything :D
>>    >> I'm working in integrating dwr, acegi and method invocation
>>    authorization.
>>    >> We have done a service that asks acegi if a principal is
>>    authorized to
>>    >> call a method, and we had problems because we where taking into
>>    >> account just the methodName and not the arguments.
>>    >> Is there anything to differeciate two calls to different
>>    methods with
>>    >> the same name apart from the arguments?
>>    >>
>>    >> Regards,
>>    >>
>>    >>
>>    >>
>>    >>>
>>    >>> Nicolás Pace wrote:
>>    >>>
>>    >>>>
>>    >>>> On Tue, Jun 9, 2009 at 6:07 PM, Lance
>>    Java<lance.java@... <mailto:lance.java@...>>
>>    >>>> wrote:
>>    >>>>
>>    >>>>
>>    >>>>>
>>    >>>>> I note that this issue is resolved in v3.0
>>    >>>>> http://bugs.directwebremoting.org/bugs/browse/DWR-274
>>    >>>>>
>>    >>>>> I've never tried it though.
>>    >>>>>
>>    >>>>>
>>    >>>>
>>    >>>> How do you do this? Which classes are involved?
>>    >>>>
>>    >>>> Regards
>>    >>>>
>>    >>>>
>>    >>>>
>>    >>>>>
>>    >>>>> 2009/6/9 Nicolás Pace <nicopace@...
>>    <mailto:nicopace@...>>
>>    >>>>>
>>    >>>>>
>>    >>>>>>
>>    >>>>>> We are all supposing that methods there are not repetead
>>    method names,
>>    >>>>>> aren't we?
>>    >>>>>> i don't find the way to refernce one method between 2 with
>>    the same
>>    >>>>>> name (different attributes/return type).
>>    >>>>>> Regards,
>>    >>>>>>
>>    >>>>>> --
>>    >>>>>> Ing. Nicolás Pace
>>    >>>>>> http://www.linkedin.com/in/nickar/
>>    >>>>>> http://www.jornadasdelsur.org.ar/
>>    >>>>>>
>>    >>>>>>
>>    ---------------------------------------------------------------------
>>    >>>>>> To unsubscribe, e-mail: users-unsubscribe@...
>>    <mailto:users-unsubscribe@...>
>>    >>>>>> For additional commands, e-mail:
>>    users-help@... <mailto:users-help@...>
>>    >>>>>>
>>    >>>>>>
>>    >>>>>>
>>    >>>>>
>>    >>>>>
>>    >>>>
>>    >>>>
>>    >>>>
>>    >>>
>>    >>>
>>    ---------------------------------------------------------------------
>>    >>> To unsubscribe, e-mail: users-unsubscribe@...
>>    <mailto:users-unsubscribe@...>
>>    >>> For additional commands, e-mail: users-help@...
>>    <mailto:users-help@...>
>>    >>>
>>    >>>
>>    >>>
>>    >>
>>    >>
>>    >>
>>    >>
>>    >
>>    >
>>    >
>>    ---------------------------------------------------------------------
>>    > To unsubscribe, e-mail: users-unsubscribe@...
>>    <mailto:users-unsubscribe@...>
>>    > For additional commands, e-mail: users-help@...
>>    <mailto:users-help@...>
>>    >
>>    >
>>
>>
>>
>>    --
>>    Ing. Nicolás Pace
>>    http://www.linkedin.com/in/nickar/
>>    http://www.jornadasdelsur.org.ar/
>>
>>    ---------------------------------------------------------------------
>>    To unsubscribe, e-mail: users-unsubscribe@...
>>    <mailto:users-unsubscribe@...>
>>    For additional commands, e-mail: users-help@...
>>    <mailto:users-help@...>
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
>
>



--
Ing. Nicolás Pace
http://www.linkedin.com/in/nickar/
http://www.jornadasdelsur.org.ar/

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: methods with same name

by Nicolás Pace :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

2009/6/10 Nicolás Pace <nicopace@...>:
> On Wed, Jun 10, 2009 at 10:21 AM, David Marginian<david@...> wrote:
>> If you want to see how DWR handles finding the method to call (of course the
>> parameter list is a crucial part of finding the correct method) take a look
>> at Call.java, I believe there is a method called findMethod or something
>> like that (don't have the source in front of me right now).
>
> That was exactly what i was looking for!!!
> Thanks,
>

I think that the logic behind parsing dwr javascript posts is behind
Batch.java, inside parseParameters and getAllParameters().

Regards,

>
>> Jose Noheda wrote:
>>>
>>> In short, you need the parameters (not the return type).
>>>
>>> Regards
>>>
>>> 2009/6/10 Nicolás Pace <nicopace@... <mailto:nicopace@...>>
>>>
>>>    On Tue, Jun 9, 2009 at 10:11 PM, David
>>>    Marginian<david@... <mailto:david@...>> wrote:
>>>    > That question doesn't even make sense.  The parameter list is
>>>    what makes a
>>>    > method unique.
>>>
>>>    I'm aware that the signature is composed of return type, method name,
>>>    argument types (in order).
>>>    We just made a simplification because javascript doen't allow us to
>>>    distiguish between to methods just by reflection.We don't know until
>>>    we call, unless we define which method we will call with all the
>>>    signature definition, not just the name.
>>>
>>>    The idea is:
>>>    i know that in some screen i will need to call method1(arg1, arg2) &
>>>    method2(arg1),
>>>    So before y create that interface, i query securityService if my
>>>    credentials will allow me to call this methods (this applies only for
>>>    beforeinvocation).
>>>
>>>    But the problem arrise when you have 2 methods with the same name,
>>>    because we where querying just with the method name.
>>>
>>>    We have 2 ways, to ask for the whole signature or to ask not to use
>>>    the same method name for 2 methods in the same class.
>>>
>>>    The rest of the discussion and an implementation can be found here:
>>>    http://forum.springsource.org/showthread.php?t=72916
>>>
>>>    Regards,
>>>
>>>
>>>    What do you think?
>>>
>>>    >
>>>    > Nicolás Pace wrote:
>>>    >>
>>>    >> On Tue, Jun 9, 2009 at 8:16 PM, David
>>>    Marginian<david@... <mailto:david@...>>
>>>    >> wrote:
>>>    >>
>>>    >>>
>>>    >>> There is no how, it should just work.  I thought we had a few
>>>    tests in
>>>    >>> testdwr that cover this but I don't see them.  If they don't
>>>    exist I will
>>>    >>> create a JIRA for us to add them.  If you continue to have
>>>    problems I
>>>    >>> suggest sending us the class that you are trying to remote.
>>>    >>>
>>>    >>
>>>    >> I'm not trying to remote anything :D
>>>    >> I'm working in integrating dwr, acegi and method invocation
>>>    authorization.
>>>    >> We have done a service that asks acegi if a principal is
>>>    authorized to
>>>    >> call a method, and we had problems because we where taking into
>>>    >> account just the methodName and not the arguments.
>>>    >> Is there anything to differeciate two calls to different
>>>    methods with
>>>    >> the same name apart from the arguments?
>>>    >>
>>>    >> Regards,
>>>    >>
>>>    >>
>>>    >>
>>>    >>>
>>>    >>> Nicolás Pace wrote:
>>>    >>>
>>>    >>>>
>>>    >>>> On Tue, Jun 9, 2009 at 6:07 PM, Lance
>>>    Java<lance.java@... <mailto:lance.java@...>>
>>>    >>>> wrote:
>>>    >>>>
>>>    >>>>
>>>    >>>>>
>>>    >>>>> I note that this issue is resolved in v3.0
>>>    >>>>> http://bugs.directwebremoting.org/bugs/browse/DWR-274
>>>    >>>>>
>>>    >>>>> I've never tried it though.
>>>    >>>>>
>>>    >>>>>
>>>    >>>>
>>>    >>>> How do you do this? Which classes are involved?
>>>    >>>>
>>>    >>>> Regards
>>>    >>>>
>>>    >>>>
>>>    >>>>
>>>    >>>>>
>>>    >>>>> 2009/6/9 Nicolás Pace <nicopace@...
>>>    <mailto:nicopace@...>>
>>>    >>>>>
>>>    >>>>>
>>>    >>>>>>
>>>    >>>>>> We are all supposing that methods there are not repetead
>>>    method names,
>>>    >>>>>> aren't we?
>>>    >>>>>> i don't find the way to refernce one method between 2 with
>>>    the same
>>>    >>>>>> name (different attributes/return type).
>>>    >>>>>> Regards,
>>>    >>>>>>
>>>    >>>>>> --
>>>    >>>>>> Ing. Nicolás Pace
>>>    >>>>>> http://www.linkedin.com/in/nickar/
>>>    >>>>>> http://www.jornadasdelsur.org.ar/
>>>    >>>>>>
>>>    >>>>>>
>>>    ---------------------------------------------------------------------
>>>    >>>>>> To unsubscribe, e-mail: users-unsubscribe@...
>>>    <mailto:users-unsubscribe@...>
>>>    >>>>>> For additional commands, e-mail:
>>>    users-help@... <mailto:users-help@...>
>>>    >>>>>>
>>>    >>>>>>
>>>    >>>>>>
>>>    >>>>>
>>>    >>>>>
>>>    >>>>
>>>    >>>>
>>>    >>>>
>>>    >>>
>>>    >>>
>>>    ---------------------------------------------------------------------
>>>    >>> To unsubscribe, e-mail: users-unsubscribe@...
>>>    <mailto:users-unsubscribe@...>
>>>    >>> For additional commands, e-mail: users-help@...
>>>    <mailto:users-help@...>
>>>    >>>
>>>    >>>
>>>    >>>
>>>    >>
>>>    >>
>>>    >>
>>>    >>
>>>    >
>>>    >
>>>    >
>>>    ---------------------------------------------------------------------
>>>    > To unsubscribe, e-mail: users-unsubscribe@...
>>>    <mailto:users-unsubscribe@...>
>>>    > For additional commands, e-mail: users-help@...
>>>    <mailto:users-help@...>
>>>    >
>>>    >
>>>
>>>
>>>
>>>    --
>>>    Ing. Nicolás Pace
>>>    http://www.linkedin.com/in/nickar/
>>>    http://www.jornadasdelsur.org.ar/
>>>
>>>    ---------------------------------------------------------------------
>>>    To unsubscribe, e-mail: users-unsubscribe@...
>>>    <mailto:users-unsubscribe@...>
>>>    For additional commands, e-mail: users-help@...
>>>    <mailto:users-help@...>
>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@...
>> For additional commands, e-mail: users-help@...
>>
>>
>
>
>
> --
> Ing. Nicolás Pace
> http://www.linkedin.com/in/nickar/
> http://www.jornadasdelsur.org.ar/
>



--
Ing. Nicolás Pace
http://www.linkedin.com/in/nickar/
http://www.jornadasdelsur.org.ar/

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...