Adding objects with Xins (was Re: Re: [ANN] XINS 1.3 supports XML-RPC)

Paul Libbrecht <[email protected]>
Newsgroups gmane.text.xml.rpc.specification
Message-ID <[email protected]>
(changing subject, the thread's been too deep)

Ernst,

Let me try with a piece of concrete example:

• client-A calls url-X with method start-Upload
the code on the back of url-X creates an "upload-setting", and registers it
so that it can answer a URL of an upload-API (say on url-U)
(nothing else, no tokens or such)

• client-A can now call url-U to upload

Am I being more precise ?
What I wish is to find something around the XinsServlet where I could 
say: I have a new object, to register to this (sub)-url, can you hold 
this please ? (and a method to remove it, and...)

paul

PS: indeed, no remote GC or anything such...

Ernst de Haan wrote:
>> 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/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.