I have a cache of objects (not the HTTP session attributes) and I want to be able to get an object from this cache when a Hessian request comes in and have Hessian execute the call on this object instead of the servlet.
I can control the class that the request is executed on by setting the service-class and api-class init parameters on the HessianServlet. However, it is performing the instantiation of objects itself and it does not look like I can control this.
I've tried to override the execute() method of HessianServlet and calling setService() or setObject() but it does not use the object I've passed in. Instead it seems to instantiate its own.
A simple hack is create a service class that has the same interface on your object, which delegates to an instance of your object it fetches to the pool, expose this service through Hessian.