Re: Re: [ANN] XINS 1.3 supports XML-RPC
Ernst de Haan <[email protected]>
| Newsgroups | gmane.text.xml.rpc.specification |
|---|---|
| Message-ID | <[email protected]> |
Paul,
> No, that doesn't work, the session object I want to attach is something
> my program has created! Changing the config will not pass an object as
> parameter!
I'm really trying to understand, but I don't think I do. If you want
to pass an object from a client to a service, there's no built-in
mechanism for that in XINS. XINS is mainly an RPC technology. It does
not support activation, remote garbage collection and other more
complex things. You can send IDs around, but not programming code.
If you are talking about session management, we are doing session
management with XINS. We have built an SSO service (Single Sign-On)
and you could implement SSO-clients with it, just as easily. I don't
believe in stateless services, either.
So assuming you want to build something that persists state, use the
built-in support for the singleton pattern. Define a 'shared instance'
in your impl.xml file. See:
http://xins.sourceforge.net/docs/ar01s19.html
For example:
<instance name="_sharedObject" getter="getSharedObject"
class="SharedObject" />
The SharedObject should be in the same package as your
<Function>Impl.java files and it should extend the class Manageable:
http://xins.sourceforge.net/javadoc/1.3.0/org/xins/common/manageable/Manageable.html
Your shared object will get both the bootstrap properties (from
web.xml) and the runtime properties (from the runtime config file), so
both can be used for configuration/initialization.
> As I understand, the config change will just create a new object of the
> class indicated in the impl, correct ?
No, it will not create a new class. Every time the runtime
configuration file is updated, the initImpl method is just invoked
again. So you keep your state...
Hope this helps,
Ernst
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/xml-rpc/
<*> To unsubscribe from this group, send an email to:
[email protected]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/