Commit Graph

19 Commits

Author SHA1 Message Date
Chris Beams 41c405998e Convert CRLF=>LF on files missed earlier
Complete pass with `dos2unix` found additional files missed on earlier
related commit.

Issue: SPR-5608
2011-12-22 14:06:44 +01:00
Chris Beams 3bb01ee68b Revert "Introduce (Annotation)SessionFactoryBuilder types"
This commit and the several before it back out the
SessionFactoryBuilder and AnnotationSessionFactoryBuilder types
recently introduced in 3.1 M2. This is in light of the impending
release of Hibernate 4.0 GA and our own support for it the new
org.springframework.orm.hibernate4 package (not yet committed).

This new package will have a similar, but far simpler, arrangement of
a single LocalSessionFactoryBuilder and LocalSessionFactoryBean pair.
Hibernate 3.x support will remain largely as-is, however the
HibernateTransactionManager introduced with SPR-8076 will remain.

This reverts commit 9e8259198f.

Issue: SPR-8066, SPR-7936, SPR-8076, SPR-8098, SPR-8096, SPR-7387
2011-10-09 07:55:52 +00:00
Juergen Hoeller fc11102e34 updated dependencies 2011-06-08 22:51:21 +00:00
Juergen Hoeller c303b22e30 updated IntelliJ dependency descriptors 2011-05-29 20:43:52 +00:00
Chris Beams f5768fe00b Introduce (Annotation)SessionFactoryBuilder types
Large refactoring of existing *SessionFactoryBean hierarchy designed to
support configuration of Hibernate SessionFactory objects within
@Configuration class @Bean methods without forcing use of a
FactoryBean type, which is generally discouraged due to awkwardness
of programming model and lifecycle issues.  Refactored and new types
include:

    * Removal of AbstractSessionFactoryBean, replacing it with
      SessionFactoryBeanSupport abstract base class

    * Introduction of SessionFactoryBuilder and
      AnnotationSessionFactoryBuilder types, both direct subclasses of
      SessionFactoryBuilderSupport. These types are intended for direct
      use within @Bean methods. They expose method-chainable set*
      methods allowing for concise and convenient use. See JavaDoc
      on both types for usage examples.

    * LocalSessionFactoryBean and AnnotationSessionFactoryBean types are
      now subclasses, respectively, of the *Builder types above.

LSFB and ASFB backward-compatibility has been maintained almost
entirely. The one exception is that there is no longer a protected
convertHibernateAccessException() method available in the hierarchy.
This method was not likely often used anyway and has been replaced
by the new (and public) setPersistenceExceptionTranslator() which
accepts instances of type HibernateExceptionTranslator as introduced in
SPR-8076.

LSFB and ASFB setter method signatures have changed. They no longer
return void in standard JavaBeans style but rather, and due to extending
the *Builder types above, return the 'this' reference. This posed a
problem because the Spring container has to date been unable to detect
and provide dependency injection against non-void returning setter
methods. This limitation was due to the way that the default JavaBeans
Introspector class and its getBeanInfo() method works, and prompted the
introduction and intergration of ExtendedBeanInfo, already completed in
SPR-8079. So have no concern if you notice this signature change - it
all works.

Certain deprecations have been made:

    * All LSFB/ASFB methods related to Hibernate's CacheProvider SPI,
      reflecting its deprecation in Hibernate 3.3 in favor of the new
      RegionFactory SPI. Note these methods have been preserved only
      on the FactoryBean types. The new *SessionFactoryBuilder
      supertypes do not expose CacheProvider services at all.

    * All protected LSFB/ASFB methods that accept a Hibernate
      Configuration parameter, such as newSessionFactory(Configuration),
      postProcessMappings(Configuration) and
      postProcessConfiguration(Configuation), in favor of no-arg methods
      with the same names. Due to the nature of the hierarchy
      refactoring mentioned above, the Configuration instance is always
      available when these methods are called, thus no need to pass it
      in as a parameter.

In the process, our approach to automatic detection of Hibernate dialect
has been improved (it was in fact broken before). Thanks to James
Roper for his suggestion in SPR-7936 as to how to fix this.

See HibernateSessionFactoryConfigurationTests as a starting point for
understanding the new builder-style approach to SessionFactory creation.
Note especially use of the SessionFactoryBuilder#doWithConfiguration
method which allows for direct programmatic configuration of the Native
Hibernate (Annotation)Configuration API.

As a final note, AnnotationConfiguration has been deprecated in
Hibernate 3.6, and great pains have been taken to ensure that users
of any supported Hibernate version (3.2 -> 3.6) will never need to
(a) cast from Configuration to AnnotationConfiguration or (b)
experience deprecation warnings due to being forced to use the
AnnotationConfiguration API. Explore the JavaDoc around the
doWithConfiguration() method and HibernateConfigurationCallback type
for complete details.

Issue: SPR-8066, SPR-7936, SPR-8076, SPR-8098
2011-03-31 12:29:12 +00:00
Chris Beams f480333d31 Merge 3.1.0 development branch into trunk
Branch in question is 'env' branch from git://git.springsource.org/sandbox/cbeams.git; merged into
git-svn repository with:

    git merge -s recursive -Xtheirs --no-commit env

No merge conflicts, but did need to

    git rm spring-build

prior to committing.

With this change, Spring 3.1.0 development is now happening on SVN
trunk. Further commits to the 3.0.x line will happen in an as-yet
uncreated SVN branch.  3.1.0 snapshots will be available
per the usual nightly CI build from trunk.
2010-10-25 19:48:20 +00:00
Juergen Hoeller 973fb6ce40 updated to Groovy 1.6.5 2009-11-27 01:37:43 +00:00
Juergen Hoeller e1a3e44485 initial JSR-330 injection support 2009-09-15 12:00:55 +00:00
Juergen Hoeller 1045847cf7 updated to CGLIB 2.2 and EHCache 1.6.2 2009-09-07 18:04:27 +00:00
Juergen Hoeller 8754f0bc85 updated dependencies 2009-08-31 11:25:54 +00:00
Sam Brannen 620c9b1f96 [SPR-5895] Upgraded to EasyMock 2.5.1. 2009-07-03 09:32:15 +00:00
Sam Brannen 8bfb56c75b [SPR-5887] Upgraded to JUnit 4.6.0. 2009-07-02 18:07:55 +00:00
Sam Brannen 0c2fa5208d [SPR-5888] Upgrading to TestNG 5.9. 2009-07-02 16:03:31 +00:00
Juergen Hoeller 4cf573ba98 updated to FreeMarker 2.3.15 (SPR-4962) 2009-04-19 22:22:56 +00:00
Thomas Risberg 1facd45c5e switched to use XInclude 2009-04-14 21:37:40 +00:00
Colin Sampaleanu 31f61628ff updte hibernate dependencies in integration-test project to same as
those in orm project
2009-04-13 05:03:55 +00:00
Juergen Hoeller e989292e2a updated compile and test dependencies 2009-02-25 13:42:45 +00:00
Arjen Poutsma 171b855d10 Added JUnit 4.5 2009-02-20 14:58:19 +00:00
Juergen Hoeller 2bdb62f4c2 added IntelliJ settings for integration-tests module 2009-02-12 22:12:27 +00:00