The purpose of the ADB Beans is to provide databinding. From time to
time, the way these databinding classes are generated may change when
we fix various issues + introduce new features in Axis2. Hence if you
decide to use these as your business objects, you may have to make
significant code changes when upgrading to a newer version of Axis2.
Therefore, IMHO, the better approach would be to define your own
business objects which corresponds to your domain model.

In addition, I don't think it is very prudent to make all your
ADBBeans implement
serializable and use them as your business objects. See
http://richm.org/eff/effectivejava.html. See Item 54
in this article.

<quote>
**Item 54: Implement Serializable judiciously**

Allowing a class's instances to be serialized can be as simple as adding
the words implements Serializableto its declaration. Because this is so
easy to do, there is a common misconception that serialization requires
little effort on the part of the programmer.

The truth is far more complex. While the immediate cost to make a class
serializable can be negligible, the long-term costs are often
substantial. A major cost of implementing Serializable is that it
decreases the flexibility to change a class's implementation once it has
been released. When a class implements Serializable, its byte-stream
encoding (or serialized form) becomes part of its exported
API. Once you distribute a class widely, you are generally required to
support the serialized form forever, just as you are required to support
all other parts of the exported API. If you do
not go to the effort to design a custom serialized form, but merely
accept the default, the serialized form will forever be tied to the
class's original internal representation. In other
words, if you accept the default serialized form, the class's private
and package-private instance fields become part of its exported API, and
the practice of minimizing access to fields (Item 12) loses its
effectiveness as a tool for information hiding.
</quote>


--
Azeez

On Jan 17, 2008 1:22 PM, Thomas Pawlitzki <[EMAIL PROTECTED]>
wrote:

> Hello,
>
> i wounder if there is there is a possibility to influence the
> generation of the ADBs.
>
> I have a XSD which defines the data structures of a webservice. I use
> this xsd to generate the ADBs. As the ADBs covers the hole data of my
> business logic i want to use them as business objects, too. So my
> clients create objects of  them, pass the objects into my logic, I do
> some validation and computing and I send them via WebService easily.
>
> But therefore the ADBs must implement java.io.Serializable.
>
> Is there a possibillity to generate the ADBs implementing this interface?
>
> Thanks a lot.
>
> Greetings,
> Thomas
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Thanks
Afkham Azeez

http://azeez78.blogspot.com
http://www.wso2.org
GPG Fingerprint: 643F C2AF EB78 F886 40C9  B2A2 4AE2 C887 665E 0760

Reply via email to