John,

<vendor>
The example application in GemStone/J's Developer's Guide does exactly this
(i.e. wraps domain objects with Entity Beans).

You can sign up for a copy at our WEB sute.
</vendor>

-Chris.

> -----Original Message-----
> From: john smith [SMTP:[EMAIL PROTECTED]]
> Sent: Friday, March 10, 2000 11:17 AM
> To:   [EMAIL PROTECTED]
> Subject:      Design question: entity beans, wrapping domain objects and
> such...
>
> We want to take advantage of entity beans and CMP, but also want to
> preserve
> our Domain Object Model to the greatest degree possible. It is sometimes
> suggested that an entity bean simply wraps the java object. The entity
> bean
> would then have two attributes of interest to us, the id, and a reference
> to
> the java object it represents.
>
> Thus we never really act on the entity bean, instead we get the domain
> object from it, act upon it and give it back to the entity bean to
> persist.
>
> We may also do "large" queries using sql in session beans, construct our
> domain objects from the results, and when done, pass them back to an
> entity
> bean for transactional updates.
>
> I would like to expose only the domain objects to the clients (session
> beans) probably using a facade of some sort with which our "findBy"
> requests
> would be delegated to the actual entity bean and the facade would return
> back to the client, domain objects.
>
>
> Questions:
>
> First - I'd like to know if anyone is using domain objects wrapped by
> entity
> beans, and if so, can you provide some insight into how you actually use
> the
> domain object from a client. Thoughts?
>
>
> Heres the first thing I come up with:
> Lets say we want to use a simple mutator on a domain object, for example,
> change a patients telephone number.
>
> 1 - the client makes a request for patient with last name of smith.
>
> 2 - If we were directly accessing entity beans from the client (session
> bean) we would have 3 remote references, update the one of interest and
> the
> container would insure it was persisted...
>
> In our case we get back three domain objects. We update the one of
> interest,
> and then what??? Sure, we submit it back for persistence. The facade will
> use the id to look up the entitybean, update it and persist it. But this
> seems like a lot of work!
>
> Any other ideas?
>
> THANKS!!!
> ______________________________________________________
> Get Your Private, Free Email at http://www.hotmail.com
>
> ==========================================================================
> =
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
> body
> of the message "signoff EJB-INTEREST".  For general help, send email to
> [EMAIL PROTECTED] and include in the body of the message "help".

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to