Hmmmm... let me ask the question that ScottH is, I think, trying to ask: What is the best way to make multiple hessian calls within a single session? Ie, calls to a @SessionScoped object will get the same instance.
Jeff On Fri, May 15, 2009 at 2:06 PM, Scott Ferguson <f...@caucho.com> wrote: > > On May 15, 2009, at 1:21 PM, Scott Hernandez wrote: > >> I have setup a hessian service (servlet) and when returning objects >> (stateless ejb for example) I see that a SingletonHandle instance if >> returned over the protocol. The client proxy then unpacks the object >> and tries to call the local (client) Injector to get the instance, >> instead of making the remote call to retrieve the instance from the >> server. How can I have the Hessian protocol return a ref to my actual >> bean, or a remote reference it won't try to resolve (create) at the >> client? > > The issue is on the EJB end, not technically Hessian. You might be > able to create a writeReplace() method (part of the > java.io.Serializable pattern), to save a stub that will then > deserialize into a Hessian client proxy. > > -- Scott > >> >> >> Here is the type of code I'm using on the client: >> >> HessianProxyFactory fact = new HessianProxyFactory(); >> fact.setOverloadEnabled(true); >> fact.setUser("god"); >> fact.setPassword("loves us all"); >> MyService myService = (MyService)fact.create(MyService.class, >> "http://localhost:8080/mywebapp/api/myservice"); >> >> myService.doServerThing(); // does server thing >> OtherBean ob = myServer.getOtherBean(); >> //UnsatisfiedDependencyException ; this should be called on the server >> ob.changeServerState(); >> OtherAppScopeBean oasb = myServer.getOtherAppScopeBean(); >> String[] sArr = oasb.doSomething(); >> >> >> Thanks in advance, >> Scott >> >> >> _______________________________________________ >> resin-interest mailing list >> resin-interest@caucho.com >> http://maillist.caucho.com/mailman/listinfo/resin-interest > > > > _______________________________________________ > resin-interest mailing list > resin-interest@caucho.com > http://maillist.caucho.com/mailman/listinfo/resin-interest > _______________________________________________ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest