Thanks for the very thoughtful reply.  I now understand much better when 
you might use one framework or the other.

It's really very application-specific -- many apps just don't need really 
high transactional integrity.  The example people always give of two users 
adding money to the same table at the same time just doesn't happen that 
much in many applications.  In fact, one way to adjust for less than 
perfect transactional integrity is through more intelligent database schema 
design, possibly avoiding pitfalls.   In the same vein, many apps can run 
clustered with appropriate caching settings, perhaps occasionally spitting 
out stale data, but that might be ok within the requirements of the 
app.  That's how I'm understanding it with the app that I'm designing.

Thanks again,
Dan

At 03:46 PM 1/29/02 -0700, you wrote:
>I gave two 'pat' answers to these questions, but as I re-read them, I
>think abit more information is needed...
>
>On Tue, 2002-01-29 at 13:58, Dan Finkelstein wrote:
> > 1.  In JDO, if I perform a query like "get every customer", are all the
> > customers returned or is lazy loading used so that the UI can page through
> > the result set?  If I have to write extra code to do this, can you 
> describe
> > what is needed.
>
>See the webpage I mentioned for how to implement lazy-loading. (You
>place a line in the mapping.xml file, and retain the jdo
>reference/transaction while iterating through the list)  However, what
>type of UI are you talking about? If its a swing UI, then you can easily
>store the reference locally.  If its a webpage, then you don't want to
>keep the transaction open inbetween webpages.
>
>So you have lazy loading as an option, but make sure you understand the
>implications of the restrictions required by lazy-loading and how it
>impacts your application.
>
> > 2.  In a scalable environment, with multiple servers running caster, how
> > does the built-in transaction support compare with that in EJB?  I'm 
> trying
> > to see under what circumstances castor or EJB might be a better choice.
>
>I mentioned in a previous email that castor doesn't handle caching
>completely in a 'virtual cluster'.  (One server cannot update the other
>when a change occurs)  And depending on your EJB server, you can have
>different needs. Example: JBoss 2.2.x supports the use of Castor in the
>entity bean container, but doesn't support clustering. (JBoss 3.x I
>believe will have clustering)  WebLogic supports clustering but not
>Castor. (So you'd have to do BMP rather than CMP if you wanted to use
>Castor with WebLogic in an entity bean.) [disclaimer: I've not use
>castor personally with jboss, but from what I understand it can be done.
>Other people on this list are likely better able to help with that one
>than me.]
>
>Now, directly to your question, When you say 'castor vs EJB', that's not
>a 1-to-1 comparison. EJB has session beans and entity beans.  Castor
>only helps with entity beans, which I assume is what you meant by that.
>I'll answer this one with the 'default' EJB answer.  If you need
>deployment to determine transaction support of your encapsulated
>functions (beans), and the object-isolation and reference/lookup
>provided by the EJB framework, then you need EJB in general.  Depending
>on your Entity beans, CMP or BMP is a decision left to your problem
>domain, and how you implement it. Castor helps generate applications
>that use the database quickly, staying in the OO world.  (EJB doesn't
>help you create applications quickly, just 'cleanly' and maintainable.)
>I guess the short answer is, if you need a multiple cache-aware server
>implementation found in a virtual cluster, castor doesn't have it yet.
>
>--
>
>Virtually,
>Ned Wolpert <[EMAIL PROTECTED]>
>
>D08C2F45:  28E7 56CB 58AC C622 5A51  3C42 8B2B 2739 D08C 2F45

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to