Hey

"Eric R. Williams" wrote:
> Why would you have to build your own marshalling code?  EJB fully
> handles RMI parameter types, which includes Serializable objects.
> It seems to me that data-transfer between the client and server
> should primarily take the form of Serializable objects.

Plain RMI/JRMP cannot be used since there's no way to add contextual
info (id/tx). Which basically sucks. I wish the RMI team had synched
with the EJB team before coming up with the JDK1.2 RMI model, but they
didn't (at least that's the story I've gotten from the RMI team).

RMI/IIOP is another story though, but it would be nice if it was
possible to implement an EJB server with JRMP instead.

> What is more complicated---as you point out---is pruning the object
> graph.  Of course you don't want to send an object which references
> half your database.  The simplistic solution is for objects to contain
> foriegn key references to other objects, not direct pointers.  (You
> can break the simplistic rule when you are certain you want to include
> some referenced objects. A good example is an Order object; you would
> probably want to send the associated LineItem objects with the Order.)

.. or simply use lazy caching proxies (am I getting repetitive here? 8-)

> Another interesting issue is how you structure the data models, which
> also has persistence implications.  Do the client and the server use
> the same data/persistence model?  Or, does the server maintain its
> own data/persistence model and then expose a data/network model to
> the client?  I tend to favor the latter, since I don't want the
> entire data/persistence model exposed to the client. This means that
> you wind up writing more code, but it does give the client a simpler
> view of the world.

That'd work, but why more code? Seems autogeneratable to me. I never
write a line of code that the computer can do for me given some semantic
information about the resulting code.

/Rickard

--
Rickard �berg

Computer Science student@LiTH
@home: +46 13 177937
Email: [EMAIL PROTECTED]
Homepage: http://www-und.ida.liu.se/~ricob684

===========================================================================
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