Commit Graph

93 Commits

Author SHA1 Message Date
Juergen Hoeller
76ab5b9de2 Consistent reset of resource holders on doBegin failure
Issue: SPR-12280
(cherry picked from commit 9758bc7)
2014-10-07 00:39:45 +02:00
Juergen Hoeller
b45d08f192 Remove outdated references to ContextLoaderServlet
Issue: SPR-7725
2014-09-30 20:56:57 +02:00
Juergen Hoeller
388561df61 PersistenceAnnotationBeanPostProcessor defensively handles BeanDefinition access for extended EntityManagers
Issue: SPR-8834
(cherry picked from commit 592e344)
2014-08-22 23:47:26 +02:00
Juergen Hoeller
36918d6bb7 Polishing (includes varargs for selected setters) 2014-08-11 22:12:26 +02:00
Juergen Hoeller
d10220edf8 Refined DefaultJpaDialect's InvalidIsolationLevelException message
Issue: SPR-8325
(cherry picked from commit af13310)
2014-07-03 22:54:30 +02:00
Juergen Hoeller
44c61e5d5f Consistent declaration of private static final logger variables
Issue: SPR-11905
(cherry picked from commit c16032b)
2014-07-01 14:22:56 +02:00
Juergen Hoeller
9e2060707a General defensiveness about the bootstrap ClassLoader (i.e. null ClassLoader)
Issue: SPR-11721
2014-04-27 22:29:08 +02:00
Juergen Hoeller
4233d0a99e Removed outdated hibernate3 references across the codebase
Issue: SPR-9028
(cherry picked from commit 09e2e58)
2014-02-06 23:38:30 +01:00
Juergen Hoeller
398f91cb74 Polishing 2014-01-27 22:49:14 +01:00
Juergen Hoeller
7e2167fd17 Specific deprecations and consistent setter varargs in Hibernate support
Issue: SPR-11291
2014-01-27 22:11:58 +01:00
Juergen Hoeller
2ef39a5666 Consistently declare @SuppressWarnings("serial") instead of dummy serialVersionUID
(cherry picked from commit 56b7d7a)
2014-01-26 00:37:09 +01:00
Juergen Hoeller
c77832ba6d Added info-level logging for default unit detection
Issue: SPR-11333
(cherry picked from commit 88730bd)
2014-01-21 01:36:50 +01:00
Juergen Hoeller
354917c53d Polishing (backports from 4.0.1) 2014-01-13 23:36:33 +01:00
Juergen Hoeller
08aa22ff1f InjectionMetadata caching per bean name needs to refresh when bean class changes
Issue: SPR-11246
2013-12-20 00:15:09 +01:00
Rossen Stoyanchev
f9081bedb4 Add timeout async request handling to OSIV components
This change adds async web request timeout handling to OSIV filters
and interceptors to ensure the session or entity manager is released.

Issue: SPR-10874
2013-10-30 23:12:09 -04:00
Juergen Hoeller
ce001c23f7 Cache InjectionMetadata per bean name instead of per Class, if possible
Issue: SPR-11027
(cherry picked from commit 4675bc4)
2013-10-26 15:56:57 +02:00
Juergen Hoeller
d0948f1f03 Fixed misunderstanding with respect to excludeUnlistedClasses default in JPA 2.0
Issue: SPR-10767
2013-07-31 23:40:59 +02:00
Juergen Hoeller
c1dc4e2c75 Resource-based PlatformTransactionManager implementations defensively catch Throwable in doBegin in order to reliably close resource in case of OutOfMemoryError
Issue: SPR-10755
(cherry picked from commit 2e4eb9f)
2013-07-25 10:45:58 +02:00
Nick Williams
e608055021 Parse JPA <exclude-unlisted-classes> correctly
Fix PersistenceUnitReader to correctly read <exclude-unlisted-classes>
in both JPA 1.0 and 2.0 persistence.xml files.

Prior to this commit PersistenceUnitReader would set the value of
excludeUnlistedClasses to true when a <exclude-unlisted-classes> element
was present, regardless of its value.

The following rules are now used when parsing:

- If the <exclude-unlisted-classes> element is missing the appropriate
  default value is set (based on the JPA version).

- If an empty <exclude-unlisted-classes/> element is found the
  excludeUnlistedClasses property is set to true.

- Otherwise the value of the <exclude-unlisted-classes> element is used
  to set the excludeUnlistedClasses property.

Issue: SPR-10767
(cherry picked from 7ad540d)

Conflicts:
	spring-orm/src/main/java/org/springframework/orm/jpa/persistenceunit/PersistenceUnitReader.java
2013-07-22 12:38:46 -07:00
Juergen Hoeller
2145545e69 Ignore failing TopLink tests (not worth messing with since TopLink is deprecated anyway) 2013-04-30 23:29:07 +02:00
Juergen Hoeller
601c64a65c Removed broken applyQueryTimeout implementation (following a fix in 4.0) 2013-04-30 23:29:06 +02:00
Juergen Hoeller
964f1a6213 Refined HibernateJpaDialect for Hibernate 4.2 support
HibernateJpaDialect's HibernateConnectionHandle does not call close() for Hibernate 4.x anymore, since on 4.2, the exposed Connection handle isn't a "borrowed connection" wrapper but rather the actual underlying Connection - with a close() call immediately returning the Connection to the pool and making the local handle invalid for further use within the transaction.

Issue: SPR-10395
2013-04-30 23:29:05 +02:00
Phillip Webb
05765d7520 Replace EasyMock with Mockito
Issue: SPR-10126
2013-03-06 11:06:15 -08:00
Sam Brannen
c0e4387cbc Fix JIRA issue number in @Ignore comments
Issue: SPR-10333
2013-02-28 01:42:04 +01:00
Juergen Hoeller
b979d8d548 Polishing along with SPR-10301 2013-02-27 00:22:53 +01:00
Juergen Hoeller
0d69a630ad DefaultJdoDialect supports the JDO 2.2+ isolation level feature out of the box
Issue: SPR-10323
2013-02-26 22:30:48 +01:00
Chris Beams
9c2b5b2406 Update @Ignore'd JPA+AspectJ tests
Issue: SPR-10074, SPR-10333
2013-02-26 14:26:55 +01:00
Juergen Hoeller
5334ac59f6 "packagesToScan" feature for Hibernate 3 and Hibernate 4 detects annotated packages as well
Issue: SPR-7748
Issue: SPR-10288
2013-02-13 17:44:10 +01:00
Sam Brannen
220d2311c7 Polish documentation in Hibernate support classes
This commit fixes some minor typos in Hibernate support classes.
2013-02-01 23:51:07 +01:00
Phillip Webb
d89e30b864 Fix unnecessary @SupressWarnings annotations 2013-01-29 15:37:25 -08:00
Phillip Webb
065b1c0e46 Fix unused local variable warnings 2013-01-25 14:35:19 -08:00
Phillip Webb
6a1e841952 Fix unused type compiler warnings 2013-01-25 14:35:07 -08:00
Juergen Hoeller
8f103c2ea1 Introduced NoUniqueBeanDefinitionException as a dedicated subclass of NoSuchBeanDefinitionException
Issue: SPR-10194
2013-01-22 21:12:06 +01:00
Juergen Hoeller
1a929f22e0 EntityManagerFactoryUtils finds default EntityManagerFactory in parent contexts as well
Also introduces consistent use of getBean(Class) for similar use cases across the framework, accepting a locally unique target bean even if further matching beans would be available in parent contexts (in contrast to BeanFactoryUtils.beanOfType's behavior).

Issue: SPR-10160
2013-01-22 21:12:05 +01:00
Juergen Hoeller
10dceb182e Marked LocalCacheProviderProxy as deprecated (following Hibernate 3.3.'s CacheProvider deprecation) 2013-01-10 17:00:40 +01:00
Phillip Webb
ee1ddc90ec Replace EasyMock with Mockito in spring-orm
Issue: SPR-10126
2013-01-09 17:42:12 -08:00
Chris Beams
15e9fe638c Remove duplicate test resources
The files deleted in this commit existed in identical form in two places
within a given module; typically in src/test/java and
src/test/resources. The version within src/test/resources has been
favored in all cases.

This change was prompted by associated Eclipse warnings, which have now
been quelled.

Issue: SPR-9431
2013-01-04 11:38:58 +01:00
Phillip Webb
42b5d6dd7e Remove duplicate test classes
Prior to this commit many test utility classes and sample beans were
duplicated across projects. This was previously necessary due to the
fact that dependent test sources were not shared during a gradle
build. Since the introduction of the 'test-source-set-dependencies'
gradle plugin this is no longer the case.

This commit attempts to remove as much duplicate code as possible,
co-locating test utilities and beans in the most suitable project.
For example, test beans are now located in the 'spring-beans'
project.

Some of the duplicated code had started to drift apart when
modifications made in one project where not ported to others. All
changes have now been consolidated and when necessary existing tests
have been refactored to account for the differences.

Conflicts:
	spring-beans/src/test/java/org/springframework/beans/factory/ConcurrentBeanFactoryTests.java
	spring-beans/src/test/java/org/springframework/beans/factory/support/BeanFactoryGenericsTests.java
	spring-beans/src/test/java/org/springframework/beans/support/PagedListHolderTests.java
2013-01-04 10:02:29 +01:00
Phillip Webb
6626a38730 Fix [deprecation] compiler warnings
Fix deprecation compiler warnings by refactoring code or applying
@SuppressWarnings("deprecation") annotations. JUnit tests of
internally deprecated classes are now themselves marked as
@Deprecated.

Numerous EasyMock deprecation warnings will remain until the
migration to mockito can be completed.
2013-01-01 13:42:15 -08:00
Chris Beams
8472a2b2ab Update Apache license headers for affected sources 2012-12-28 23:09:31 +01:00
Chris Beams
4c8cd7b0bd Add @Override annotations to test sources
Issue: SPR-10129
2012-12-28 23:05:44 +01:00
Chris Beams
4c7cafbde6 Fix "unnecessary @SuppressWarnings" warnings 2012-12-28 22:50:46 +01:00
Chris Beams
4d97ff2479 Fix [dep-ann] warnings with @Deprecated 2012-12-28 22:50:45 +01:00
Phillip Webb
6c14eaad61 Fix [cast] compiler warnings 2012-12-28 22:41:06 +01:00
Phillip Webb
b0986049a3 Fix [serial] compiler warnings
Fix serialization warnings by applying @SuppressWarnings("serial")
when appropriate.

In certain cases and for unknown reasons, a correctly-placed
@SuppressWarnings("serial") annotation will fix the warning at the
javac level (i.e. the Gradle command-line), but will produce an
"unnecessary @SuppressWarnings" warning within Eclipse. In these
cases, a private static final serialVersionUID field has been added
with the default value of 1L.
2012-12-28 22:41:06 +01:00
Phillip Webb
731d5be644 Fix warnings due to unused import statements 2012-12-28 22:40:49 +01:00
Chris Beams
9540d2c81b Replace <code> with {@code} throughout Javadoc
Issue: SPR-10128
2012-12-28 22:36:02 +01:00
Phillip Webb
2cf45bad86 Replace space indentation with tabs
Issue: SPR-10127
2012-12-28 20:49:56 +01:00
Phillip Webb
1762157ad1 Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
    xargs perl -p -i -e "s/[ \t]*$//g" {} \;

Issue: SPR-10127
2012-12-28 20:49:45 +01:00
Juergen Hoeller
b9df7d68d9 Consistent fine-tuning of synchronized and concurrent data structures
In particular, avoiding synchronized Sets and Maps wherever possible (preferring a ConcurrentHashMap even instead of a synchronized Set) and specifying appropriate ConcurrentHashMap initial capacities (even if we end up choosing 16).
2012-12-12 23:46:26 +01:00