struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Stapp" <mst...@silverstream.com>
Subject ServiceManager bug?
Date Wed, 05 Sep 2001 15:48:27 GMT
I think I've run across a ServiceManager bug, but want to make sure that
it's not operator error before I submit a bug report.  The code in
question is in ServiceManager.performCall() and
ServiceManager.performBooleanCall().

I've set up a test application to use ServicesServlet instead of
ActionServlet, and the behavior I'm seeing is that my service's methods
aren't being called by ServiceManager.

The bug is that ServiceManager is using the wrong parameter list in its
calls to service.getClass().getMethod().  It's looking for a single Object
parameter, but ServicesServlet is asking ServiceManager to call the method
with a parameter set that matches the servlet method's parameters.
(Example: ServicesServlet.processPreprocess() passes "new Object [] {
request, response }" to ServiceManager.performBooleanCall().)

The result is that ServiceManager will find a service method only if it
has a single Object parameter, but then the call to method.invoke() fails
with a java.lang.IllegalArgumentException because the actual parameters
don't match that single-Object signature.  If I change my service method
so that it has the correct formal parameters, then ServiceManager will not
find the method (it's only looking for methods with a single Object
parameter).

I have a patch to ServiceManager that makes this work, but the patch has
its own issues.  I think it could use some discussion to get the right
solution.

Does this sound legitimate?

Thanks.
--Mike

Mime
View raw message