users@jaxb.java.net

Re: ObjectFactory API

From: Ryan Shoemaker - JavaSoft East <Ryan.Shoemaker_at_sun.com>
Date: Tue, 25 Mar 2003 10:37:46 -0500

Anthony Maguire wrote:
> This message was originally submitted by ajmsonic_at_YAHOO.CO.UK to the JAXB-INTEREST
> list at JAVA.SUN.COM. If you simply forward it back to the list, using a mail command that
> generates "Resent-" fields (ask your local user support or consult the documentation of your
> mail program if in doubt), it will be distributed and the explanations you are now reading
> will be removed automatically. If on the other hand you edit the contributions you receive into
> a digest, you will have to remove this paragraph manually. Finally, you should be able to
> contact the author of this message by using the normal "reply" function of your mail
> program.
>
> ----------------- Message requiring your approval (6 lines) -------------------


> Hi,
>
> Have been using the JAXB beta version for the last while and have started this week to develop
> with version 1.0. One of the implementation differences i have noticed is that to create the java
> types from the xsd, with the ObjectFactory class is no longer a static method, but you have to
> instantiate an object of type ObjectFactory and call the relevant create method on the resulting
> object. Just wondering for the reason for this change?
>
> Thanks, anthony
>

Hi Anthony,

This change was requested by a member of the expert group. The problem with the
all-static version of the object factory is that there was no way for a JAXB
provider to associate data with it. Depending on how a provider implements the
JAXB spec, they may or may not find it useful to set data on the object factory
(ie - a JDBC connection). This wasn't possible with the all-static version, so
we converted it to a regular class and added the get/setProperty() api's.

See bullet #1: http://java.sun.com/webservices/docs/1.1/jaxb-1.0/ReleaseNotes.html#changes

Also, you need to subscribe to the listserv before you can post.

Please sign-up at:

http://archives.java.sun.com/jaxb-interest.html

Follow the "join" link and make sure to post your messages from the exact
same e-mail address you used to join. This is necessary to reduce the
amount of spam that gets to the list.

--Ryan Shoemaker, Sun Microsystems, Inc.