You are viewing a plain text version of this content. The canonical link for it is here.
Posted to rampart-c-dev@ws.apache.org by Evan Klinger <ek...@gmail.com> on 2010/05/11 20:37:11 UTC

Multi-threaded Services

Hello,
When developing a REST service in Axis2/C, how does Apache handle the
integration with the Axis2 module? When a request comes in that is
passed to the Axis2 module, does each request create a new instance of
the service or is it a new thread? Basically, in the service we may
need to open a file for writing but also for reading, depending upon
the request. However, we don't want to read while the file is being
written to so it seems like we need a rw lock/mutex, but that will
only work if the service is called by multiple threads. If they are
called from separate processes then I don't think this approach will
work. Any information on how to handle this would be greatly
appreciated.

Thank you
Evan

---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: c-dev-help@axis.apache.org


Axis is_nil methods ..

Posted by Patrick Cosmo <pc...@incognito.com>.
Hello,

We notice that the Axis generated "is_<elementName>_nil" methods will return AXIS2_TRUE if an element is not supplied at all (even if this value is not defined as being nillable in the XSD). Is this a bug?

My understanding is that an isNil method for XML should only return true if:

an element was provided in the XML without content and with the xsi:isnil="true" attribute set.

Other XML libraries (JaxB, Apache) seem provide a definition of is_nil that conforms to this definition, I've provided some reference below.

If this is a bug, would there by any objects to my fixing this problem and providing Axis code diffs that implement the generated is_nil methods to only return AXIS2_TRUE when the above condition is met.

The Jaxb library documents this for nil (http://72.5.124.55/javaee/6/docs/api/javax/xml/bind/JAXBElement.html):

boolean isNil()
          Returns true iff this element instance content model is nil.

protected  boolean nil
          true iff the xml element instance has xsi:nil="true".

and the Apache library documents there "isNil" method as follows (http://xmlbeans.apache.org/docs/2.0.0/reference/org/apache/xmlbeans/XmlObject.html):

isNil
public boolean isNil()

True if the value is nil. Note that in order to be nil, the value must be in an element, and the element containing the value must be marked as nillable in the schema.


thanks,

Patrick Cosmo
Incognito Software Inc.
Senior Software Design Engineer
T: +1(604)678-2855
F: +1(604)688-4339
E: pcosmo@incognito.com
www.incognito.com




http://www.incognito.com/uc

---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: c-dev-help@axis.apache.org


Axis is_nil methods ..

Posted by Patrick Cosmo <pc...@incognito.com>.
Hello,

We notice that the Axis generated "is_<elementName>_nil" methods will return AXIS2_TRUE if an element is not supplied at all (even if this value is not defined as being nillable in the XSD). Is this a bug?

My understanding is that an isNil method for XML should only return true if:

an element was provided in the XML without content and with the xsi:isnil="true" attribute set.

Other XML libraries (JaxB, Apache) seem provide a definition of is_nil that conforms to this definition, I've provided some reference below.

If this is a bug, would there by any objects to my fixing this problem and providing Axis code diffs that implement the generated is_nil methods to only return AXIS2_TRUE when the above condition is met.

The Jaxb library documents this for nil (http://72.5.124.55/javaee/6/docs/api/javax/xml/bind/JAXBElement.html):

boolean isNil()
          Returns true iff this element instance content model is nil.

protected  boolean nil
          true iff the xml element instance has xsi:nil="true".

and the Apache library documents there "isNil" method as follows (http://xmlbeans.apache.org/docs/2.0.0/reference/org/apache/xmlbeans/XmlObject.html):

isNil
public boolean isNil()

True if the value is nil. Note that in order to be nil, the value must be in an element, and the element containing the value must be marked as nillable in the schema.


thanks,

Patrick Cosmo
Incognito Software Inc.
Senior Software Design Engineer
T: +1(604)678-2855
F: +1(604)688-4339
E: pcosmo@incognito.com
www.incognito.com




http://www.incognito.com/uc

---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: c-dev-help@axis.apache.org