Gervas Douglas wrote:
>  > So far, the evidence from Jini/Javaspaces, Ruple, the XML Spaces open
>  > source project, etc. is that there isn't a sweet spot here that can't
>  > be approximated with existing DB-backed Web frameworks.
> 
> Doubtless true - which I guess answers my original question.  I am
> ignorant of the XML Spaces open source project, but its name would
> tend to indicate that it fits the bill.  Gregg has pointed out how
> J/JS can be used with data not initially in Java object form, if my
> memory serves me right.

You can create a generic Entry object, with a String field to hold the XML 
document.

public class MyXMLContainer implements Entry {
        public String str;
        public Integer foo;
        public MyXMLContainer(){}
        public MyXMLContainer(String val, int bar){
                str = val;
                foo = new Integer(bar);
        }
}

Then you write some JERI code to advertise whatever type of endpoint you need. 
You might choose to provide an invocation layer factory as well.  In the 
inbound 
path, you convert the XML to your generic java object and use the invocation 
handlers invoke() method to invoke the appropriate method.

You might imagine some trival XML documents like the following

<JavaSpacesOperation type="put">
        <data>
                <value name="foo" type="int">32</value>
                <value name="str" type="string">Some text</value>
        </data>
        <transaction id="129023-3-123021321-2321321"
                manager="190310231223212,312321321312312"/>
</JavaSpacesOperation>

<JavaSpacesOperation type="take">
        <data>
                <value name="foo" type="int">21</value>
        </data>
        <transaction id="129023-3-123021321-2321321"
                manager="190310231223212,312321321312312"/>
</JavaSpacesOperation>

The endpoint/invocationlayer would use the transaction manager
attribute to find the correct manager instance, and then use the associated id
to create a transaction object to interact with the javaspace.

Its entirely possible, if not a bit clunky like most XML to native system 
interfaces feel.

Gregg Wonderly





 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/service-orientated-architecture/

<*> 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/
 


Reply via email to