• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Hibernate
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Hibernate


  • Subject: Re: Hibernate
  • From: Mike Schrag <email@hidden>
  • Date: Wed, 25 Feb 2009 13:21:51 -0500

1. the Session doesn't need to be tightly bound. unlike EOEditingContext that's tightly bound to the EOObjectStoreCoordinator
I'm not exactly sure what you mean here, or what you the desired features would be if you could "unbind" an EC from an OSC? You can obviously just make an EC with a new instance of an OSC and have it standalone, but I'd be curious to hear more about what kinds of problems you're trying to solve.
For request-response loop 1, I could have Session bound to DB connection 1, and for request-response loop 2 I could have the same Session bound to DB Connection 2. As I understand EOEditingContexts are bound to an OSC. So all the ECs for one OSC would contend for the same DB connection and it would be harder to scale out?
Yes ... but :) So yes, an EC is bound to an OSC (its the EC's backing cache), but you can distribute EC's across OSC's (wonder has OSC pooling w/ OSC affinity). If you use a single OSC, then you will contend for a single connection. The downside right now is that EOF has a separate snapshot cache for each OSC, making the memory footprint of multiple OSC's potentially kind of high. If snapshot caching was separated out, though, this would be a much "thinner" relationship and would make pooling significantly more desirable (in exchange for a more complicated snapshot caching layer). This would be a nice addition to EOF.

nd of similar to #1 above. It's easier to just take a free connection from a DB connection pool. In essence a Hibernate session directly binds to a DB connection and doesn't have an OSC layer in between.
I think Hibernate must have the equiv of an OSC somewhere floating in there, as you'd have to know which connections are available to your session as well as which cache your session is backed by. The difference, I think, is what I was above, in that the snapshot cache for Hibernate can float between multiple sessions, whereas EOF's are inline with that stack. This is definitely a + in the hibernate column for flexibility.

Someone also mentioned annotations ... Hibernate also supports declarative mapping with XML files (which you might as well call "an eomodel"), so you don't necessarily have to annotate your code. There is definitely some value in Hibernate doing class rewriting, so the objects themselves can be used outside of a persistence context. EOF tends to prefer a much "smarter" managed object, though, which makes it kind of hard (or at least weird) to use in other contexts.

ms

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Hibernate (From: Lon Varscsak <email@hidden>)
 >Re: Hibernate (From: Tonny Staunsbrink <email@hidden>)
 >Re: Hibernate (From: Lon Varscsak <email@hidden>)
 >Re: Hibernate (From: Luke Holton <email@hidden>)
 >Re: Hibernate (From: Chuck Hill <email@hidden>)
 >Re: Hibernate (From: Luke Holton <email@hidden>)
 >Re: Hibernate (From: Gustavo Pizano <email@hidden>)
 >Re: Hibernate (From: Oliver Scheel <email@hidden>)
 >Re: Hibernate (From: Karthik N <email@hidden>)
 >Re: Hibernate (From: Mike Schrag <email@hidden>)
 >Re: Hibernate (From: Karthik N <email@hidden>)

  • Prev by Date: Re: Hibernate
  • Next by Date: Re: FireFox can't render a image, but Safari Does.
  • Previous by thread: Re: Hibernate
  • Next by thread: Re: Hibernate
  • Index(es):
    • Date
    • Thread