On page 94 of UML Distilled, the author says that value objects can sometimes be shared among many objects. But what I understand about value objects and reference objects is that value objects are never shared and every object using a value object has a separate distinct copy of the value object . But if an object is a reference object, there is only one object and all the objects using that reference object have their own references to that reference object. Hence my understanding is value objects cannot be shared and reference objects are always shared by their definition. Hence I do not understand the author's statement that value objects can sometimes be shared.
You can do whatever you want with a value object. For example, a
JSP might use it to populate a page and then a servelet use it to create an entity bean perhaps. You don't need distinct copies to do this, although there's nothing stoping you from doing so.
- Scott
<a href="http://www-306.ibm.com/software/rational/bios/ambler.html" target="_blank" rel="nofollow">Scott W. Ambler</a><br />Practice Leader Agile Development, IBM Rational<br /> <br />Now available: <a href="http://www.ambysoft.com/books/refactoringDatabases.html" target="_blank" rel="nofollow">Refactoring Databases: Evolutionary Database Design</a>