users@jaxb.java.net

Re: Binding customization for "synchronized"

From: Ryan Shoemaker - JavaSoft East <Ryan.Shoemaker_at_sun.com>
Date: Tue, 22 Apr 2003 16:35:00 -0400

Franklin, Brian wrote:
> I have encountered several situations in which it would be helpful to
> have the methods of generated classes be "synchronized" for thread-safe
> behavior.
>
> I am not aware of any current binding customization that will provide
> this functionality. I don't believe it would be too difficult to
> implement, and the scope of its impact is presumably minimal since it
> would not affect any interfaces (it's purely a generated implementation
> feature).
>
> Is there a way that a binding customization for this could be introduced?
> Brian Franklin
>

Sorry for the long delay in replying to this issue.

I agree that it would not be a difficult customization to add on the RI
impl classes, but I think the team is having trouble understanding the
use-case for this feature. Please elaborate...

Roughly speaking, in the case of the RI, the impl classes contain code
responsible for 2 things: 1. interacting with our runtime system to
control marshalling, unmarshalling, and validation and 2. implementing
all of the JavaBean getter/setter API's from the generated interfaces.
 From the perspective of the runtime system, I highly doubt that we will
ever be able to support thread-safe marshalling, unmarshalling, and
validation. It just doesn't make sense to talk about simultaneously
marshalling the same content tree object. However, it sounds like you
are interested in making the JavaBean api's synchronized. This is the
use-case we're interested in hearing more about. On the surface, it
seems like there are some potentially tricky issues we would have to
evaluate to determine if this is a safe change to make...

--Ryan