David Bullock <[EMAIL PROTECTED]> wrote:
>
><brief-atopical-note>
>
> Hi. I liked your tagline, and looked up Poul Anderson on amazon, but I can't >find the book "Iron". Can you point me further in that direction?

It is a novella, republished in "Inconstant Star" by Anderson. ISBN 0-671-72031-7.

>Regarding the coarseness of entity-beans, if you have a fine-grained data-schema in your RDBMS, then be prepared to have to write some SQL. But the basic idea is that if you have a whole-part relation (which will always be a 'dependent' relationship on any properly drawn ER diagram), make an EJB to represent the whole, but provide your own custom methods for manipulating the parts.

[snip]

>My addName(String name) method on the Person EBJ now has to do some SQL, which it didn't have to do before -- to update the Name and Namepart tables directly. That method executes slightly faster, because it doesn't have to use so much of the EJB framework (no point in having concurrent, secure, transactional Nameparts, anyway!). But the real saving is between the client and the server, because setting the value of a NamePart doesn't involve any network
>traffic, you just create a String for the whole name, and send one string across the network.

But this seems to defeat the whole point of having entity beans. Why not just have the session beans call the stuff which does the SQL? The promise of Entity beans was that you could use container-managed persistence and not have to write SQL, or that any SQL you did write was only needed in the persistence methods, not the business methods.

>
>The scheme of doing things 'coarsely' mentioned above is broadly referred to as 'pass by value'. Pass-by-value always outperforms pass-by-(networked)-reference. There were a couple of papers on the topic written by some of the EJB gurus on the list, sometime last year, and they are at: http://www.inprise.com/events/ejbdesign/submissions/Pass-by-Value.html
>
>In particular, the 'Pass by Value' paper by Richard Monson-Haefel is quite relevant to what I discuss here.

I'm afraid I don't see the connection. I do agree that using pass-by-value over networks is the way to go, but it does not address the persistence issue at all.

>That's about it. This might be bad news concerning CMP, but Container managed persistence is a white elephant anyway - it is not portable between an Object Database and a Relational Database, because in ODBMS relationships, the ONE contains references to the MANY, while in an RDBMS relationships, each MANY holds a reference to the ONE. This obviously affects how you model your EJB's!

I don't agree. You can model a one-to-many or a many-to-one relationship in either kind of database. The problem here is that whether you use BMP or CMP, Entity beans don't seem to give any benefits over simply using Session beans and managing your database mapping the normal way for traditional course-grained objects. I want to be proven wrong, but I'm still waiting.


------------------------------------------------------------------------
Russell Gold | "... society is tradition and order
[EMAIL PROTECTED] (preferred) | and reverence, not a series of cheap
[EMAIL PROTECTED] | bargains between selfish interests."
[EMAIL PROTECTED] | - Poul Anderson, "Iron"
�������������������������o 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