Announcement Announcement Module
Collapse
No announcement yet.
Stateful HttpInvoker Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Stateful HttpInvoker

    I was wondering if it is possible to use HttpInvoker in a stateful interaction with a client?

    Eg. suppose I have a service like this...
    Code:
    public interface TransactionalService {
        
        public void beginTransaction(); 
    
        public void putSomeData(.....);
        public void putSomeMoreData(.....);
        .
        .
        .
        
        public void finishTransaction(); 
    }
    A client connecting to the above service could expect to have exclusive access to a service instance, which would (presumably) be stored in a HttpSession, so that subsequent method invocations would access the same object.

    Is such an approach feasible with the current HttpInvoker classes?

    And on a second point, is it possible for HttpInvoker to return a reference to another service object, that will be passed by reference rather than by value? This would be similar to how RMI works, but without the pain of setup.


    regards,
    Scott Russell

  • #2
    I was wondering if it is possible to use HttpInvoker in a stateful interaction with a client?
    I've used it - see this post.

    Comment


    • #3
      Originally posted by katentim
      I've used it - see this post.
      Thanks Tim. That's an interesting discussion (including Ben Alex's link about the security issues).

      I'll give your method a try. I guess I had felt that the most intuitive approach would be to have a prototype bean on the server side as the service, and store that instance in a user's session for reuse. But using threadlocal's could also be a useful approach.

      regards,
      Scott

      Comment


      • #4
        Stateful Remoting

        Originally posted by katentim
        The Link does not work anymore

        So, how is it possible to make Remoting stateful?
        Last edited by robyn; May 14th, 2006, 05:08 PM.

        Comment


        • #5
          Does anybody know if this link still exists?

          Thanks

          Comment

          Working...
          X