开发者

How to (simply) create new service objects in java jax-ws webservices?

Is it possible in jax-ws to have a webmethod that creates a new object (of a service class) and returns a reference to it to the client caller (for the client, it's a remote reference) so that the client and this new service object maintain a session? (Therefore each client is served by a different instance). Schematically:

client                                   server                    o:Session
--------                                 --------                  ----------
    s = server.access() ------------------>         
                                            o = new Session()
                                            return o
                                         <---


    o.doSomething() ---------------------------------------------->
                                                                     make it  
                                                                   <---

    o.doMore()  --------------------------------------------------> 
                                                                    make it  
                                  开发者_如何学Python                                 <---


Did you check Stateful Web Service with JAX-WS RI? The programming model has been reported to be dead simple. Have a look at it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜