SPRING FRAMEWORK CHANGELOG ========================== http://www.springframework.org Changes in version 2.5.5 (2008-06-23) ------------------------------------- General * fixed SCM URL in Maven POMs * "-with-dependencies" distribution includes "jarcontent" folder now (needed for building from the source) * upgraded to Quartz 1.6.1 (includes a fix for the Spring trigger persistence problem that was introduced in 1.6.0) * upgraded to Hibernate 3.3.0 (while retaining compatibility with Hibernate 3.1/3.2) * upgraded to iBATIS SQL Maps 2.3.2 (while retaining compatibility with iBATIS 2.3.0) Package org.springframework.aop * added "proxyClassLoader" property to ProxyFactoryBean, AbstractSingletonProxyFactoryBean and AbstractAutoProxyCreator * CustomizableTraceInterceptor hides proxy class names even in log replacement strings (if hideProxyClassNames=true) * CustomizableTraceInterceptor properly escapes all "\" and "$" symbols in replacement values Package org.springframework.beans * revised GenericTypeAwarePropertyDescriptor for compatibility with IBM's JDK 1.6 (avoiding NPE) * TypeMismatchException shows type description for mismatching JDK proxy values (listing their implemented interfaces) * CustomNumberEditor explicitly removes all inline whitespace from input Strings (for compatibility with French locales) * added "getDescription()" method to BeanDefinition interface (exposing the value of the XML bean description element) * AbstractFactoryBean uses bean ClassLoader for the generation of early singleton proxies * PropertyPlaceholderConfigurer correctly manages resolution of set entries and map keys with modified hash code * fixed DefaultSingletonBeanRegistry's singleton exposure to remove singleton factory after creation of singleton object * DefaultSingletonBeanRegistry only exposes related causes on outermost creation exception (avoiding excessive logging) * DefaultSingletonBeanRegistry only registers same related cause (i.e. same message, same chained cause) once * DefaultListableBeanFactory only registers causes during constructor resolution when resolution eventually fails * DefaultListableBeanFactory checks primary attribute in bean definitions of parent factory as well * fixed DefaultListableBeanFactory to use a post-processing lock (for proper synchronization of annotation scanning) * dependency check "simple" accepts Number, Date, URI, URL and Locale as well (consistent with simple MVC value types) * UnsatisfiedDependencyException preserves full nested exception stacktrace in case of a BeansException * added overloaded BeanComponentDefinition constructor with aliases argument * GenericBeanFactoryAccessor's "getBeansWithAnnotation" performs deep search (including interfaces and target class) * added "findAnnotationOnBean" method to GenericBeanFactoryAccessor, performing a deep search on a specific bean * BeanConfigurerSupport (@Configurable processing) includes type of bean in warn log when called in unconfigured state * restored BeanConfigurerSupport's silent skipping in case of no BeanFactory configured yet Package org.springframework.context * factored out MessageSourceSupport base class from AbstractMessageSource, providing common MessageFormat handling * DelegatingMessageSource resolves message arguments in default messages even if there is no parent MessageSource * MessageSourceResourceBundle exposes Spring-specified locale through overridden "ResourceBundle.getLocale()" method * revised CommonAnnotationBeanPostProcessor's "getResource" method to allow for proper overriding in subclasses * ClassPathBeanDefinitionScanner always accepts explicit bean definition of same name as override for scanned bean * added type="custom" expression="" option to component-scan's "include-filter"/"exclude-filter" * component-scan's "include-filter"/"exclude-filter" entries are validated individually (for Spring IDE) Package org.springframework.core * added assertions to GenericTypeResolver (avoiding NPEs) * factored out generic ConfigurableObjectInputStream class from CodebaseAwareObjectInputStream in RMI support * re-enabled PathMatchingResourcePatternResolver's JarURLConnection handling (accidentally disabled in 2.5.4) Package org.springframework.ejb * "jee:local/remote-slsb" accepts plain object returned from EJBHome create method (for JBoss 4.2 EJB3 compatibility) * added "exposeAccessContext" flag to AbstractSlsbInvokerInterceptor, for WebLogic resource factories with authorization * added "expose-access-context" flag to "jee:local-slsb", "jee:remote-slsb" and "jee:jndi-lookup" Package org.springframework.jdbc * added SimpleDriverDataSource alternative to DriverManagerDataSource, avoiding class loading and synchronization issues * BeanPropertySqlParameterSource uses specific integer/decimal SQL types by default now (e.g. TINYINT, BIGINT, DOUBLE) * introduced SqlXmlHandler abstraction (for the XML support in the Advanced Pack for Oracle Database) * added further SQL error code mapping for MS SQL Server Package org.springframework.jms * SingleConnectionFactory and TransactionAwareConnectionFactoryProxy use JMS API ClassLoader for proxy generation * JmsTemplate properly allows for overriding "getDefaultDestination()" and "getDefaultDestinationName()" * AbstractJmsListeningContainer sets Connection to null on shutdown, allowing for smooth reinitialization * DefaultMessageListenerContainer performs lazy setup in case of any connection exception (also JNDI lookup failure) * DefaultMessageListenerContainer is able to recover all cases where the provider is not available on startup * fixed DefaultMessageListenerContainer to avoid race condition when stopping through lock on unified monitor * added "container-class" attribute to "jms:listener-container" element, for specifying a custom implementation class * MessageListenerAdapter and JmsInvokerServiceExporter use message id as correlation id if no request correlation id set Package org.springframework.jmx * MBeanExporter performs default MBeanServer lookup even when registering notification listeners only Package org.springframework.jndi * added "exposeAccessContext" flag to JndiObjectFactoryBean, for WebLogic resource factories with authorization Package org.springframework.mail * removed overlapping "application/x-pointplus" MIME type for "css" extension from MimeMessageHelper's default mappings Package org.springframework.orm * improved HibernateTransactionManager's InvalidIsolationLevelException exception message (-> SpringTransactionFactory) * added "hibernateManagedSession" flag to HibernateTransactionManager, for working with a custom CurrentSessionContext * documented use of Hibernate StatelessSession with Spring's DataSourceTransactionManager/HibernateTransactionManager * added support for Derby and H2 through Hibernate/OpenJpa/TopLink/EclipseLinkJpaVendorAdapter's "database" property * Hibernate/TopLink/JDO/JPA proxy classes are generated in the ORM provider's ClassLoader (for full visibility in OSGi) * Spring-enriched JPA proxies are created in the application's ClassLoader (making any vendor interfaces work in OSGi) * fixed AbstractEntityManagerFactoryBean's EMF proxy to handle equals/hashCode locally (for correct equals behavior) * iBATIS SqlMapClientFactoryBean supports multiple sql-map-config files and also patterns ("configLocations" property) * iBATIS SqlMapClientFactoryBean supports Spring resource/pattern lookup of sql-map files ("mappingLocations" property) Package org.springframework.remoting * RemoteAccessException explicitly declares serialVersionUID (for serialization compatibility on WebLogic) * (Simple)HttpInvokerServiceExporter uses the ClassLoader of the containing BeanFactory for deserialization * fixed JaxWsClientInterceptor to throw a RemoteConnectFailureException (if applicable) instead of returning it * added support for "username"/"password"/"maintainSession"/"useSoapAction"/etc properties to JaxWsClientInterceptor * added SimpleHttpServerJaxWsServiceExporter, allowing for exposure through a fully configurable Sun JDK 1.6 HttpServer * added "filters" and "authenticator" property to SimpleHttpServerFactoryBean for Sun's JDK 1.6 HttpServer * revised HessianExporter's "debug" feature to work on Hessian 3.0.20+ as well (with input debugging only) Package org.springframework.scheduling * SchedulerFactoryBean's "jobSchedulingDataLocation" feature is compatible with Quartz 1.6.1 now (requiring 1.6.1+) Package org.springframework.scripting * ScriptFactoryPostProcessor ignores any "predictBeanType" failure (in particular reference to currently created bean) * GroovyScriptFactory also converts CompilationFailedException to ScriptCompilationException during type determination Package org.springframework.test * added "prepareApplicationContext(GenericApplicationContext)" template method to AbstractSingleSpringContextTests * added "prepareContext(GenericApplicationContext)" template method to AbstractGenericContextLoader * removed unnecessary "throws Exception" declarations from ReflectionTestUtils * added "getField" and "invokeGetterMethod" methods to ReflectionTestUtils Package org.springframework.transaction * transactional resource synchronization works even for operations triggered during commit (e.g. by JPA PostUpdate) * strengthened warning regarding @Transactional use on interfaces versus classes * "tx:annotation-driven" registers revised TransactionAttributeSourceAdvisor, initializing TransactionInterceptor lazily Package org.springframework.util * publicly exposed "isVisible" method on ClassUtils * added "getField" and simple "findField" method to ReflectionUtils * NumberUtils avoids overflow when converting from BigDecimal to BigInteger * NumberUtils automatically supports JDK 1.5+ localized BigDecimal parsing * added various overloaded methods with a CharSequence argument (as alternative to a String argument) to StringUtils * removed Commons Log usage from SystemPropertyUtils, ClassUtils, FileCopyUtils (avoiding early Log4J initialization) * revised CachingMapDecorator to expose all state representations in a thread-safe manner, even for pure introspection * revised CachingMapDecorator to use weak references for caching only (not losing a value from get) Package org.springframework.validation * fixed DefaultBindingErrorProcessor to register correct "missing field" errors within specified nested path Package org.springframework.web * revised RequestAttributes access from child threads in order to not touch the request object after request completion * DispatcherServlet exposes the Servlet spec's error attributes to error views (for JSP error page compatibility) * HandlerMethodInvoker does not eagerly copy entire model Map in order to avoid lazy initialization of attribute values * Servlet AnnotationMethodHandlerAdapter throws ambiguity exception in case of equivalent mappings with same method name * Portlet AbstractMapBasedHandlerMapping sorts predicates before checking them (according to their natural order) * Portlet DefaultAnnotationHandlerMapping checks default mappings last, independent from order of controller definition * RedirectView uses request's encoding (default ISO-8859-1) if no encoding scheme specified (previous default was UTF-8) * RedirectView considers arrays and collections with eligible values, turning them into multi-value request parameters * RedirectView accepts StringBuffers, StringBuilders, Numbers, Dates, URIs, URLs and Locales as eligible values as well * factored out common temporary byte array handling from AbstractPdfView etc into AbstractView base class * added AbstractPdfStamperView as alternative to AbstractPdfView, operating on an existing document with an AcroForm * fixed AbstractJasperReportsView to fully isolate a model-specified JDBC DataSource (not setting it as view DataSource) * AbstractJasperReportsView gives specified JDBC DataSource precedence over implicit report data value in model * AbstractJasperReportsView proceeds without report data value in case of multiple collections or object arrays * added "autocomplete" attribute to JSP FormTag (for a form-wide setting, as alternative to InputTag's "autocomplete") * JSF DelegatingVariableResolver and SpringBeanFacesELResolver log resolution success at trace level only Changes in version 2.5.4 (2008-04-28) ------------------------------------- General * upgraded to AspectJ 1.6 (while retaining compatibility with AspectJ 1.5.x) * fixed spring-core.jar's manifest to contain correct OSGi Import-Package declaration * removed superfluous DynamicImport-Package declarations from OSGi manifests * all decorator proxies are using identity hash code of the proxy instead of the InvocationHandler hash code now Package org.springframework.aop * fixed various AspectJ expression evaluation bugs through upgrading aspectjweaver.jar to AspectJ 1.6 Package org.springframework.beans * added CharsetEditor for JDK 1.4's "java.nio.charset.Charset" class to default property editors * BeanWrapper explicitly finds default PropertyEditor according to "Editor" suffix convention * deprecated BeanWrapper's fallback to the global JavaBeans PropertyEditorManager * DirectFieldAccessor registers Spring's common default PropertyEditors (like BeanWrapperImpl does) * fixed AbstractBeanDefinition to properly include qualifiers and primary flag in equals comparison * AbstractAutowireCapableBeanFactory's handling of lazy-init singletons is thread-safe again * AbstractAutowireCapableBeanFactory only invokes "predictBeanType" post-processor method for non-null bean Class Package org.springframework.core * introduced InfrastructureProxy interface for resource proxies to be implemented if supposed to be considered as equal * DefaultResourceLoader's ClassPathContextResource also returns ClassPathContextResource from "createRelative" * PathMatchingResourcePatternResolver resolves encoded jar URIs before creating JarFiles (for WebSphere compatibility) * PathMatchingResourcePatternResolver catches NoClassDefFoundError when looking for presence of Equinox classes * SimpleMetadataReaderFactory uses ResourceLoader's ClassLoader for loading annotation classes (for OSGi compatibility) Package org.springframework.jdbc * JdbcTemplate explicitly detects and skips null ResultSets returned from CallableStatement * BeanPropertySqlParameterSource avoids default use of JDBC 3.0's Types.BOOLEAN (for compatibility with MySQL) Package org.springframework.jms * fixed CachedMessageProducer to initialize its deliveryMode, priority and timeToLive fields with the target's settings Package org.springframework.orm * fixed Hibernate 3.2 support to flush updates before queries even within purely Spring-managed JTA transactions * Hibernate3 LocalSessionFactoryBean sets new SpringTransactionFactory as default in case of no JTA TransactionManager Package org.springframework.remoting * JndiRmiClientInterceptor/ProxyFactoryBean work for JNDI objects which do not implement the Remote interface as well Package org.springframework.test * "executeSqlScript" (as in SimpleJdbcTestUtils) allows for multi-line statements, each separated by a semicolon Package org.springframework.transaction * TransactionSynchronizationManager automatically unwraps InfrastructureProxy objects for raw key comparisons * AbstractFallbackTransactionAttributeSource uses concurrent Map for attribute cache in order to avoid lock contention Package org.springframework.validation * AbstractPropertyBindingResult's "formatFieldValue" finds PropertyEditor according to "Editor" suffix convention too * DefaultBindingErrorProcessor registers "missing field" errors within specified nested path (if any) Package org.springframework.web * added "findParameterValue" convenience method to WebUtils * ContextLoader uses its own ClassLoader for loading the default strategy (XmlWebApplicationContext) * added "contextAttribute" property (for WebApplicationContext retrieval) to DelegatingFilterProxy and FrameworkServlet * RequestContext does not fail when WebApplicationContext's ServletContext is null (like in a plain Portlet environment) * HandlerMethodInvoker does not copy whole model Set for session attribute exposure anymore (avoiding lazy value init) * fixed JSP form tags to properly return SKIP_BODY instead of the non-defined EVAL_PAGE (for WebLogic compatibility) Changes in version 2.5.3 (2008-04-06) ------------------------------------- General * replaced junit-4.4.jar in with-dependencies distribution with official JUnit 4.4 jar * spring.jar does not include InstrumentationSavingAgent class anymore (for parent-last class loaders) * spring-context.jar includes optional OSGi imports for "context:annotation-config"'s autodetection purposes * Spring reference documentation covers JSF 1.2 and contains updated Struts 2.0 and Tapestry references * Spring reference documentation covers annotation-based controllers in Portlet chapter Package org.springframework.aop * deprecated ProxyFactoryBean's support for a target as last element in "interceptorNames" in favor of "targetName" * ProxyFactoryBean assumes a target bean if type cannot be determined for last element in "interceptorNames" list * AbstractAutoProxyCreator predicts proxy class as bean type if known already (instead of predicting the target class) * AbstractAutoProxyCreator exposes early singleton proxies (for resolving circular reference between proxied beans) * "bean(...)" pointcut designator matches against bean name aliases as well, not just against the canonical bean name Package org.springframework.beans * CharacterEditor's "allowEmpty" only translates empty String to null, keeping a single space String as space character * CustomNumberEditor treats number with leading zeros as decimal (removed unwanted octal support while preserving hex) * GenericTypeAwarePropertyDescriptor respects "propertyEditorClass" specified on original PropertyDescriptor * renamed ListableBeanFactory's "includePrototypes" flag to "includeNonSingletons" (affects javadoc only) * added "getEarlyBeanReference" hook to SmartInstantiationAwareBeanPostProcessor interface * AbstractBeanFactory does not log full exception stack trace (at debug level) on FactoryBean type check anymore * AbstractAutowireCapableBeanFactory allows for resolving circular reference between beans wrapped by BeanPostProcessors * DefaultListableBeanFactory passes full inherited AccessControlContext to the AccessController for bean creation * DefaultListableBeanFactory does not eagerly initialize target beans when autowiring a PriorityOrdered post-processor * PropertyPlaceholderConfigurer supports nested keys in placeholder keys as well (e.g. "${db.${environment}}") * PropertyPlaceholderConfigurer works properly even in case of default-autowire="byType" with FactoryBeans involved * fixed PropertyPlaceholderConfigurer's "nullValue" handling to avoid NPE for nested value * added "ignoreUnresolvableEditors" property to CustomEditorConfigurer, allowing to ignore type/editor classes not found * XmlBeanDefinitionReader's "getValidationModeForResource" method is protected now in order to allow for overriding * AbstractSimpleBeanDefinitionParser properly ignores namespace declaration attributes ("xmlns"/"xmlns:") * AutowiredAnnotationBeanPostProcessor processes @Autowired annotation on most specific method only (when overriding) * AutowiredAnnotationBeanPostProcessor marks @Autowired bean properties as processed (for @Required to accept them) Package org.springframework.context * ReloadableResourceBundleMessageSource is able to detect updates for a properties file stored in a jar/zip as well * AbstractApplicationContext's temporary ClassLoader explicitly excludes types to match (for OSGi LTW compatibility) * restored support for null location array argument in ClassPathXmlApplicationContext (for Apache CXF compatibility) * added "registration" attribute to mbean-export element, accepting "failOnExisting"/"ignoreExisting"/"replaceExisting" * CommonAnnotationBeanPostProcessor processes @Resource annotation on most specific method only (when overriding) * revised default annotation post-processor ordering to apply most specific processors first Package org.springframework.core * Conventions detects special generated subclasses (e.g. by OpenJPA) and derives the variable name from the superclass * revised LocalVariableTableParameterNameDiscoverer to avoid potential NPE in case of no parameter names found on Java 5 * revised DefaultValueStyler (and deprecated ReflectiveVisitorHelper) for better performance and no class loader leaks * StaticLabeledEnumResolver uses weak references to LabeledEnum class in order to avoid class loader leaks * added "lastModified()" method to Resource interface, for abstract access to the last-modified timestamp * ClassPathResource and UrlResource use the last-modified timestamp of the archive file for jar/zip contents * PathMatchingResourcePatternResolver sets "useCaches=false" on any JarURLConnection that it opens for path matching * PathMatchingResourcePatternResolver detects WebSphere 6.1 "bundleresource:" URLs and resolves them for path matching Package org.springframework.ejb * added "cacheSessionBean" flag to SimpleRemoteStatelessSessionProxyFactoryBean, for caching the session bean object * added "cache-session-bean" attribute to "jee:remote-slsb" configuration element * Spring 2.5 "jee:*" config elements use resource-ref="true" by default (non-resource-ref names will still work as well) Package org.springframework.jdbc * JndiDataSourceLookup uses "resourceRef"=true by default (being able to resolve J2EE "jdbc/myDb" ENC names by default) * NativeJdbcExtractorAdapter only processes DatabaseMetaData Connection if non-null (for WebLogic cluster compatibility) * fixed SQLException translation for IBM DB2 and MS SQL to operate on error codes first, just falling back to SQL state * added MySQL NDB error codes and further DB2 error codes to default "sql-error-codes.xml" file * factored out common AbstractColumnMaxValueIncrementer base class from Derby/Hsql/MySQLMaxValueIncrementer * added DB2MainframeSequenceMaxValueIncrementer for DB2/390 and DB2/400 (differing from DB2 UDB for Unix and Windows) * added "wrapAsLob" property to DefaultLobHandler, for passing Blob/Clob instances to the JDBC driver (for PostgreSQL) * DefaultLobHandler's "streamAsLob" setting (requires JDBC 4.0) applies to byte array and String arguments as well * JdbcTemplate creates LinkedHashMap (instead of plain HashMap) as default results Map returned from "call" operation * JdbcDaoSupport does not override specified JdbcTemplate on subsequent "setDataSource" call for same DataSource * NamedParameterJdbcTemplate ignores Postgres-style "::" casting operator (i.e. not treated as named parameter) * SimpleJdbcInsert supports "autoGeneratedKey" simulation using "insert ... returning" for PostgreSQL 8.2 and later * SimpleJdbcCall supports metadata lookup of procedure columns for PostgreSQL (requires JDBC driver 8.3 or later) Package org.springframework.jms * SingleConnectionFactory accepts "Connections.setClientID" calls with the same client ID as specified on the factory * SingleConnectionFactory accepts further "Connection.setExceptionListener" calls in "reconnectOnException" mode * introduced CachingConnectionFactory (as subclass of SingleConnectionFactory) for JMS 1.1 session and producer pooling * SimpleMessageListenerContainer registers itself as ExceptionListener for automatic Connection recovery * added "runningAllowed()" template method to DefaultMessageListenerContainer, allowing subclass to temporarily suspend * DefaultMessageListenerContainer scales concurrent invokers eagerly in case of a sudden burst (revised idle handling) * DefaultMessageListenerContainer uses a "maxMessagesPerTask" default of 10 when associated with a ScheduledTaskExecutor * DefaultMessageListenerContainer propagates JMSExceptions thrown from a listener, potentially triggering recovery * MessageListenerAdapter propagates JMSExceptions thrown from listener method as-is (no wrapping in runtime exception) * MessageListenerAdapter invokes target (SessionAware)MessageListener immediately, not extracting the content upfront * added "cache" attribute to "jms:listener-container" configuration element, for customizing the resource cache level Package org.springframework.jmx * MBeanExporter's autodetection does not cause CannotLoadBeanClassException for lazy-init beans (Spring 2.0 compatible) Package org.springframework.jndi * JndiLocatorSupport tries fallback lookup for originally specified JNDI name if resource-ref adapted name wasn't found * JndiObjectFactoryBean exposes the bean ClassLoader as thread context ClassLoader (if necessary) Package org.springframework.mock * MockHttpServletResponse's "encodeURL" allows for central overriding in subclasses (affecting "encodeRedirectURL" too) * SimpleNamingContext's "createSubcontext" works correctly for given subcontext names without trailing slash as well Package org.springframework.orm * XxxDaoSupport does not override specified XxxTemplate on subsequent "setZzzFactory" call for same factory * added "executeWithNewSession" and "executeWithNativeSession" methods to HibernateTemplate * revised EntityManagerFactoryInfo handling to autodetect all EntityManager interfaces if no JpaVendorAdapter specified * PersistenceAnnotationBeanPostProcessor processes annotations on most specific method only (when overriding) Package org.springframework.remoting * revised (Simple)Hessian/BurlapServiceExporter's handling of non-POST requests (avoiding unnecessary warnings) Package org.springframework.scheduling * added "waitForTasksToCompleteOnShutdown" property to ThreadPoolTaskExecutor * changed ThreadPoolTaskExecutor's default behavior to shutdown immediately, not waiting for scheduled tasks * ThreadPoolTaskExecutor extends CustomizableThreadFactory for common bean properties and uses itself as default factory * ThreadPoolTaskExecutor uses its bean name as default thread name prefix (analogous to DefaultMessageListenerContainer) * MethodInvokingRunnable logs target exception directly at error level (instead of InvocationTargetException wrapper) * MethodInvokingJobDetailFactoryBean propagates invocation exceptions as non-JobExecutionExceptions (for error logging) * DelegatingJob propagates exceptions as-is instead of wrapping them in JobExecutionExceptions (for error logging) Package org.springframework.scripting * ResourceScriptSource is able to detect updates for a script file stored in a jar/zip as well Package org.springframework.test * @IfProfileValue correctly checked against concrete test class, even in case of overridden test methods * @IfProfileValue annotation without specified value checks against presence (non-null value) of the given profile key * "executeSqlScript" (as in SimpleJdbcTestUtils) allows for multiple statements per line, separated by semicolons * SpringJUnit4ClassRunner catches AssumptionViolatedException in @Before methods (analogous to standard JUnit 4.4) * SpringJUnit4ClassRunner executes befores/afters in same thread for test method with JUnit timeout (-> transactions) * TransactionalTestExecutionListener is able to manage concurrent transactions for different test methods (with timeout) * TransactionalTestExecutionListener reobtains transaction manager for every transaction (picking up context changes) * fixed Abstract(Transactional)JUnit(38/4)SpringContextTests classes to be actually marked as abstract Package org.springframework.transaction * JtaTransactionManager" checks JNDI location "java:appserver/TransactionManager" for GlassFish's primary TM handle Package org.springframework.util * "ClassUtils.resolveClassName" preserves the original root cause in the rethrown IllegalArgumentException * NumberUtils treats number with leading zeros as decimal (removed unwanted octal support while preserving hex) * MethodInvoker scans all declared methods (of any visibility), being able to invoke protected/private methods as well * added "getChildElementsByTagNames" method with tag names Collection argument to DomUtils Package org.springframework.validation * factored out AbstractErrors base class from AbstractBindingResult, providing common access to evaluated errors * added "getRawFieldValue" and "findEditor" methods to BindingResult interface (for a completely decoupled BindStatus) * fixed AbstractPropertyBindingResult's "getFieldType" to correctly apply nested path to field name * added convenience constructors to ObjectError and FieldError Package org.springframework.web * ContextLoader accepts system property placeholders in "contextConfigLocation" value (again) * OncePerRequestFilter cleans up its marker attribute at the end of each outer request (for Portlet compatibility) * RequestContextFilter supports "threadContextInheritable" init-param (analogous to DispatcherServlet) * HttpRequestHandlerServlet translates HttpRequestMethodNotSupportedException into HTTP status code 405 * DispatcherServlet translates HttpRequestMethodNotSupportedException into HTTP status code 405 by default * introduced WEB_APPLICATION_CONTEXT_ATTRIBUTE in RequestContext, for overriding the DispatcherServlet context * ControllerClassNameHandlerMapping detects @Controller beans by default as well * ControllerClassNameHandlerMapping registers plain path for multi-action controllers too ("/welcome/*" + "/welcome") * added ControllerBeanNameHandlerMapping, deriving URL paths from bean names for well-known controller types * AnnotationMethodHandlerAdapter's @RequestMapping matching is deterministic independent from the declared methor order * AnnotationMethodHandlerAdapter accepts @RequestParam annotations for @InitBinder methods as well * AnnotationMethodHandlerAdapter always exposes BindingResult objects for model attributes which are binding candidates * AnnotationMethodHandlerAdapter throws clear IllegalStateException in case of invalid BindingResult argument * Portlet AnnotationMethodHandlerAdapter supports Servlet ModelAndView and View objects as handler method return values * default attribute names for annotated handler method return values are consistently derived from the declared type * added "exposedContextBeanNames" property to InternalResourceView(Resolver), for exposing specific Spring beans only * InternalResourceView does not enforce ApplicationContext to be set anymore (allowing for "getServletContext" checking) * JstlView, Tiles(Jstl)View and AbstractJasperReportsView expose current RequestContext's MessageSource for localization * JSP form tags do not autogenerate id in case of empty id specified (empty id signals no id to be rendered) * JSP OptionTag and OptionsTag support "id" attribute now, analogous to RadioButton(s)Tag and Checkbox(es)Tag * added standard HTML "target" attribute to JSP FormTag, for submitting to another window/frame * fixed JSP LabelTag to render valid default "for" attribute for collection/map paths as well * fixed AbstractJasperReportsView to build exception messages for the specific sub-report location Changes in version 2.5.2 (2008-02-29) ------------------------------------- General * various reference documentation revisions (e.g. updated transaction management chapter) * removed outdated showcases sample applications from Spring distribution * spring-context.jar does not include InstrumentationSavingAgent class anymore (for parent-last class loaders) Package org.springframework.aop * AbstractRegexpMethodPointcut matches against target class as well, not just against method's declaring class * ProxyFactoryBean and AbstractAutoProxyCreator check autodetected proxy interfaces for visibility in the ClassLoader * Cglib2AopProxy properly detects overridden "finalize()" methods, never dispatching them to the interceptor chain * CustomizableTraceInterceptor properly escapes method names and exception messages for regex parsing (wrt "$" signs) * marked AbstractRefreshableTargetSource's status accessors as synchronized * AbstractBeanFactoryBasedTargetSourceCreator applies containing BeanFactory's configuration to internal BeanFactory * AbstractBeanFactoryBasedTargetSourceCreator creates an independent internal BeanFactory per target bean * deprecated ClassLoaderAnalyzerInterceptor and associated ClassLoaderUtils class * reintroduced AopNamespaceUtils.registerAutoProxyCreatorIfNecessary(ParserContext,Object) for Spring 2.0 compatibility Package org.springframework.beans * introduced PropertyAccessorFactory facade for obtaining BeanWrapper and direct field accessor instances * deprecated BeanWrapper's "setWrappedInstance" method in favor of recreating a BeanWrapper per target instance * BeanWrapperImpl trims an enum candidate value before matching it against the available enum values * BeanWrapperImpl resolves the target type for a generically typed bean property, performing appropriate type conversion * StringArrayPropertyEditor (for comma-delimited splitting of array elements) registered for short[], int[], long[] too * CustomDateEditor and CustomNumberEditor preserve original ParseException as root cause of IllegalArgumentException * MethodInvokingFactoryBean falls back to interpreting specified arguments as single method argument of array type * deprecated RefreshablePagedListHolder class and associated PagedListSourceProvider interface * added "getOriginatingBeanDefinition()" method to BeanDefinition interface, exposing the decorated definition (if any) * PropertyOverrideConfigurer is able to properly override target bean definitions behind a scoped proxy decorator * added "nullValue" property to PropertyPlaceholderConfigurer, allowing for resolving specific Strings into a null value * CustomEditorConfigurer and CustomScopeConfigurer accept editor/scope values as class names as well * factored out AliasRegistry/SimpleAliasRegistry from BeanDefinitionRegistry/AbstractBeanFactory * introduced SimpleBeanDefinitionRegistry implementation for bean definition reader testing * "registerAlias" allows for overriding as long as bean definition overriding is allowed * added convenient "autowireBean(Object existingBean)" method to AutowireCapableBeanFactory * AbstractAutowireCapableBeanFactory removes singleton if created for type check in case of circular reference issues * AbstractAutowireCapableBeanFactory applies specified TypeConverter to bean references as well (not just to literals) * AbstractAutowireCapableBeanFactory resolves the target type for a generically typed dependency (method parameter) * AbstractAutowireCapableBeanFactory's "applyBeanPropertyValues" fully initializes the BeanWrapper used for binding * AbstractAutowireCapableBeanFactory's "applyBeanPropertyValues" and "configureBean" use a cached merged bean definition * fixed AbstractAutowireCapableBeanFactory's "configureBean" (@Configurable) to avoid bean name creation for inner beans * fixed AbstractAutowireCapableBeanFactory to skip invocation of InstantiationAwareBeanPostProcessors for null bean * fixed AbstractAutowireCapableBeanFactory to always resolve the bean class before a FactoryBean type check * added "freezeConfiguration()" method to Configurable/DefaultListableBeanFactory, allowing for eager metadata caching * revised bean destruction logging to log at WARN level with exception toString only (full exception at DEBUG level) * AutowiredAnnotationBeanPostProcessor resolves the target type for a generically typed dependency (method parameter) * fixed AutowiredAnnotationBeanPostProcessor to correctly cache a collection with a single autowired bean as element * fixed AutowiredAnnotationBeanPostProcessor to not cache special dependencies such as request and session references * deprecated AbstractBeanDefinition's Spring 1.2 style "setSingleton" method in favor of Spring 2.0's "setScope" * deprecated BeanDefinitionBuilder's "addConstructorArg" in favor of the consistently named "addConstructorArgValue" * deprecated various rarely used BeanDefinitionBuilder methods in favor of settings on the raw BeanDefinition object * added overloaded "genericBeanDefinition(beanClass)" method and "setParentName" method to BeanDefinitionBuilder * added support for "(scope)" key to PropertiesBeanDefinitionReader: e.g. "myBean.(scope)=prototype" * refactored AbstractBeanConfigurerAspect into Abstract(InterfaceDriven)DependencyInjectionAspect * nested XML decoration elements (e.g. "aop:scoped-proxy") are explicitly rejected if no corresponding handler present * InitDestroy/Autowired/Common/PersistenceAnnotationBeanPostProcessor perform appropriate debug logging * factored out generic SpringBeanELResolver and SimpleSpringBeanELResolver from "web.jsf.SpringBeanFacesELResolver" Package org.springframework.context * added "getId()" method to ApplicationContext interface, with corresponding "setId" in AbstractApplicationContext class * moved CONFIG_LOCATION_DELIMITERS constant from ConfigurableWebApplicationContext to ConfigurableApplicationContext * fixed AbstractApplicationContext to correctly ignore FactoryBean results that implement the Lifecycle interface * AbstractApplicationContext processes Lifecycle callbacks in the order of bean creation by default * AbstractApplicationContext explicitly freezes its bean factory configuration at the end of the "refresh()" phase * exposed "allowBeanDefinitionOverriding"/"allowCircularReferences" properties in AbstractRefreshableApplicationContext * factored out AbstractRefreshableConfigApplicationContext base class for common handling of specified config locations * ClassPathXmlApplicationContext and FileSystemXmlApplicationContext allow for bean-style configuration * StaticApplicationContext builds GenericBeanDefinitions by default (instead of RootBeanDefinitions) * added "initApplicationContext(ApplicationContext)" template method to ApplicationObjectSupport * ClassPathBeanDefinitionScanner detects scoped-proxy bean definitions as compatible (in case of duplicate scanning) * refactored ClassPathBeanDefinitionScanner into various template methods (for easier overriding) * refactored ComponentScanBeanDefinitionParser into various template methods (for easier overriding) * ComponentScanBeanDefinitionParser includes annotation config processors in nested composite component * "context:component-scan" resolves "${...}" placeholders in package paths against system properties * "context:component-scan" explictly ignores directories that accidentally match a specified custom resource pattern * fixed "context:load-time-weaver" to not break post-processor detection in case of Spring jars deployed as shared libs * added "context:property-override" configuration element, as a sibling to "context:property-placeholder" Package org.springframework.core * introduced Named(Inheritable)ThreadLocal, used throughout the framework for self-descriptive thread-bound context * added "getParameterName()" method to MethodParameter, activated through a ParameterNameDiscoverer * factored out GenericTypeResolver from BridgeMethodResolver and GenericCollectionTypeResolver * factored out DecoratingClassLoader base class from OverridingClassLoader and ShadowingClassLoader * added "isReadable()" method to Resource interface, giving a readability hint upfront (supported by FileSystemResource) * fixed ClassMetadataReadingVisitor (as used by "context:component-scan") to correctly ignore *usage* of inner classes Package org.springframework.dao * PersistenceExceptionTranslationPostProcessor extends ProxyConfig and applies its settings to newly created proxies Package org.springframework.ejb * Local/SimpleRemoteSlsbInvokerInterceptor use EJB(Local)Home for EJB 2.x detection, for WebSphere compatibility * SimpleRemoteSlsbInvokerInterceptor properly detects CORBA connect failures on the IBM JVM (for WebSphere EJB access) Package org.springframework.instrument * added public "isInstrumentationAvailable()" method to InstrumentationLoadTimeWeaver, avoiding direct access to agent * fixed ShadowingClassLoader to not attempt defining a package in case of a class in the default package Package org.springframework.jca * ResourceAdapterApplicationContext registers BootstrapContext as resolvable dependency type (for @Autowired) * ResourceAdapterApplicationContext registers WorkManager as lazily resolvable dependency type (for @Autowired) * added "workManagerName" property to WorkManagerTaskExecutor, for J2EE env lookups in JNDI (e.g. a Geronimo gbean-ref) * introduced JBossWorkManagerTaskExecutor as adapter for the JBoss JCA WorkManager (analogous to CommonJ) * introduced GlassFishWorkManagerTaskExecutor as adapter for the GlassFish JCA WorkManager (analogous to CommonJ) Package org.springframework.jdbc * DriverManagerDataSource's "driverClassName" throws IllegalStateException instead of CannotGetJdbcConnectionException * added "defaultTransactionIsolationName" property to LazyConnectionDataSourceProxy * SQLStateSQLExceptionTranslator translates "01*" data truncation codes into DataIntegrityViolationException * SQLStateSQLExceptionTranslator translates "61*" deadlock codes into ConcurrencyFailureException * SQLErrorCodesSQLExceptionTranslator falls back to SQL state translation for IBM DB2 and MS SQL by default * added further default "sql-error-codes.xml" mappings for MS SQL, MySQL, PostgreSQL and Oracle * DatabaseStartupValidator lets startup continue instead of 'busy' waiting in case of thread interruption * JdbcTemplate falls back to type VARCHAR for a null value in case of an unknown SQL type specified against IBM DB2 * JdbcTemplate uses "PreparedStatement.setString" in case of LONGVARCHAR and CLOB (if given a String value) * fixed CallMetaDataContext to skip SqlParameter objects without name (avoiding NPE) * merged AbstractBeanPropertyRowMapper into concrete BeanPropertyRowMapper class * removed BeanPropertyRowMapper's "newInstance" method to avoid confusion with ParameterizedBeanPropertyRowMapper * revised BeanPropertyRowMapper to use JavaBean property introspection instead of expecting field/setter name matches * factored out "initBeanWrapper"/"getColumnValue" template methods in BeanPropertyRowMapper, allowing for customization * BeanPropertyRowMapper shares ResultSet value access logic with SingleColumnRowMapper * BeanPropertyRowMapper and SingleColumnRowMapper perform Oracle-specific "getObject" checks for unknown specified types * added ParameterizedSingleColumnRowMapper with a convenient "newInstance" method to specify the required type only once * BeanPropertySqlParameterSource derives a default SQL type from the corresponding property type (for typed null values) Package org.springframework.jms * improved SimpleMessageConverter's exception message for an unsupported message payload * DefaultMessageListenerContainer logs listener setup failures at INFO instead of ERROR level * DefaultMessageListenerContainer allows for specifying a callback on "stop", for a notification after actual stopping * DefaultMessageListenerContainer lets shutdown continue instead of 'busy' waiting in case of thread interruption * fixed DefaultMessageListenerContainer to correctly process "sessionTransacted=true" in case of locally exposed Session * SimpleMessageListenerContainer exposes listener Session as thread-bound resource for JmsTemplate calls (like DMLC) * deprecated ServerSessionMessageListenerContainer in favor of DefaultMessageListenerContainer/JmsMessageEndpointManager * DefaultJmsActivationSpecFactory is compatible with WebSphere MQ 6.0.2.1 as well now Package org.springframework.jmx * factored out "doUnregister(objectName)" and "onRegister(objectName,mbean)" methods in MBeanRegistrationSupport * MBeanExporter actually sets "exposeManagedResourceClassLoader" to "true" by default (matching the 2.5 javadoc now) * MBeanExporter explicitly removes all of its registered NotificationListeners from the target MBeanServer on shutdown * introduced NotificationListenerRegistrar for registering a listener with any MBean on any MBeanServer(Connection) Package org.springframework.mail * added "text/csv" to ConfigurableMimeFileTypeMap's and thus MimeMessageHelper's default MIME mappings Package org.springframework.mock * added "getServletContext()" method to MockHttpServletRequest (not available in the HttpServletRequest interface) Package org.springframework.orm * introduced "postProcessMappings" template method in Hibernate LocalSessionFactoryBean * fixed Hibernate AnnotationSessionFactoryBean to allow for mixed mapping sources (despite 2.5.1's "buildMappings" call) * HibernateTemplate exposes the "org.hibernate.event.EventSource" and "org.hibernate.classic.Session" interfaces as well * introduced "EntityManagerFactoryUtils.closeEntityManager" method that protects against exceptions thrown from close * Hibernate/Jpa/JdoTransactionManager explicitly rollback an active transaction before closing when begin failed * fixed TopLinkTransactionManager to correctly expose the underlying JDBC Connection in read-write transaction scenarios * JDO/JPA factories check autodetected proxy interfaces for visibility in the ClassLoader (for WebSphere compatibility) * added "entityManagerFactoryInterface" property to AbstractEntityManagerFactoryBean, as alternative to autodetection * added "getEntityManagerFactoryInterface()" to JpaVendorAdapter (for WebSphere compatibility of OpenJpaVendorAdapter) * added "getPersistenceProviderRootPackage()" to JpaVendorAdapter, for excluding provider classes from class overriding * introduced EclipseLinkJpaVendorAdapter and EclipseLinkJpaDialect, supporting EclipseLink 1.0 M4 or higher Package org.springframework.remoting * factored out RemotingSupport base class from RemoteAccessor and RemoteExporter * (Jndi)RmiClientInterceptor properly detects CORBA connect failures on the IBM JVM * HessianClientInterceptor and BurlapClientInterceptor expose the bean ClassLoader as thread context CL (if necessary) * added overloaded "executeRequest" method with original MethodInvocation argument to HttpInvokerClientInterceptor * added "hostname" bean property to SimpleHttpServerFactoryBean, for a specific network address to bind to Package org.springframework.scripting * introduced "ScriptFactory.requiresScriptedObjectRefresh(ScriptSource)" for object refresh even after a type check call * GroovyScriptFactory and JRubyScriptFactory refresh scripted object instances even after an intermediate type check * introduced "ScriptSource.suggestedClassName()" for dynamic Groovy scripts that do not define a class themselves * GroovyScriptFactory uses resource filename (for files) or bean name (for inline scripts) as suggested class name * added "depends-on" attribute to "lang:bsh/groovy/jruby" configuration element Package org.springframework.test * TestContextManager ignores default TestExecutionListeners that cannot be instantiated (e.g. due to spring-tx missing) * AbstractJUnit38SpringContextTests runs "afterTestMethod" callbacks even when "beforeTestMethod" or "setUp" failed * AbstractTestNGSpringContextTests executes Spring default callbacks in any case (marked with "alwaysRun = true") * added configurable "sqlScriptEncoding" property to AbstractTransactionalXxxSpringContextTests (for reading scripts) Package org.springframework.util * revised ConcurrencyThrottleSupport's interruption handling to throw an IllegalStateException instead of 'busy' waiting * deprecated ResponseTimeMonitor and PerformanceMonitorListener classes in favor of custom classes for specific needs Package org.springframework.validation * DataBinder's "initDirectFieldAccess()" sets the "extractOldValueForEditor" flag by default, analogous to bean access Package org.springframework.web * ServletRequestAttributes keeps hold onto the original session if a "request.getSession" call suddenly returns null * added "setConfigLocation" method to ConfigurableWeb/PortletApplicationContext, accepting an init-param style value * added "initServletContext(ServletContext)" template method to WebApplicationObjectSupport * optimized ServletContextResource's and PortletContextResource's "exists()" check to avoid unnecessary stream opening * Commons(Portlet)MultipartResolver catches and logs any exception thrown from file item cleanup (not propagating it) * introduced NativeWebRequest and MultipartRequest interfaces for even finer-grained generic request access options * introduced FacesRequestAttributes adapter, with attributes access falling back to current JSF FacesContext by default * added "dispatchOptionsRequest/TraceRequest" properties to FrameworkServlet, for dispatching all HTTP request methods * deprecated PathMap attribute and CommonsPathMapHandlerMapping class in favor annotation-based request mapping * deprecated ThrowawayController and ThrowawayControllerHandlerAdapter in favor annotation-based controllers * @RequestMapping's "method" attribute supported at type level as well, expressing restriction for entire handler * @RequestMapping's "params" attribute supported at type level for Servlets, expressing precondition for entire handler * @RequestMapping's "params" attribute supported at type level for Portlets, mapping mode+params onto specific handler * @RequestMapping annotation supports "!myParam" expressions for non-presence of a specific parameter as well * introduced WebArgumentResolver interface and "customArgumentResolver(s)" property on AnnotationMethodHandlerAdapter * factored out common HandlerMethodResolver/Invoker classes from Servlet/Portlet AnnotationMethodHandlerAdapter * AnnotationMethodHandlerAdapter does not restrict supported HTTP methods by default (allowing for PUT, DELETE as well) * AnnotationMethodHandlerAdapter narrows through method name resolution even for a set of equal non-empty mappings * AnnotationMethodHandlerAdapter resolves the target type for a generically typed @RequestParam/@ModelAttribute argument * AnnotationMethodHandlerAdapter properly allows for resolving a Principal argument to null (in case of none defined) * AnnotationMethodHandlerAdapter resolves InputStream/OutputStream and Reader/Writer subclasses as well * added "synchronizeOnSession" property to AnnotationMethodHandlerAdapter, analogous to AbstractController * fixed AnnotationMethodHandlerAdapter to avoid NPE in case of plain model attribute returned from handler method * Servlet AnnotationMethodHandlerAdapter sends HTTP 404 instead of throwing IllegalState if no handler method found * Portlet AnnotationMethodHandlerAdapter throws UnavailableException instead of IllegalState if no handler method found * added "prepareResponse"/"generatesDownloadContent" methods to AbstractView, for HTTPS cache header workaround for IE * AbstractPdfView and Abstract(J)ExcelView participate in AbstractView's HTTPS cache header workaround for IE * AbstractJasperReportsView does not perform a hard response reset, in favor of AbstractView's HTTPS cache workaround * AbstractTemplateView catches "HttpServletResponse.getContentType()" exceptions (for JBoss Portal compatibility) * InternalResourceView only exposes forward attributes when running on Servlet <2.5 (for GlassFish compatibility) * InternalResourceView detects circular dispatching to the same view even in case of pattern matches for same handler * InternalResourceView prevents dispatch to same handler path only if the "preventDispatchLoop" flag is set to "true" * InternalResourceViewResolver sets "preventDispatchLoop" to "true" for conventional name-based View instances only * JstlView exposes a JSTL-aware MessageSource even for a custom MessageSource passed in through the constructor * re-added AbstractDataBoundFormElementTag's COMMAND_NAME_VARIABLE_NAME in deprecated form (Spring 2.0.x compatibility) * made FormTag's MODEL_ATTRIBUTE_VARIABLE_NAME public (as replacement of COMMAND_NAME_VARIABLE_NAME) * JSP Checkbox(es)Tag and RadioButton(s)Tag render label as HTML label element after input element (for HTML compliance) * JSP CheckboxesTag and RadioButtonsTag compare raw item / raw Map key for selection check as well * JSP SelectTag and OptionsTag compare raw Map key for selection check as well Changes in version 2.5.1 (2008-01-09) ------------------------------------- General * refined PDF formatting settings for the reference documentation * added coverage of JAX-WS support to the reference documentation * added section on J2EE RAR deployment to the reference documentation * moved "org.springframework.web.bind/multipart" packages from spring-web.jar to spring-webmvc.jar * updated AspectJ jar in "-with-dependencies" distribution to AspectJ 1.5.4 * updated Groovy jar in "-with-dependencies" distribution to Groovy 1.5.1 * updated Hessian jar in "-with-dependencies" distribution to Hessian 3.1.3 * updated iText jar in "-with-dependencies" distribution to iText 2.0.7 * updated POI jar in "-with-dependencies" distribution to POI 3.0.1 Package org.springframework.aop * ProxyFactory caches CGLIB proxies only when underlying (Smart)ClassLoader does not indicate a reloadable Class * added "logTargetClassInvocation" property to AbstractMonitoringInterceptor, for logging the target invocation trace Package org.springframework.beans * ConfigurablePropertyAccessor extends the TypeConverter interface (moved up from BeanWrapper interface) * BeanWrapper supports well-known collection implementation types for generic element conversion again (like Spring 2.0) * TypeConverterDelegate protects its text conversion step against PropertyEditors which don't support "setValue" calls * factored out FactoryBeanRegistrySupport base class from AbstractBeanFactory and AbstractAutowireCapableBeanFactory * optimized AbstractBeanFactory's access to cached FactoryBean-exposed objects, avoiding unnecessary locks * ConstructorResolver prefers concrete class matches over interface matches at the same level when checking arguments * revised accidental public exposure of "isPrimary" method in ConfigurableListableBeanFactory/DefaultListableBeanFactory * moved "resolveDependency" implementation from AbstractAutowireCapableBeanFactory down to DefaultListableBeanFactory * revised DefaultListableBeanFactory's "resolveDependency" exceptions with respect to clarity and context inclusion * DefaultListableBeanFactory does not eagerly initialize FactoryBeans for type checks even with factory-bean reference * DefaultListableBeanFactory throws descriptive exception in case of factory-bean circular reference * DefaultListableBeanFactory supports ObjectFactory indirection for resolvable dependencies * DefaultListableBeanFactory always resolves bean class before checking a bean definition as autowire candidate * AbstractBeanDefinition stores and exposes the originating Resource (rather than just the resource description) * XmlBeanDefinitionReader detects recursive loading of the same resource (e.g. through import cycles) * DefaultBeanDefinitionDocumentReader sends ImportDefinition events containing the actually resolved Resource objects * DefaultDocumentLoader includes the JAXP IllegalArgumentException in the rethrown ParserConfigurationException * ClassPathBeanDefinitionScanner marks default init/destroy methods as not enforced (accepting beans without those) * SingletonBeanFactoryLocator falls back to a single bean of type BeanFactory (if any) when given a null locator key * SingletonBeanFactoryLocator removes bean factory group definition if its initialization fails * factored out protected "getTargetBean" method in ObjectFactoryCreatingFactoryBean (for easier overriding) * revised BeanConfigurerSupport to allow for usage as a delegate as well, not just as a base class * revised BeanConfigurerSupport to re-initialize its default BeanWiringInfoResolver for each context refresh * fixed AutowiredAnnotationBeanPostProcessor to properly cache dependencies that do not correspond to a registered bean * annotation processors detect already managed methods/fields, avoiding double invocation in case of multiple processors * explicit annotation processors override implicit default processors (as built by annotation-config / component-scan) Package org.springframework.cache * added "cacheManagerName" property to EhCacheManagerFactoryBean Package org.springframework.context * fixed AbstractApplicationContext to only send ContextStoppedEvent in case of "stop()" (i.e. not for "close()") * fixed AbstractApplicationContext to always detect LoadTimeWeaverAwareProcessor in the local ClassLoader (for OSGi) * ClassPath/FileSystemXmlApplicationContext perform early check for null elements in config location array * added "addMessages(Map, Locale)" method to StaticMessageSource, for bulk adding messages * ContextTypeMatchClassLoader does not generally exclude classes in the "org.springframework" package anymore * DefaultContextLoadTimeWeaver only chooses GlassFishLoadTimeWeaver when running in the EAR ClassLoader * DefaultContextLoadTimeWeaver removes all registered transformers from the VM Instrumentation object (if applicable) * CommonAnnotationBeanPostProcessor properly ignores @Resource-annotated JAX-WS WebServiceContext references * AnnotationBeanNameGenerator (used by "context:component-scan") detects default name values in custom annotation types * ClassPathScanningCandidateComponentProvider ("context:component-scan") ignores non-static inner and local classes * "context:property-placeholder" configuration element does not require a "location" attribute (for system properties) Package org.springframework.core * introduced SmartClassLoader marker interface, declaring a "boolean isClassReloadable(Class clazz)" operation * OverridingClassLoader excludes the "oracle." package by default as well (e.g. for TopLink's custom annotations) * MethodParameter uses reflection to obtain parameter annotations (for compatibility with the IBM 1.4.2 VM's debug mode) * LocalVariableTableParameterNameDiscoverer caches parameter names per method and obtained ASM ClassReaders per class * added "getEnclosingClassName()", "hasEnclosingClass()" and "isIndependent()" methods to ClassMetadata interface Package org.springframework.ejb * "jee:local-slsb" and "jee:remote-slsb" work for EJB3 Session Beans as well (as alternative to "jee:jndi-lookup") * introduced EJB3-compliant SpringBeanAutowiringInterceptor for processing Spring's @Autowired in EJB3 SBs/MDBs Package org.springframework.instrument * InstrumentationLoadTimeWeaver allows for operating on a pre-defined ClassLoader and for removing transformers again * TomcatInstrumentableClassLoader always passes local ClassLoader into ClassFileTransformers (makes AspectJ LTW work) * ShadowingClassLoader excludes the "com.ibm." package by default as well (for IBM JDK classes, DB2 JDBC driver, etc) Package org.springframework.jdbc * fixed JdbcUtils to not access the DatabaseMetaData implementation class for "extractDatabaseMetaData" calls * TransactionAwareDataSourceProxy obtains target Connections lazily when the first call comes in on the Connection proxy * added "reobtainTransactionalConnections" flag to TransactionAwareDataSourceProxy (for Connection handles on JBoss) * WebSphereDataSourceAdapter, JBossNativeJdbcExtractor and CommonsDbcpNativeJdbcExtractor propagate SQLExceptions as-is Package org.springframework.jms * JmsUtils protects against misbehaving JMS providers (such as ActiveMQ) when closing an interrupted MessageConsumer * JmsTemplate's standard "execute(ProducerCallback)" pre-initializes producer with default destination (if available) * added overloaded execute methods with Destination/destination name and ProducerCallback to JmsOperations/JmsTemplate * added various "browse"/"browseSelected" methods JmsOperations/JmsTemplate, for browsing a queue with a BrowserCallback * DelegatingConnectionFactory adapts specific create(Queue/Topic)Connection calls to a generic JMS 1.1 ConnectionFactory * JmsInvokerClientInterceptor accepts any JMS 1.1 ConnectionFactory, not insisting on a QueueConnectionFactory anymore * MethodListenerAdapter uses type difference weight algorithm to choose between ambiguous listener methods * DefaultMessageListenerContainer catches TaskRejectedException and pauses affected tasks for subsequent resuming * DefaultMessageListenerContainer exposes listener Session as thread-bound resource for JmsTemplate calls * ServerSessionMessageListenerContainer always establishes a shared Connection (even if autoStart="false") * CommonsPoolServerSessionFactory removes specific ServerSessionPool on close (for proper reuse on stop and restart) * "jms:listener-container" tag supports a concurrency range (e.g. "3-5"), for specifying a minimum number of consumers Package org.springframework.jmx * added "getServer()" method to MBeanRegistrationSupport (MBeanExporter), exposing the underlying JMX MBeanServer Package org.springframework.jndi * JndiTemplate prepares a specific Hashtable for the InitialContext, exposing default environment properties as well Package org.springframework.mail * fixed potential NPE in MailSendException Package org.springframework.mock * MockRequestDispatcher stores forwarded/included URL in MockHttpServletResponse even in case of wrapped response Package org.springframework.orm * LocalSessionFactoryBean uses LocalJtaDataSourceConnectionProvider (supporting aggressive release) in case of JTA TM * LocalSessionFactoryBean supports Connection release mode "after_statement" without "useTransactionAwareDataSource" too * LocalSessionFactoryBean eagerly compiles registered mappings, for availability in the post-processing phase * added "cacheProvider" property to LocalSessionFactoryBean, allowing for a Spring-managed CacheProvider instance * added overloaded "delete" methods with "entityName" argument to HibernateOperations and HibernateTemplate * added "earlyFlushBeforeCommit" flag to HibernateTransactionManager, allowing to enforce a flush before synchronization * fixed Jpa/JdoTransactionManager to correctly nest a REQUIRES_NEW transaction within a SUPPORTS scope with early access * JPA PersistenceUnitReader supports location patterns for the "jar-file" attribute in "persistence.xml" files * PersistenceAnnotationBeanPostProcessor accepts vendor-specific EntityManager interfaces for @PersistenceContext again Package org.springframework.remoting * HessianClientInterceptor/ProxyFactoryBean supports "debug", "chunkedPost", "readTimeout" and "hessian2" properties * HessianServiceExporter supports "debug" property analogous to Hessian 3.1.3's HessianServlet * HessianServiceExporter and BurlapServiceExporter expose the bean ClassLoader as thread context CL (if necessary) * factored out stream-based HessianExporter and BurlapExporter classes * factored out abstract RemoteInvocationSerializingExporter base class from HttpInvokerServiceExporter * introduced SimpleHttpInvokerServiceExporter and SimpleHessian/BurlapServiceExporter as HttpHandlers for Sun JRE 1.6 * introduced SimpleHttpServerFactoryBean for Spring-style set-up of a Sun JRE 1.6 HttpServer Package org.springframework.samples * PetClinic's JPA version showcases AspectJ load-time weaving, including @Transactional handling in AspectJ mode * PetClinic's JPA EntityManagerClinic uses explicit flushing and id assigning to make sure that the id is available Package org.springframework.scheduling * ThreadPoolTaskExecutor supports Java 6's "allowCoreThreadTimeOut" feature (for both native and backport-concurrent) Package org.springframework.scripting * fixed ScriptFactoryPostProcessor to avoid NPE in case of script that produces null value and no interfaces specified * StaticScriptSource exposes "StaticScript" as toString result, in order for Groovy to derive a valid class name from it * GroovyScriptFactory caches a temporarily created result object from "getScriptedObjectType" until "getScriptedObject" * GroovyScriptFactory exposes "getGroovyClassLoader()" method and lazily initializes the GroovyClassLoader * "lang:groovy/jruby/bsh" does not insist on an id for a scripted bean anymore (i.e. allows for anonymous scripts) Package org.springframework.test * fixed AbstractContextLoader to detect and accept "classpath*:" URLs as well * AbstractTestNGSpringContextTests does not define a "SpringTestContext" group anymore (for ease of using custom groups) Package org.springframework.transaction * added "validateExistingTransaction" property to AbstractPlatformTransactionManager, for isolation level checks * added "prepareForCommit" template method to AbstractPlatformTransactionManager, called before commit synchronization * JtaTransactionManager consistently throws TransactionSystemException in case of unexpected internal transaction state * JtaTransactionManager detects JBoss 4.2 transaction rollbacks caused by a timeout, throwing a meaningful exception * fixed WebSphereUowTransactionManager to correctly detect an existing global transaction (ignoring local tx contexts) Package org.springframework.ui * fixed ModelMap's "mergeAttributes" to correctly copy new attributes into the model * added "containsAttribute" method to ModelMap, as a more specific alternative to a general "containsKey" call * introduced Java-5-specific Model interface (for use with MVC handler methods) and corresponding ExtendedModelMap impl Package org.springframework.util * AutoPopulatingList is serializable now * MethodInvoker (and subclasses) use type difference weight algorithm to choose between multiple matching methods * FreeMarker "formSingleSelect" macro also accepts options from a sequence (list) as both labels and values Package org.springframework.validation * clarified that BindingResult's "getPropertyEditorRegistry()" method may return null to indicate no support for editors * DataBinder implements the TypeConverter interface, delegating to the underlying PropertyAccessor Package org.springframework.web * ContextLoader(Listener/Servlet) explicitly removes the context attribute from the ServletContext (for WLS hot deploy) * introduced static "getCurrentWebApplicationContext()" accessor on ContextLoader, for context lookup by thread * introduced SpringBeanAutowiringSupport class for self-autowiring classes within a web app (e.g. JAX-WS endpoints) * WebApplicationContext impls register request/session/ServletContext as resolvable dependencies (e.g. for @Autowired) * PortletApplicationContext impls register request/session/PortletContext as resolvable dependencies (for @Autowired) * CommonsMultipartResolver uses FileUpload 1.2's "isMultipartContent" variant when available (for stricter checks) * added "useCacheControlNoStore" property to WebContentGenerator, allowing to suppress the "no-store" header value * SimpleUrlHandlerMapping explicitly trims specified handler bean names (in order to ignore unintended whitespace) * UrlPathHelper detects a context path of "/" (as exposed by Jetty for includes) and processes it as root context ("") * improved NoSuchRequestHandlingMethodException's error message to include request URL and query string explicitly * DispatcherServlet consistently logs correct request URI for include requests (even in debug log messages) * MultiActionController properly supports String return types for handler methods (for consistency with @RequestMapping) * MultiActionController detects and rejects invalid last-modified method return types * WebRequest interface (as supported for @RequestMapping) supports "checkNotModified" method for last-modified handling * @RequestMapping paths are considered a match even without suffix (e.g. "/users" matches a request for "/users.do") * @InitBinder methods apply to @RequestParam parameters as well, with the @InitBinder value matched against param names * @ModelAttribute's default attribute names are consistently derived from the *declared* parameter/return type * AnnotationMethodHandlerAdapter properly handles overridden handler methods with overridden @RequestMapping annotation * AnnotationMethodHandlerAdapter maps relative paths specified at method level analogous to default method name mappings * AnnotationMethodHandlerAdapter throws an exception if it cannot find a clear best path match for a specific request * AnnotationMethodHandlerAdapter throws descriptive exception in case of optional parameter being declared as primitive * AnnotationMethodHandlerAdapter automatically resolves arguments of type Principal as the request's user principal * AnnotationMethodHandlerAdapter propagates checked exceptions as-is for handler/attribute/init-binder methods * AnnotationMethodHandlerAdapter applies @InitBinder methods for view preparation as well (like WebBindingInitializers) * AnnotationMethodHandlerAdapter applies binder initialization for 'end' views (with processing being complete) as well * factored out "createBinder" template method within AnnotationMethodHandlerAdapter, called for each binding attempt * Servlet AnnotationMethodHandlerAdapter supports View return value for handler methods (as alternative to view name) * fixed Portlet AnnotationMethodHandlerAdapter to explicitly check for Action/Render*Response* (to work on Liferay) * InternalResourceView prevents dispatching to same path as handler (e.g. with default view name and default resolver) * JstlView detects session-scoped JSTL LocalizationContext/Locale attributes and merges them with its own context * JstlView and (JspAware)RequestContext consistently use JSTL Config class for scoped attribute access * reworked Spring's Tiles2 support such that it can operate against the Tiles2 (2.0.5+) JDK 1.4 version as well * Tiles2 TilesView explicitly checks whether the Tiles container has been initialized (throwing a descriptive exception) * Tiles2 TilesView exposes Servlet 2.4 forward request attributes (for non-2.4-compliant web containers like OC4J) * fixed JSP BindTag to correctly detect and ignore a repeated nested path for the global errors case * JSP CheckboxTag/CheckboxesTag and RadioButtonTag/RadioButtonsTag use registered property editor for value rendering Changes in version 2.5 final (2007-11-19) ----------------------------------------- General * updated javadoc and reference documentation * revised PetPortal sample application into a full-fledged Java 5 showcase (annotation-based configuration etc) Package org.springframework.aop * fixed garbage collection problem with CGLIB proxies, using a strong reference map for the fixed interceptors Package org.springframework.context * "context:load-time-weaver" autodetects the GlassFish ClassLoader even within a GlassFish web app now * "context:load-time-weaver" correctly detects the use of the Spring VM agent on WebLogic 9 Package org.springframework.core * URL-to-File conversion for ClassPathResource/UrlResource performs URI-based decoding rather than using URLDecoder * optimized UrlResource's handling of URI access and File access if constructed with a URI directly * fixed AbstractLabeledEnum to correctly determine the default enum type for a top-level enum class (again) Package org.springframework.jdbc * added "registerDatabase" method to SQLErrorCodesFactory, for eager association of database names with DataSources Package org.springframework.jms * DefaultMessageListenerContainer avoids deadlock between Connection and Session through the use of a shared monitor Package org.springframework.jndi * fixed "jee:jndi-lookup" tag to correctly handle "default-value" and "default-ref" attributes Package org.springframework.orm * Hibernate SpringSessionSynchronization explicitly disconnects on suspend/completion (to make "on_close" work on JBoss) Package org.springframework.scheduling * fixed CommonJ TimerManagerFactoryBean to not require the "scheduledTimerListeners" property Package org.springframework.test * TestContextManager logs TestExecutionListener exceptions at error/warn level instead of info/debug Package org.springframework.transaction * JtaTransactionManager swallows IllegalStateException when synchronizing with existing transaction (for JBoss 4.2) Package org.springframework.web * CommonsMultipartResolver detects multiple files for the same field name and throws a corresponding exception * RequestToViewNameTranslator kicks in before the "HandlerInterceptor.postHandle" phase * RequestToViewNameTranslator's "getViewName" is allowed to return null if no default found * fixed AnnotationMethodHandlerAdapter to expose the implicit model even when using request-to-view-name translation * fixed AnnotationMethodHandlerAdapter to correctly match parameters even in case of request method specified as well * DispatcherPortlet/AnnotationMethodHandlerAdapter swallows IllegalStateException when setting implicit render parameter * Portlet AnnotationMethodHandlerAdapter preserves implicit model from action phase to render phase * Portlet AnnotationMethodHandlerAdapter applies cache settings (prevents caching when session attributes are involved) * Portlet AnnotationMethodHandlerAdapter allows default @RequestMapping annotations for action as well as render methods * Portlet AnnotationMethodHandlerAdapter resolves PortletPreferences, PortletMode, WindowState, PortalContext arguments * factored out AbstractWizardFormController's "getTargetPage" logic into WebUtils/PortletUtils, for reuse in custom code * InternalResourceView explicitly sets content type on response in include case (for correct charset handling on Tomcat) * exposed applicable standard HTML attributes on JSP "form:option" and "form:options" tags * JSP form tags always autogenerate valid HTML ids (not including "[" or "]" characters from array element properties) Changes in version 2.5 RC2 (2007-11-12) --------------------------------------- General * introduced complete rewrite of the Spring MVC step-by-step guide for version 2.5 Package org.springframework.aop * fixed garbage collection problem with CGLIB proxies, now holding onto the Advised configuration independent of factory Package org.springframework.beans * DefaultListableBeanFactory now supports autowiring of FactoryBean instances 'by type' * revised DefaultListableBeanFactory's exception handling for clearer wrapping of nested exceptions * DefaultListableBeanFactory performs bean creation within a PrivilegedAction (for SecurityManager compatibility) * optimized DefaultListableBeanFactory's invocation of setter methods for re-created bean instances * optimized DefaultListableBeanFactory's invocation of post-processor methods * changed XmlReaderContext's "getReader()" to expose the XmlBeanDefinitionReader again (for backwards compatibility) * AutowiredAnnotationBeanPostProcessor caches determined candidate constructors per bean class * RequiredAnnotationBeanPostProcessor caches validated bean names, skipping re-validation for the same bean * added bean type argument to MergedBeanDefinitionPostProcessor (for InitDestroyAnnotationBeanPostProcessor) Package org.springframework.context * "context:mbean-export" autodetects WebLogic and WebSphere, performing an appropriate MBeanServer lookup * "context:mbean-export" falls back to a simple MBeanExporter on JDK 1.4, detecting standard MBeans * introduced "context:mbean-server" configuration element, for setting up a standalone MBeanServer reference * "context:load-time-weaver" automatically activates "spring-configured" if AspectJ weaving is enabled * "context:load-time-weaver"'s temporary ClassLoader for type matching uses a fully isolated loader for each match Package org.springframework.dao * PersistenceExceptionTranslationAdvisor detects @Repository on interfaces as well Package org.springframework.jca * added missing "refresh()" call to SpringContextResourceAdapter's ApplicationContext Package org.springframework.jdbc * TransactionAwareDataSourceProxy exposes a special "toString()" result for its Connection proxies * fixed SingleColumnRowMapper to use passed-in required type in the default "convertValueToRequiredType" implementation * SimpleJdbcCallOperations and SimpleJdbcInsertOperations return the interface type (not the impl) for method chaining Package org.springframework.jndi * "jee:jndi-lookup" supports "default-value" and "default-ref" attributes, translated to a default object Package org.springframework.mail * MailSendExceptions keeps failed messages in a LinkedHashMap, allowing for access in the order of sending * added "getMessageExceptions()" accessor to MailSendException, with "getFailedMessages()" being transient now Package org.springframework.orm * fixed Jpa/JdoTransactionManager to correctly suspend and resume even for dialects without JDBC Connection retrieval * SqlMapClientTemplate explicitly checks for TransactionAwareDataSourceProxy, avoiding double synchronization Package org.springframework.remoting * RmiClientInterceptor and AbstractSlsbInvokerInterceptor do not consider MarshalException as connect failure anymore Package org.springframework.stereotype * @Component, @Repository, etc are not marked as inherited anymore (i.e. inheritance checks to be performed explicitly) Package org.springframework.test * AbstractGenericContextLoader provides an opportunity for subclasses to customize the context before calling refresh * revised TestExecutionListener method signatures to declare Exception instead of Throwable Package org.springframework.transaction * "tx:jta-transaction-manager" autodetects Oracle OC4J as well, in addition to WebLogic and WebSphere Package org.springframework.web * ContextLoader provides an opportunity for subclasses to customize the context before calling refresh * made AbstractController's handleRequest entry point method non-final (allowing for overriding and CGLIB proxying) * AbstractUrlHandlerMapping always takes the first matching path (in case of multiple path patterns of equal length) * AnnotationMethodHandlerAdapter for Servlet MVC exposes UrlPathHelper and PathMatcher configuration properties * AnnotationMethodHandlerAdapter for Servlet MVC supports MethodNameResolver for resolving default handler methods * AnnotationMethodHandlerAdapter for Servlet MVC supports path patterns for @RequestMapping at the method level as well * AnnotationMethodHandlerAdapter for Servlet MVC always prevents HTTP caching in case of @SessionAttributes specified * reworked @RequestMapping's "type" attribute into "method", accepting strongly typed @RequestMethod enum values * revised AnnotationMethodHandlerAdapter's resolution of multiple matching handler methods to take params into account * @RequestParam's "value" attribute is not required anymore, defaulting to the method parameter name (if available) * added "types" attribute to @SessionAttributes, allowing to enumerate model attributes types instead of names * AbstractJasperReportsSingleFormatView converts exporter parameter values in the model (if appropriate) * InternalResourceView lets explicit model attributes override Spring beans in case of "exposeContextBeansAsAttributes" * JstlView does not set "exposeContextBeansAsAttributes" flag to "true" by default (analogous to InternalResourceView) * JSF 1.1 DelegatingVariableResolver checks original VariableResolver first again (for strict backwards compatibility) * introduced JSF 1.1 SpringBeanVariableResolver, letting Spring bean definitions override other attributes of same name * renamed JSF 1.2 DelegatingFacesELResolver to SpringBeanFacesELResolver, indicating its concrete lookup strategy * fixed Tiles 1.x TilesConfigurer to explicitly set the factory name to empty String by default Changes in version 2.5 RC1 (2007-10-22) --------------------------------------- General * introduced spring-framework-with-docs.zip distribution; reduced spring-framework.zip to the minimal binaries * spring.jar does not include Servlet Web MVC support anymore; add spring-webmvc.jar separately * spring.jar and spring-core.jar include repackaged version of ASM 2.2.3 (avoiding side effects with other ASM versions) * spring-orm.jar contains the web ORM support (again), in order to avoid split packages across bundles * spring-web.jar includes the entire Hessian, Burlap, HTTP invoker, JAX-RPC and JAX-WS support (avoiding split packages) * removed outdated Countries sample application * revised PetClinic sample application into a full-fledged Java 5 showcase (annotation-based configuration etc) * revised default handling in BeanDefinitionParsers for XML config namespaces to work without XSD validation as well * updated Spring's JDO support to require JDO 2.0 or higher, with early support for JDO 2.1 features Package org.springframework.aop * revised AdvisedSupport to avoid lock contention for method cache lookups (using a concurrent map with special keys) * fixed AspectJ pointcut handling to strictly match generic return types according to Java language rules * AspectJ pointcut matching only registers LocalVariableTableParameterNameDiscoverer if ASM is present on the classpath * removed unused pointcut type attribute from "spring-aop-2.5.xsd" Package org.springframework.beans * BeanWrapperImpl obtains old value with converted key in case of a Map with non-String keys * TypeMismatchException and MethodInvocationException are serializable even in case of non-serializable property values * URIEditor only tries to resolve "classpath:" locations if explicitly constructed with a ClassLoader * URIEditor converts spaces in location values into "%20" quotes (as required by the URI format) * exposed "autowireCandidate" property in BeanDefinition interface (avoiding casts to AbstractBeanDefinition) * deprecated ConfigurableBeanFactory's "registerCustomEditor" in favor of "addPropertyEditorRegistrar" * AbstractBeanFactory ignores PropertyEditorRegistrars which tried to obtain a currently created bean * revised AbstractBeanFactory to detect FactoryBeans which are in turn created through factory methods * DefaultListableBeanFactory freshly resolves autowired arguments even for cached constructors (re-resolving prototypes) * DefaultListableBeanFactory removes a singleton bean instance if a new bean definition gets registered * DefaultListableBeanFactory fully destroys singleton bean instance when the corresponding bean definition gets replaced * DefaultListableBeanFactory resets the caches for all derived beans as well if a bean definition gets replaced * fixed CglibSubclassingInstantiationStrategy to avoid CGLIB class leak for inner prototypes with MethodReplacer usage * XmlBeanDefinitionReader initializes default EntityResolver lazily, avoiding classpath scan in case of custom resolver * DefaultNamespaceHandlerResolver exposes public DEFAULT_HANDLER_MAPPINGS_LOCATION constant * DefaultNamespaceHandlerResolver loads NamespaceHandler mappings and classes lazily (only when namespace actually used) * fixed BeanDefinitionParserDelegate to correctly parse property sub-elements even with custom name for beans namespace * BeanDefinitionParserDelegate stores definition source for metadata attributes and qualifier attributes * qualifier attributes consist of "key" and "value" in spring-beans-2.5.xsd (formerly "name" and "value") * AbstractBeanDefinition's qualifier handling provides a unified "addQualifier(AutowireCandidateQualifier)" method * AbstractSingleBeanDefinitionParser applies full scope to inner beans, making them eligible for destruction callbacks * added "getParentName" template method to AbstractSingleBeanDefinitionParser, allowing for child bean definitions * @Autowired qualifier annotations may be defined with target 'type' as well, marking the target bean class * Autowired/Common/PersistenceAnnotationBeanPostProcessor implement PriorityOrdered and expose an "order" bean property * "depends-on" kicks in before the affected bean is entering its creation phase; can be used to resolve circular refs * added "registers-scope" annotation to spring-tool.xsd, allowing a tool to determine valid scope names Package org.springframework.context * AbstractApplicationContext calls "cancelRefresh" method in case of refresh failure now, resetting the 'active' flag * AbstractRefreshableApplicationContext calls the full "destroyBeans()" method when refreshing the bean factory * ClassPathXmlApplicationContext and FileSystemXmlApplicationContext trim passed-in config location Strings * added "concurrentUpdates" flag to AbstractApplicationEventMulticaster, enabling copy-on-write for the listener set * AnnotationConfigUtils checks for EntityManagerFactory class instead of PersistenceContext (for Tomcat 6 compatibility) * moved CommonAnnotationBeanPostProcessor class from package "beans.factory.annotation" to "context.annotation" * CommonAnnotationBeanPostProcessor supports @Resource's "mappedName" attribute as (potentially global) JNDI location * added "alwaysUseJndiLookup" flag to CommonAnnotationBeanPostProcessor, enforcing Java EE 5 JNDI lookups * CommonAnnotationBeanPostProcessor detects and processes the JAX-WS @WebServiceRef annotation as well * CommonAnnotationBeanPostProcessor detects and processes the EJB 3 @EJB reference annotation (if present) as well * @PostConstruct/@PreDestroy methods are only called once even if they are specified as standard init/destroy methods * added "context:mbean-export" configuration element to "spring-context-2.5" schema, for annotation-driven JMX export Package org.springframework.core * NestedRuntimeException/NestedCheckedException's "contains" checks the nested causes of any kind of wrapped exception * added "ConcurrentMap createConcurrentMap" method to CollectionFactory, exposing a common ConcurrentMap interface * deprecated CollectionFactory's "createLinkedSet/LinkedMap/IdentityMapIfPossible" (for usage on JDK 1.4 or higher) * AttributeAccessorSupport uses a LinkedHashMap, keeping the attributes in the order of registration * "Conventions.getVariableName" follows JavaBeans property naming rules in case of multiple upper case letters * added "getURI()" method to Resource interface * added constructor with URI argument to UrlResource class * FileSystemResource's "getURL()" builds URLs that can be converted to an URI * introduced ContextResource interface with "getPathWithinContext()" method (exposed for context-relative lookups) * reworked "core.asm.ClassReaderFactory" into "core.classreading.MetadataReaderFactory" (with internal ASM usage only) * AspectJTypeFilter uses a given ClassLoader instead of the default ClassLoader Package org.springframework.ejb * spring-jee.xsd explicitly declares defaults for its boolean flags Package org.springframework.instrument * added WebLogicLoadTimeWeaver for BEA WebLogic version 10 or higher Package org.springframework.jdbc * SimpleJdbcTemplate's varargs handling always considers a single array argument as collection of arguments Package org.springframework.jms * JmsTemplate only starts lazily created transactional Connections if actually necessary (-> "startConnection" flag) * JmsTransactionManager does not start transactional Connections until a transactional Session actually requires it * added DestinationResolver support to StandardJmsActivationSpecFactory, for Destination objects on JCA ActivationSpecs * DefaultJmsActivationSpecFactory autodetects WebSphere's JMS ResourceAdapter and extended ActivationSpec properties * "spring-jms.xsd" supports "destination-resolver" attribute for "jca-listener-container" element as well * JmsNamespaceHandler registers class names only, allowing tools to run without the JMS API on the classpath Package org.springframework.jmx * MBeanExporter applies NotificationPublisherAware callbacks to objects registered via "registerManagedResource" as well * MBeanExporter's "exposeManagedResourceClassLoader" defaults to "true" now, for interaction with third-party MBeans * MBeanExporter uses AUTODETECT_ALL as default if no beans have been specified explicitly * MBeanExporter supports dynamic AOP proxies with the target class being a standard MBean/MXBean * introduced AnnotationMBeanExporter with conveniently pre-configured AnnotationJmxAttributeSource * ManagedResource annotation allows for specifying the "objectName" as annotation value as well * MetadataNamingStrategy falls back to bean key (bean name) if no "objectName" specified in source-level metadata * fixed IdentityNamingStrategy to obtain the package name through class name inspection rather than "Class.getPackage()" * MBeanClientInterceptor automatically converts MXBean CompositeData/TabularData structures according to Java 5/6 rules * MBeanClientInterceptor uses the standard JDK MBeanServerInvocationHandler if possible (for full MXBean support) * MBeanClientInterceptor propagates exceptions thrown by the target MBean directly (i.e. not wrapped in a JmxException) Package org.springframework.mail * added "getJavaMailProperties()" method to JavaMailSenderImpl, allowing for convenient configuration of specific keys Package org.springframework.mock * MockServletContext supports "getContext" (allowing to register contexts through the new "registerContext" method) * MockServletContext supports "getMimeType" if the Java Activation Framework is present on the classpath * added convenience constructors to MockPortletConfig, MockActionRequest and MockRenderRequest Package org.springframework.orm * LocalSessionFactoryBean always uses the bean ClassLoader for "mappingResources" as well as for SessionFactory building * HibernateInterceptor can be interleaved with JTA transactions and non-transactional access even with async tx timeouts * removed custom detach/attach/newNamedQuery hooks from JdoDialect, expecting providers to follow the final JDO 2.0 API * deprecated JdoTemplate's "attachCopy" methods in favor of revised "makePersistent" with a JDO2-style return value * LocalPersistenceManagerFactoryBean passes the application ClassLoader into "JDOHelper.getPersistenceManagerFactory" * added "persistenceManagerFactoryName" property to LocalPersistenceManagerFactoryBean, supporting JDO 2.1 PMF lookup * added "jdoPropertyMap" property to LocalPersistenceManagerFactoryBean, allowing for non-String JDO property values * JdoTransactionManager and JpaTransactionManager support REQUIRES_NEW transactions in afterCompletion callbacks * JPA support exposes the application ClassLoader as PersistenceUnitInfo ClassLoader even without a LoadTimeWeaver * JPA support uses InstrumentationLoadTimeWeaver as default weaver if InstrumentationSavingAgent is active * revised CommonsLoggingSessionLog to work with TopLink 11 as well (remaining compatible with TopLink 10.1.3) Package org.springframework.remoting * fixed Hessian/BurlapClientInterceptor's "convertHessian/BurlapAccessException" method to return the exception properly * JndiRmiClientInterceptor's "prepare()" doesn't declare NamingException anymore (just RemoteLookupFailureException) * JaxRpcPortClientInterceptor's "prepare()" doesn't declare ServiceException anymore (just RemoteLookupFailureException) * JaxRpcPortClientInterceptor extracts the original exception as far as provided by JAX-RPC in case of a SOAP fault * introduced JAX-WS 2.0/2.1 support in package "org.springframework.remoting.jaxws" * introduced RemoteInvocationFailureException, thrown by RMI/HTTP/JMS invoker proxies in case of server-side failure * introduced SoapFaultException, thrown by JAX-RPC/JAX-WS proxies in case of a SOAP fault being reported Package org.springframework.stereotype * added @Service and @Controller stereotypes to the existing Component and Repository annotations Package org.springframework.test * introduced TestNG support based on the new test context framework Package org.springframework.transaction * TransactionSystemException preserves the original application exception, if any, in case of commit/rollback failure * revised AbstractFallbackTransactionAttributeSource's template methods for specific attribute/annotation retrieval * AnnotationTransactionAttributeSource supports a customizable TransactionAnnotationParser strategy * AnnotationTransactionAttributeSource supports EJB3's TransactionAttribute annotation (if present) as well * TransactionAspectSupport ignores transaction attributes when not configured with a transaction manager * added "tx:jta-transaction-manager" configuration element to "spring-tx-2.5" schema Package org.springframework.ui * "ModelMap.addObject(Object)" follows JavaBeans property naming rules in case of multiple upper case letters Package org.springframework.util * "ClassUtils.getShortNameAsProperty" strips the outer class name in case of an inner class Package org.springframework.web * added "resolveLazily" flag to Commons(Portlet)MultipartResolver, allowing to switch to lazy multipart resolution * reworked MultipartException into a RuntimeException (it may be thrown from file/parameter access methods as well now) * changed UrlPathHelper's and AbstractUrlHandlerMapping's/AbstractUrlMethodNameResolver's "urlDecode" default to "true" * added "getAttributeNames" method to RequestAttributes interface * introduced WebBindingInitializer interface, supported by BaseCommandController and MultiActionController * introduced annotation-based controller approach using @Controller, @RequestMapping, @RequestParam and @ModelAttribute * introduced annotation-based command/form controller facilities using @InitBinder, @FormAttributes and FormStatus * introduced DefaultAnnotationHandlerMapping and AnnotationMethodHandlerAdapter for Servlet MVC and Portlet MVC * added "caseSensitive", "pathPrefix" and "basePackage" properties to ControllerClassNameHandlerMapping * added "getActualValue()" method to BindStatus, exposing the raw property value for comparison purposes * added "exposeModelAttributes" property to RedirectView, allowing to suppress model exposure completely * added "exposeContextBeansAsAttributes" property to InternalResourceView and InternalResourceViewResolver * JstlView sets "exposeContextBeansAsAttributes" to "true" by default, allowing JSTL expressions to access Spring beans * factored out a "loadReport()" method in AbstractJasperReportsView (called by "initApplicationContext()") * revised AbstractJasperReportsView to allow for obtaining a report dynamically (through overriding "getReport()") * TagWriter in JSP AbstractFormTag reobtains the Writer from the PageContext all the time (for FreeMarker compatibility) * introduced "modelAttribute" property for JSP FormTag, superseding the "commandName" property for general purposes * JSP SelectTag, OptionTag and OptionsTag properly detect a selected value even for Maps with converted keys * JSP CheckboxTag caches converted candidate value when comparing it with collection elements * introduced JSP CheckboxesTag (form:checkboxes) and RadioButtonsTag (form:radiobuttons) * JSF 1.1 DelegatingVariableResolver checks Spring bean match first (analogous to JSF 1.2 DelegatingFacesELResolver) Changes in version 2.1 M4 (2007-09-09) -------------------------------------- General * updated build to use JUnit 4.4 for the tiger test suite while sticking with JUnit 3.8 for the main test suite * moved GlassFish and OC4J instrumentation support from spring-context-support.jar to spring-context.jar * renamed spring-mock.jar to spring-test.jar, reflecting the focus on the test context framework * factored out Struts 1.x support (including Tiles 1.x support) into spring-webmvc-struts.jar * Spring-style pattern matching ("*xxx", "xxx*", "*xxx*") supports multi-part patterns as well now ("xxx*yyy") Package org.springframework.aop * ProxyFactoryBean and AbstractSingletonProxyFactoryBean are serializable if their target and interceptors are * made parts of ReflectiveMethodInvocation and other internal impl classes public again (for framework integration) * "AopNamespaceUtils.registerAutoProxyCreatorIfNecessary" registers a plain InfrastructureAdvisorAutoProxyCreator now * "target()" pointcut handles types implemented in superclasses correctly * "aop:scoped-proxy" applies a specified "autowire-candidate" flag to the proxy Package org.springframework.beans * TypeConverterDelegate protects its value conversion step against PropertyEditors which don't support "setValue" calls * TypeConverterDelegate falls back to "toString()" conversion for a primitive value type if the required type is String * changed visibility of PropertyEditorRegistrySupport's "getDefaultEditor(requiredType)" method to public * PropertyEditorRegistrySupport's "copyCustomEditorsTo" copies all editors if 'nestedProperty' argument is null * exposed "String[] getDependentBeans(beanName)" method on ConfigurableBeanFactory interface * introduced "String[] getDependenciesForBean(beanName)" method on ConfigurableBeanFactory interface * DefaultSingletonBeanRegistry uses a concurrent Map for managing dependent beans, avoiding unnecessary synchronization * removed superseded ResourceFactoryBean (String-to-Resource conversion has been implicitly available for years) * added overloaded "createBean(beanClass)" method to AutowireCapableBeanFactory interface * introduced "registerResolvableDependency" method on ConfigurableListableBeanFactory interface * introduced qualifier support, allowing to use custom parameter annotations for identifying specific target beans * introduced AutowireCandidateResolver mechanism and QualifierAnnotationAutowireCandidateResolver implementation * reworked Annotated/ScannedRootBeanDefinition into Annotated/ScannedGenericBeanDefinition * fixed AbstractBeanFactory's type check to ignore a null value (as potentially exposed by a FactoryBean) * fixed AbstractBeanFactory to never cache FactoryBean-exposed objects for inner beans (avoiding name conflicts) * optimized DefaultListableBeanFactory's shortcut access to cached merged bean definitions * optimized DefaultListableBeanFactory's resolution of bean references during prototype creation * DefaultListableBeanFactory performs SmartFactoryBean eager-init check even if the FactoryBean singleton already exists * CommonAnnotationBeanPostProcessor falls back to default type match if no bean found for @Resource field/property name * Common/Autowired/PersistenceAnnotationBeanPostProcessor reject injection annotations on static fields/methods * factored out "isCandidateComponent(beanDefinition)" template method in ClassPathScanningCandidateComponentProvider * ClassPathBeanDefinitionScanner does not apply scoped-proxy setting to prototypes (only to extended scopes) * scoped inner beans are now eligible for scoped destruction callbacks, despite not living as scoped attributes * "spring-beans-2.1.xsd" supports "default-autowire-candidates" attribute, accepting Spring-style bean name patterns Package org.springframework.context * AbstractApplicationContext registers BeanFactory, ApplicationContext etc as resolvable dependency types for @Autowired * fixed AbstractApplicationContext's temporary ClassLoader to work for by-type autowiring in ApplicationListeners etc * AbstractApplicationContext propagates "start()"/"stop()" call to LifecycleBeans according to inter-bean dependencies * AbstractApplicationContext sends ContextStartedEvent/ContextStoppedEvent when propagating "start()"/"stop()" call Package org.springframework.core * factored out protected "openStreamForClass" template method in OverridingClassLoader * PathMatchingResourcePatternResolver's static "logger" variable is private now * PathMatchingResourcePatternResolver detects Oracle OC4J's "code-source" URLs as jar files now Package org.springframework.jdbc * strengthened SQLExceptionTranslator's contract to define root cause handling for returned DataAccessExceptions * added batch update support to SimpleJdbcTemplate * added new SimpleJdbcInsert and SimpleJdbcCall classes to provide ease-of-use for inserts and stored procedure calls Package org.springframework.jms * MessageListenerAdapter logs at warn level if a listener method returned a result but no response message can be sent * added BeanFactoryDestinationResolver, for use with "jms:listener-container"'s "destination-resolver" attribute * added "message-converter" attribute to "jms:listener-container/jca-listener-container" XML configuration element * added "response-destination" attribute to "jms:listener" element, defining a default in case of no JMSReplyTo header Package org.springframework.orm * HibernateJdbcException extracts the SQL statement and explicitly builds it into the exception message * introduced EntityManagerProxy interface, allowing access to underlying EntityManager for shared/extended EM proxies * container-managed extended EntityManager gets explicitly closed on destruction of the containing bean * PersistenceUnitReader checks for well-known explicit schema resource locations instead of searching the classpath * revised JpaTransactionManager to convert JPA RollbackExceptions into Spring TransactionSystemExceptions * JpaTransactionManager provides fine-grained commit exceptions through translating JPA RollbackException root causes * HibernateJpaDialect translates native HibernateExceptions (introspecting them as root causes of PersistenceExceptions) * added savepoint support to JpaDialect, implemented by OpenJpaDialect, supported by JpaTransactionManager * OpenJpaDialect exposes a special JDBC ConnectionHandle that immediately returns the Connection to the EntityManager * OpenJpaVendorAdapter supports OpenJPA 1.0.0 (exposing the full OpenJPAEntityManagerSPI interface) Package org.springframework.remoting * LocalJaxRpcServiceFactory trims whitespace from "namespaceUri" values Package org.springframework.scripting * ScriptCompilationException carries the ScriptSource of the offending script * GroovyScriptFactory passes script source description to GroovyClassLoader.parseClass (for descriptive error messages) * added "autowire" and "dependency-check" attributes to "lang:bsh/jruby/groovy" XML configuration elements Package org.springframework.test * fixed AbstractSpringContextTests's "hasCachedContext" implementation to use the context key String translation * reduced AbstractTransactionalSpringContextTests's log level for transaction management from INFO to DEBUG * introduced annotation-oriented test context framework based on test execution listeners * introduced JUnit4 support (SpringJUnit4ClassRunner) based on the new test context framework Package org.springframework.transaction * fixed "tx:annotation-driven" to not activate "aop:config"-style autodetection of application-defined Advisor beans Package org.springframework.ui * ModelMap extends LinkedHashMap, exposing model elements in registration order Package org.springframework.util * "ClassUtils.forName" supports the JDK's internal names for primitive array classes as well (for JMX compatibility) * ReflectionUtils provides a "findMethod" variant without parameter types argument Package org.springframework.web * RequestContext uses a full ResourceBundleThemeSource as default again (for backwards compatibility) * RequestContext lazily obtains the Theme instance (for more efficiency when theme support is not used) * AbstractView does not log static attributes anymore, in order to allow for scoped proxies to be used as attributes * factored out protected "isEligibleProperty(key, value)" template method in RedirectView * RedirectView only exposes Strings, primitives and primitive wrappers as query properties by default * JstlView properly allows for programmatic usage (added overloaded constructors; exposing a MessageSource is optional) * InternalResourceViewResolver uses JstlView as default (instead of InternalResourceView) if the JSTL API is present * JSP MessageTag resolves arguments in default text even if no message code was specified * JSP tags in the form tag library default to htmlEscape=true in case of no defaultHtmlEscape setting given * added support for Tiles2 in the "org.springframework.web.servlet.view.tiles2" package (requiring Tiles 2.0.4+) * JasperReports View classes support JasperReports 2.0 while remaining compatible with JasperReports 1.3 Changes in version 2.1 M3 (2007-07-31) -------------------------------------- General * fixed and updated reference documentation on JMS listener container configuration and transaction participation Package org.springframework.aop * Cglib2AopProxy uses weak references for advised object, interceptors and validated classes (avoiding a memory leak) * ProxyFactoryBean avoids NPE in case of target class being null (due to misconfiguration) * fixed AspectJ pointcut handling to resolve bridge methods before matching * fixed AspectJ pointcut handling to correctly match generic return types * added support for "bean(name)" element in AspectJ pointcut expressions * ReflectiveMethodInvocation, BeanFactoryAdvisorRetrieval and other internal impl classes are just package-visible now * the pointcut element's "id" attribute is required as of the 2.1 version of the AOP namespace (spring-aop-2.1.xsd) * aop:aspectj-autoproxy's "proxy-target-class" attribute properly escalates class proxying (not overriding the setting) * ConfigBeanDefinitionParser turns "pointcut" attribute into inner bean definition (instead of ref to an anonymous bean) * fixed ConfigBeanDefinitionParser to properly handle empty pointcut/advice bean names in a tooling environment * added "getAspectClassLoader()" method to AspectInstanceFactory interface * revised reflective class loading to use the correct ClassLoader according to the OSGi bundle structure (if any) * declare-parents allows specifying "delegate-ref" to delegate introductions to a bean as alternative to "default-impl" Package org.springframework.beans * added "charsToDelete" and "emptyArrayAsNull" options to StringArrayPropertyEditor * URIEditor trims whitespace before parsing the URI (allowing for XML formatting with whitespace) * BeanWrapperImpl lazily performs JavaBeans introspection (avoiding introspection failure for non-visible target class) * TypeConverterDelegate protects its collection conversion process against misbehaving Collections with a null Iterator * TypeConverterDelegate only attempts to convert well-known collection types (skips custom types in the first place) * PropertyBatchUpdateException synchronizes on PrintStream/PrintWriter (like the JDK 1.6 Throwable class does) * BeanFactoryUtils uses linked HashMaps for "beansOfTypeIncludingAncestors", preserving "getBeansOfType" order * added "isEagerInit()" method to SmartFactoryBean interface, making post-processors apply to an exposed object eagerly * exposed "getBean(name, args)" method on BeanFactory interface * exposed "BeanDefinition getMergedBeanDefinition(beanName)" method on ConfigurableBeanFactory interface * exposed "isFactoryBean" and "registerDependentBean" methods on ConfigurableBeanFactory interface * introduced "isAutowireCandidate" method on ConfigurableListableBeanFactory interface * passing in explicit arguments for bean creation is supported for constructors as well (not just for factory methods) * passing in different combinations of explicit arguments is supported for overloaded factory methods and constructors * PropertyPathFactoryBean supports a null property value (removed historic restriction there) * exposed "parentName", "factoryBeanName" and "factoryMethodName" properties in BeanDefinition interface * added "visitParentName", "visitFactoryBeanName" and "visitFactoryMethodName" callbacks to BeanDefinitionVisitor * PropertyPlaceholderConfigurer resolves placeholders in parent, factory-bean and factory-method values as well * fixed AbstractBeanFactory to correctly handle factory-bean references in case of a temporary ClassLoader being used * DefaultListableBeanFactory ignores invalid parent bean names when matching beans by type with allowEagerInit=false * DefaultListableBeanFactory only ignores invalid bean class names when matching beans by type with allowEagerInit=false * DefaultListableBeanFactory does not invoke custom init/destroy method twice if pointing to Initializing/DisposableBean * DefaultListableBeanFactory allows for concurrent "registerBeanDefinition" calls after the configuration phase * bean creation records suppressed exceptions, exposing them as related causes in a subsequent BeanCreationException * added "setTypeConverter" method to ConfigurableBeanFactory, allowing to override the default PropertyEditor mechanism * introduced "removeBeanDefinition" method in BeanDefinitionRegistry interface and DefaultListableBeanFactory class * exposed "isBeanNameInUse" method on BeanDefinitionRegistry interface * AbstractBeanFactory supports any BeanDefinition implementation (does not require AbstractBeanDefinition anymore) * reworked AbstractBeanFactory's bean definition merging for less coupling to RootBeanDefinition as merge result * introduced GenericBeanDefinition as one-stop shop for standard bean definition purposes (with configurable parent) * DefaultBeanNameGenerator does not require an AbstractBeanDefinition implementation for bean name generation anymore * DefaultBeanNameGenerator generates a "#0" suffix in the canonical name even for the first occurence of an unnamed bean * added "resolveDependency" methods to AutowireCapableBeanFactory interface * @Autowired annotation ignores target beans marked as autowire-candidate="false" (analogous to standard autowiring) * added autowiring by type for arrays, collections, maps (available for @Autowired, 'constructor', 'byType' autowiring) * Autowired/CommonAnnotationBeanPostProcessor registers autowired beans as dependent on their injected target bean * AnnotationBeanConfigurerAspect proceeds without injection in case of a circular reference problem, logging a warning * added "registerBeanComponent" convenience method to ParserContext * changed visibility of BeanDefinitionParserDelegate's "buildTypedStringValue(ForMap)" methods to protected Package org.springframework.context * AspectJWeavingEnabler implements Ordered, exposing HIGHEST_PRECEDENCE (executing before other factory post-processors) * moved AnnotationConfigUtils to "context.annotation" package (post-processor beans are a context-specific feature) * "context:annotation-config" XML tag activates JPA's @PersistenceContext and @PersistenceUnit as well (if available) * AnnotationConfig/ComponentScanBeanDefinitionParser sends component registration for each registered BeanPostProcessor * AnnotationBeanNameGenerator does not silently adapt the default bean name in case of overlap anymore * "context:spring-configured" registers its bean configurer aspect with a fixed internal bean name * revised reflective class loading to use the correct ClassLoader according to the OSGi bundle structure (if any) Package org.springframework.cache * added "maxElementsOnDisk" bean property to EhCacheFactoryBean, supporting EHCache 1.2.4's extended Cache constructor Package org.springframework.core * added "isAtLeastJava16()" convenience method to JdkVersion class * OverridingClassLoader (and hence SimpleThrowawayClassLoader) exclude classes from the "sun." package * fixed PathMatchingResourcePatternResolver to build correct JarFile URLs on WebLogic and WebSphere * PathMatchingResourcePatternResolver uses a static Log instance in order to avoid repeated synchronization overhead Package org.springframework.ejb * turned visibility of AbstractEnterpriseBean and AbstractSessionBean to public (showing up in the javadoc now) Package org.springframework.instrument * added "excludePackage" and "excludeClass" methods to ShadowingClassLoader, analogous to OverridingClassLoader Package org.springframework.jdbc * added exception translation based on SQLException subclasses introduced in Java 6 * added additional exceptions to divide hierarchy into Recoverable, Transient and NonTransient exceptions * added support for arrays of values in parameter value lists: "select * from t where (a, b) in ((1,'x'), (3,'y'))" * added DerbyMaxValueIncrementer to provide an alternative for autoGeneratedKeys used with IDENTITY columns * added HsqlSequenceMaxValueIncrementer to support sequences now added to HSQL * added H2SequenceMaxValueIncrementer to support sequences in H2 Database Package org.springframework.jms * SingleConnectionFactory sets client ID before ExceptionListener (for providers with strict Connection state handling) * added "receiveTimeout" property to JmsInvokerClientInterceptor/ProxyFactoryBean (with reimplemented request execution) * listener-container type "default102"/"simple102" leads to the implicit choice of MessageListenerAdapter102 Package org.springframework.jmx * MBeanExporter unregisters its MBeans in case of any kind of registration failure * MBeanExporter accepts bean name keys in NotificationListener mappings (in addition to ObjectName Strings) * revised reflective class loading to use the correct ClassLoader according to the OSGi bundle structure (if any) Package org.springframework.orm * HibernateTemplate delegates to "SessionFactory.getCurrentSession()" when "allowCreate" has been set to "false" * added overloaded "findByExample" methods with entityName argument to HibernateOperations/HibernateTemplate * deprecated HibernateTemplate's "saveOrUpdateAll" method in favor of individual "saveOrUpdate"/"merge" usage * fixed Hibernate/JpaTransactionManager to clean up properly in case of transaction begin failure on pre-bound resource * added "prepareTransaction" method to JpaDialect interface, for preparing a JTA-joining EntityManager * HibernateJpaDialect switches FlushMode to MANUAL in case of a read-only transaction even for JTA * PersistenceAnnotationBeanPostProcessor registers autowired beans as dependent on their EntityManagerFactory * ExtendedEntityManagerCreator's "joinTransaction()" checks whether there is an externally managed local transaction * ExtendedEntityManagerCreator's EntityManager proxies are serializable now Package org.springframework.mock * MockHttpServletResponse automatically flushes the Writer in case of a "write(int)" call too Package org.springframework.remoting * RmiClientInterceptor and JaxRpcClientInterceptor propagate any kind of declared RemoteException as-is * (Jndi)RmiClientInterceptor resets stub before a refresh attempt, avoiding race condition in case of registry restart * JndiRmiClientInterceptor wraps CORBA SystemExceptions in RemoteExceptions (if declared) Package org.springframework.scheduling * added "waitForTasksToCompleteOnShutdown" property to ScheduledExecutorFactoryBean * changed ScheduledExecutorFactoryBean's default behavior to shutdown immediately, not waiting for scheduled tasks Package org.springframework.scripting * updated JRuby support for JRuby 1.0 compatibility (still compatible with JRuby 0.9.8 / 0.9.9 as well) Package org.springframework.test * AbstractDependencyInjectionSpringContextTests allows for annotation-driven autowiring (even in case of AUTOWIRE_NO) Package org.springframework.scheduling * Quartz SchedulerFactoryBean does not set default AdaptableJobFactory in case of RemoteScheduler (not supported there) Package org.springframework.scripting * "lang:*" configuration elements create their implicit ScriptFactoryPostProcessor under a fully qualified bean name Package org.springframework.transaction * refined TransactionAspectSupport to allow for overriding the "getTransactionManager()" method in subclasses * TransactionInterceptor only uses ThrowableHolderException if necessary and makes sure to expose the cause in any case * "tx:annotation-driven" registers its transaction aspect with a fixed internal bean name Package org.springframework.util * fixed "StringUtils.parseLocaleString" to parse multiple variants correctly * DefaultPropertiesPersister detects and uses JDK 1.6's "Properties.load/store" variants with Reader/Writer argument Package org.springframework.validation * added overloaded "rejectIfEmpty(OrWhitespace)" methods with args but without default message to ValidationUtils Package org.springframework.web * factored out "invokeDelegate" template method in DelegatingFilterProxy * fixed Servlet/PortletContextResourcePatternResolver to correctly match bounded patterns * fixed FrameworkServlet to always refresh its BeanNameUrlHandlerMapping with the correct context * added "postProcessWeb/PortletApplicationContext" method to FrameworkServlet/Portlet * DispatcherServlet/Portlet's "noHandlerFound" declares Exception instead of just IOException/PortletException * added "addInterceptor" and "addInterceptors" methods to Servlet/Portlet HandlerExecutionChain * AbstractUrlHandlerMapping exposes "path within mapping" attribute through an interceptor (for proper include cleanup) * AbstractWizardFormController's "showForm" method is not final anymore (can be overridden e.g. for exception handling) * added "transformerFactoryClass" property and "newTransformerFactory()" template method to (Abstract)XsltView * added "accept-charset" support to JSP FormTag * fixed JSP CheckboxTag to apply the custom PropertyEditor (if any) to rendered values Changes in version 2.1 M2 (2007-05-31) -------------------------------------- General * removed support for Hibernate 2.1; Spring's Hibernate support generally requires Hibernate 3.1 or higher now * spring-context.jar includes JMX support and core remoting support (no spring-jmx and spring-remoting jars anymore) * spring-orm.jar combines all ORM support packages (replaces spring-jdo, spring-jpa, spring-hibernate etc jars) * spring-web.jar contains web-related remoting and ORM classes (for proper use in J2EE EAR deployment structures) * renamed spring-dao.jar to spring-tx.jar, also containing the JCA support now * renamed spring-support.jar to spring-context-support.jar * renamed spring-portlet.jar to spring-webmvc-portlet.jar * module jar files contain module-specific "spring.handlers" and "spring.schemas" files now * added missing websphere_uow_api.jar to -with-dependencies distribution Package org.springframework.aop * ReflectiveMethodInvocation always uses a shared user attribute Map in clones (for proper binding of multiple advices) * fixed MethodInvocationProceedingJoinPoint to properly pass modified arguments (via proceed) to subsequent aspects * fixed AbstractAspectJAdvisorFactory to ignore 'code-style' aspect classes that have been compiled by ajc * "aop:aspectj-autoproxy" XML configuration tag detects all aspect beans in case of empty XML body content as well * moved "aop:spring-configured" to context namespace ("context:spring-configured") in the 2.1 versions of the XSDs Package org.springframework.beans * CustomBooleanEditor trims text before comparing against true/false Strings * added temporary ClassLoader support to ConfigurableBeanFactory / AbstractBeanFactory * mirrored FactoryBean's "getObjectType()" as abstract method in AbstractFactoryBean again, for @Override compatibility * reworked SmartInstantiationAwareBeanPostProcessor's "determineConstructor" hook into "determineCandidateConstructors" * added "resolveAliases" method to ConfigurableBeanFactory, applying a given StringValueResolver * PropertyPlaceholderConfigurer applies its placeholder parsing to alias target names and aliases as well * PropertyResourceConfigurer (and in particular PropertyPlaceholderConfigurer) is marked as PriorityOrdered * BeanWiringInfo and ClassName/AnnotationBeanWiringInfoResolver support the notion of a 'default' bean name * @Configurable applies factory callbacks (BeanFactoryAware, InitializingBean etc) and post-processors as well * @Configurable applies factory callbacks and post-processors if no bean definition found for default bean name * DefaultListableBeanFactory clears a cached merged bean definition in case of re-registering a bean definition * AbstractBeanDefinition declares a public "clone()" method as well as "AbstractBeanDefinition cloneBeanDefinition()" * AbstractBeanDefinition excludes purely descriptive metadata from its equals check (for more lenient equality) * fixed BeanDefinitionParserDelegate to avoid NPE in case of a custom namespace without a NamespaceHandler registered * fixed BeanDefinitionParserDelegate to extract correct source element for "key-ref"/"value-ref" attributes * added 'required' attribute to @Autowired annotation (configurable for a custom autowire annotation as well) * avoid double invocation of @Autowired/@Resource setter method in case of explicitly specified property value * InitDestroy/Common/AutowiredAnnotationBeanPostProcessor use ConcurrentHashMaps for minimal locking * introduced AnnotatedBeanDefinition interface and AnnotatedRootBeanDefinition implementation class * added support for the JDK 1.6 ServiceLoader facility (package "beans.factory.serviceloader") Package org.springframework.cache * EhCacheFactoryBean applies a specified CacheEntryFactory to an existing cache region as well Package org.springframework.context * AbstractApplicationContext instantiates and applies priority-ordered Bean(Factory)PostProcessors first * AbstractApplicationContext creates all non-ordered BeanPostProcessors first before registering them with the factory * AbstractApplicationContext sets a temporary ClassLoader for type matching if a bean named "loadTimeWeaver" is defined * added LoadTimeWeaverFactoryBean, building a default LoadTimeWeaver (autodetecting the runtime environment) * added LoadTimeWeaverAware interface, automatically supported if a default LoadTimeWeaver is available * added AspectJWeavingEnabler, registering AspectJ's class transformer for standard AspectJ load-time weaving * added "context:load-time-weaver" XML tag, building a default LoadTimeWeaver and enabling AspectJ load-time weaving * introduced ScannedRootBeanDefinition class for autodetected components * added @Scope annotation for autodetected components, indicating the target bean scope in the Spring context * reworked ClassPathBeanDefinitionScanner into subclass of ClasspathScanningCandidateComponentProvider * ClassPathBeanDefinitionScanner provides "addIncludeFilter" etc config methods instead of overloaded "scan" methods * reworked ComponentBeanNameGenerator into AnnotationBeanNameGenerator, handling @Repository name values as well * explicit bean names indicated by autodetected components are enforced, only to be overridden by explicit definitions Package org.springframework.core * updated NestedXxxException to build on JDK 1.4 exception chaining, adding extended messages and convenience accessors * introduced PriorityOrdered marker interface, with order values automatically applied before any plain Ordered values * fixed BridgeMethodResolver to properly detect a method that substitutes a type parameter with an array type * fixed BridgeMethodResolver to detect type variables in interface hierarchies with different type variable names * added "getClassLoader()" method to ClassPathResource, exposing the ClassLoader used for resource loading * PathMatchingResourcePatternResolver avoids full subtree scan through skipping non-matching directory paths early * PathMatchingResourcePatternResolver explicitly closes freshly created JarFile handles, to allow for hot redeployment * introduced ClassMetadata/AnnotationMetadata abstraction in "core.type" package * refactored "core.typefilter" package into "core.type.asm" and "core.type.filter" * introduced ClassReaderFactory abstraction, with SimpleClassReaderFactory and CachingClassReaderFactory implementations * introduced ClassReaderFactory as TypeFilter match argument, for resolving cached ClassReaders for the type hierarchy * moved FilterType enum to "context.annotation" package, since it is closely related to component scanning * introduced AnnotatedBeanDefinition interface and AnnotatedRootBeanDefinition implementation class * introduced ScannedRootBeanDefinition class for autodetected components * StringCodedLabeledEnum accepts empty codes (that purely consist of whitespace) as well Package org.springframework.jdbc * added named parameter support to SimpleJdbcTemplate * added ParameterizedBeanPropertyRowMapper, providing automatic mapping between columns and bean properties * added new SqlReturnUpdateCount parameter to provide name for update counts from stored procedures * added stored procedure support for retrieving update counts and storing the retrieved int in the output map * added automatic processing of stored proc returned resultsets (will create default one if declared parameter missing) * added automatic processing of stored proc update counts (will create default one if declared parameter missing) Package org.springframework.jmx * MBeanExporter does not insist of a minimum of 1 bean exposed anymore, also accepting no beans to export in the context Package org.springframework.mail * JavaMailSenderImpl sets the original message id (if specified in the given MimeMessage) after "message.saveChanges()" Package org.springframework.mock * added MockJspWriter and MockBodyContent classes for testing content-emitting JSP tags * MockPageContext supports the "getOut()" method, exposing a MockJspWriter Package org.springframework.orm * LocalContainerEntityManagerFactoryBean and DefaultPersistenceUnitManager autodetect a context's default LoadTimeWeaver * avoid double invocation of @PersistenceContext/Unit setter method in case of explicitly specified property value Package org.springframework.transaction * marked DelegatingTransactionAttribute as Serializable * added mode="proxy"/"aspectj" flag to "tx:annotation-driven" config tag, for choosing the AspectJ transaction aspect * WebSphereUowTransactionManager does not enforce the presence of a JTA UserTransaction anymore * WebSphereTransactionManagerFactoryBean uses the context class loader for compatibility with the WSAD 5.1 test server Package org.springframework.util * added "makeAccessible(Method)" and "makeAccessible(Constructor)" convenience methods to ReflectionUtils * added "matchStart" method to PathMatcher interface and AntPathMatch implementation, for checking the start of a match Package org.springframework.web * added "getDescription" method to WebRequest interface * ServletWebRequest and PortletWebRequest expose a descriptive "toString()" result (including URI, session id, user id) * added "includeClientInfo" flag to AbstractRequestLoggingFilter, for including client address and session id in the log * added Log4jNestedDiagnosticContextInterceptor for use with Servlet and Portlet MVC * CookieLocaleResolver checks specified "defaultLocale" in case of a setLocale call with null argument * RequestContext uses a shared default Theme instance as fallback, avoiding the recreating of empty Theme instances * MultiActionController explicitly disallows direct invocation of exception handler methods (as handler methods) * CancellableFormController suppresses validation for a cancel request * AbstractView and AbstractTemplateView pass an explicit ServletContext reference to a created RequestContext instance * changed AbstractTemplateView(Resolver)'s "exposeSpringMacroHelpers" default to "true" * JSP FormTag exposes full nested path for compatibility with Spring's standard BindTag * JSP TransformTag is able to work within JSP SelectTag etc as well, not just within BindTag Changes in version 2.1 M1 (2007-05-13) -------------------------------------- General * Spring is built on JDK 1.6 now, with support for common Java 6 APIs / Java EE 5 APIs * Spring requires JDK 1.4 or higher now, not supporting JDK 1.3 anymore (JDK 1.3 has reached its official end-of-life) * Spring's Hibernate3 support generally requires Hibernate 3.1 or higher (note: there's separate Hibernate 2.1 support) * fixed contents of spring-remoting.jar: does not include RemoteInvocationUtilsTests anymore Package org.springframework.aop * removed Perl5RegexpMethodPoint and RegexpMethodPointcutAdvisor's "perl5" flag (always using java.util.regex now) Package org.springframework.beans * introduced InitDestroyAnnotationBeanPostProcessor, processing configurable init and destroy annotations * introduced CommonAnnotationBeanPostProcessor, processing JSR-250's @PostConstruct, @PreDestroy and @Resource * introduced @Autowired annotation, indicating that a field, config method or constructor is supposed to be autowired * introduced AutowiredAnnotationBeanPostProcessor, processing the new @Autowired annotation * fixed AbstractAutowireCapableBeanFactory to allow for changing the InstantiantionStrategy (again) * deprecated BeanDefinitionReader's "BeanDefinitionRegistry getBeanFactory()" method in favor of "getRegistry()" * exposed "getBeanNameGenerator()" method in BeanDefinitionReader interface * changed XmlReaderContext's "getReader()" method to expose the plain BeanDefinitionReader interface * added "getResourceLoader()" convenience method to XmlReaderContext, exposing the context's ResourceLoader (if any) * added "getBeanClassLoader()" convenience method to XmlReaderContext Package org.springframework.context * introduced CandidateComponentProvider mechnism, for finding annotated component classes through scanning the classpath * introduced "context" XML schema namespace, providing a "property-placeholder" convenience tag * introduced convenient tags for annotation-based configuration as part of the "context" namespace * removed deprecated ConsoleListener clas