{"shas":[["6a3f7128bac5b8f68213e6ead1e15074444e6785","1f4a69fd61559985ab6eb7d9d4fb8765471c308e@amentra.com","MODE-1209 Add Support for Hibernate 2nd Level Cache to JPA Connector\n\nUpdated patch to include default persistence configurations for no cache, the simple Hibernate cache, EHCache, and an Infinispan cache.  All configurations are fully documented in the Reference Guide.","Brian Carothers"],["de3469dd7e8e4393bf17b1141d0a5927a574490c","1f4a69fd61559985ab6eb7d9d4fb8765471c308e@amentra.com","MODE-1209 Add Support for Hibernate 2nd Level Cache to JPA Connector\n\nHard-coding a 2LC provider is really easy.  Making it usable is really hard, as Hibernate requires one to provide a CacheConcurrencyStrategy (e.g., read-write, read-only, transactional) and not all cache providers support all strategies.  The CacheConcurrencyStrategy can either be provided in a Hibernate-specifc  annotation at compile-time or in persistence.xml - a much more JPA-friendly mechanism.\n\nErgo, the attached patch adds the use of a persistence.xml file to help control mappings and Hibernate cache settings for the first time.  That, in turn, required that we use a more JPA-standard way of building an EntityManagerFactory, which required moving a lot of code, but was pretty straightforward.\n\nThe idea is that we can now specify a number of different pre-defined cache configurations in our persistence.xml and allow users to pick one by modifying the new jpaPersistenceUnitName property on the JpaSource.  Users can now also override or extend our default configurations by providing their own persistence.xml in their own JAR.\n\nIn doing this, I extracted all of the Hibernate-specific code into an implementation of a new interface, JpaAdapter.  This brings us surprisingly close to being able to support other JPA providers with our JPA connector, but we're still using Hibernate-specific annotations to define indexes, and we have to have those indexes.\n\nFeedback on this approach would be greatly appreciated.  If the approach is considered viable, all that remains is to predefine some cache configurations and update the documentation accordingly.","Brian Carothers"],["9428556fae0591c2e9064a715d7fd9804bfdf66e","1f4a69fd61559985ab6eb7d9d4fb8765471c308e@amentra.com","MODE-1209 Add Support for Hibernate 2nd Level Cache to JPA Connector\n\nUpdated patch to include default persistence configurations for no cache, the simple Hibernate cache, EHCache, and an Infinispan cache.  All configurations are fully documented in the Reference Guide.","Brian Carothers"],["65c56342504a5d6000922961d00fe7c4f1e27246","9972a9c98f4ad2f4c07879e61ff8ef543017832b@gmail.com","MODE-1209 Added JPA caching to the benchmark config\n\nChanged the connector benchmark ModeShape configuration to have 4 variations of the\nJPA connector and 2nd-level caching: without, with Ehcache, with Infinispan cache, and\nwith simple cache. They are still commented out (since they take quite a while to run).","Randall Hauch"],["0a0925dd05b7c890c591bfd60989b898b3f93f63","1f4a69fd61559985ab6eb7d9d4fb8765471c308e@amentra.com","MODE-1209 Add Support for Hibernate 2nd Level Cache to JPA Connector\n\nFixed bug in handling of data source property.","Brian Carothers"],["d53826cc1ca4190e75a52b99b5e1ab932aa79d81","1f4a69fd61559985ab6eb7d9d4fb8765471c308e@amentra.com","Merge branch 'master' into MODE-1209","Brian Carothers"]],"ref":"refs/heads/master","size":6,"head":"d53826cc1ca4190e75a52b99b5e1ab932aa79d81","push_id":35989269}