1. 18 3月, 2014 2 次提交
  2. 17 3月, 2014 9 次提交
    • S
      Favor ScriptException over SQLException · 92eb99a5
      Sam Brannen 提交于
      In ScriptUtils and related classes, SQLExceptions are now caught and
      wrapped in ScriptExceptions wherever feasible.
      
      Affected "throws" declarations have also been revised as appropriate.
      
      Issue: SPR-11564
      92eb99a5
    • J
      Extracted simple MethodInvokingBean as alternative to (and base class for)... · cf290ab4
      Juergen Hoeller 提交于
      Extracted simple MethodInvokingBean as alternative to (and base class for) MethodInvokingFactoryBean
      
      Issue: SPR-11196
      cf290ab4
    • J
      DeferredQueryInvocationHandler explicitly closes its EntityManager on garbage collection · a8577da3
      Juergen Hoeller 提交于
      Includes javadoc revision covering all supported EntityManager types as of JPA 2.1.
      
      Issue: SPR-11451
      a8577da3
    • S
      Introduce SQL script exception hierarchy · fbd25467
      Sam Brannen 提交于
      This commit continues the work began in SPR-9531 as follows.
      
       - ScriptException now extends DataAccessException.
      
       - DatabasePopulator.populate() now explicitly throws ScriptException.
      
       - Introduced UncategorizedScriptException.
      
       - DatabasePopulatorUtils.execute() now throws an
         UncategorizedScriptException instead of a
         DataAccessResourceFailureException.
      
      Issue: SPR-11564
      fbd25467
    • R
      Rename ReactorNettyTcpClient to ReactorTcpClient · f68bd5c8
      Rossen Stoyanchev 提交于
      Even though Netty is a required dependency of reactor-tcp at present,
      there is no hard dependency in the spring-messaging Reactor-based
      implementation.
      f68bd5c8
    • R
      Refine Reactor-based TCP client implementation · 2e13bf8b
      Rossen Stoyanchev 提交于
      Configure explicitly use of SynchronousDispatcher instead of the one
      used otherwise by default (RingBufferDispatcher). As a result TCP
      optations are now scoped to Netty's threads.
      
      Remove Environment field. It is no longer required to shut it down
      since we're now using SynchronousDispatcher by default.
      
      Replace connection.in() with connection.consume() when composing
      connection handling. The former creates a Stream for further composing,
      e.g. via map(), filter() but all we need is to read a message.
      
      Provide additional constructor that aceepts a pre-configured Reactor
      TcpClient instance.
      
      Issue: SPR-11531
      2e13bf8b
    • R
      Refine BrokerAvailabilityEvent behavior · 6bcbb94a
      Rossen Stoyanchev 提交于
      Add accessor for brokerAvailable in AbstractBrokerMessageHandler
      Ensure brokerAvailable is set even if eventPublisher is not
      Add tests BrokerMessageHandlerTests
      
      Turn off brokerAvailable when StompBrokerRelayMessageHandler stops
      Actually stop message handling when brokerAvailable=false
      Improve log messages
      
      Issue: SPR-11563
      6bcbb94a
    • S
      Add links to class-level Javadoc in JdbcTestUtils · 14a8f196
      Sam Brannen 提交于
      14a8f196
    • S
      Polishing · cae50c3a
      Sam Brannen 提交于
      cae50c3a
  3. 16 3月, 2014 1 次提交
    • S
      Fix regression for newline separators in SQL scripts · bb67cd46
      Sam Brannen 提交于
      Changes made in conjunction with SPR-9531, introduced a regression with
      regard to support for using a single newline character as the statement
      separator within SQL scripts. Investigation of the cause of this issue
      resulted in the discovery of another, similar issue: support for
      multiple newlines as a statement separator has been broken for years
      but has gone unnoticed until now.
      
      The reason that both of these issues have gone unnoticed is a result of
      the fact that the test suite only executes SQL script integration tests
      against HSQL DB, and HSQL does not care if two statements occur on the
      same line; whereas, the H2 database will throw an exception if multiple
      statements are included on the same line when executing an update.
      
      This commit addresses both of these issues and provides further
      enhancements to Spring's SQL script support as follows.
      
       - ScriptUtils now properly checks if the supplied script contains the
         custom statement separator or default separator before falling back
         to the 'fallback' separator (i.e., newline).
      
       - Introduced FALLBACK_STATEMENT_SEPARATOR constant in ScriptUtils.
      
       - ScriptUtils.readScript() no longer omits empty lines from the input
         file since a statement separator string may in fact be composed of
         multiple newline characters.
      
       - Introduced overloaded variants of splitSqlScript() and
         executeSqlScript() in ScriptUtils with smaller argument lists for
         common use cases.
      
       - Extracted AbstractDatabasePopulatorTests from DatabasePopulatorTests
         and introduced concrete HsqlDatabasePopulatorTests and
         H2DatabasePopulatorTests subclasses for testing against HSQL and H2.
      
       - Split ScriptUtilsTests into ScriptUtilsUnitTests and
         ScriptUtilsIntegrationTests for faster builds.
      
      Issue: SPR-11560
      bb67cd46
  4. 15 3月, 2014 7 次提交
  5. 14 3月, 2014 3 次提交
  6. 13 3月, 2014 8 次提交
    • S
      Introduce constructors in ResourceDatabasePopulator · 01b2f67f
      Sam Brannen 提交于
      Issue: SPR-9531
      01b2f67f
    • S
      Remove trailing whitespace · a006ca25
      Sam Brannen 提交于
      a006ca25
    • S
      Merge pull request #485 from cbaldwin74/SPR-9531 · 7853e74e
      Sam Brannen 提交于
      * SPR-9531:
        Refactor SQL script support
        Support multi-line comments in SQL scripts
      7853e74e
    • S
      Refactor SQL script support · 2bfd6ddc
      Sam Brannen 提交于
      This commit continues the work in the previous commit as follows:
      
       - Introduced an exception hierarchy for exceptions related to SQL
         scripts, with ScriptException as the base.
      
       - CannotReadScriptException and ScriptStatementFailedException now
         extend ScriptException.
      
       - Introduced ScriptParseException, used by ScriptUtils.splitSqlScript().
      
       - DatabasePopulatorUtils.execute() now explicitly throws a
         DataAccessException.
      
       - Polished Javadoc in ResourceDatabasePopulator.
      
       - Overhauled Javadoc in ScriptUtils and documented all constants.
      
       - Added missing @author tags for original authors in ScriptUtils and
         ScriptUtilsTests.
      
       - ScriptUtils.splitSqlScript() now asserts preconditions.
      
       - Deleted superfluous methods in ScriptUtils and changed method
         visibility to private or package private as appropriate.
      
       - Deleted the ScriptStatementExecutor introduced in the previous
         commit; ScriptUtils.executeSqlScript() now accepts a JDBC Connection;
         JdbcTestUtils, AbstractTransactionalJUnit4SpringContextTests, and
         AbstractTransactionalTestNGSpringContextTests now use
         DatabasePopulatorUtils to execute a ResourceDatabasePopulator instead
         of executing a script directly via ScriptUtils.
      
       - Introduced JdbcTestUtilsIntegrationTests.
      
      Issue: SPR-9531
      2bfd6ddc
    • C
      Support multi-line comments in SQL scripts · e5c17560
      cbaldwin74 提交于
      Prior to this commit neither ResourceDatabasePopulator nor
      JdbcTestUtils properly supported multi-line comments (e.g., /* ... */).
      Secondarily there has developed a significant amount of code
      duplication in these two classes that has led to maintenance issues
      over the years.
      
      This commit addresses these issues as follows:
      
       - Common code has been extracted from ResourceDatabasePopulator and
         JdbcTestUtils and moved to a new ScriptUtils class in the
         spring-jdbc module.
      
       - Relevant test cases have been migrated from JdbcTestUtilsTests to
         ScriptUtilsTests.
      
       - ScriptUtils.splitSqlScript() has been modified to ignore multi-line
         comments in scripts during processing.
      
       - ResourceDatabasePopulator supports configuration of the start and end
         delimiters for multi-line (block) comments.
      
       - A new test case was added to ScriptUtilsTests for the new multi-line
         comment support.
      
      Issue: SPR-9531
      e5c17560
    • R
      Add HTTP series check shortcut methods to HttpStatus · 6b31074e
      Rossen Stoyanchev 提交于
      Issue: SPR-11424
      6b31074e
    • R
      Fix expected and actual argument order · 6a4a2ec6
      Rossen Stoyanchev 提交于
      Issue: SPR-11424
      6a4a2ec6
    • R
      Improve suffix pattern check · 3474afb1
      Rossen Stoyanchev 提交于
      After this change dots inside URI variables in a request mapping
      pattern are ignored and no longer considered an indication that
      the pattern contains a suffix itself.
      
      Issue: SPR-11532
      3474afb1
  7. 12 3月, 2014 2 次提交
    • J
      Polishing · 4d3ca431
      Juergen Hoeller 提交于
      4d3ca431
    • B
      Fix "relay-port" XSD type in spring-websocket.xsd · 8b2b1657
      Brian Clozel 提交于
      Prior to this commit, the `relay-port` attribute of the
      `<websocket:stomp-broker-relay />` tag was of type `xsd:int`.
      This prevents developers from using `PropertyPlaceholderConfigurer`,
      even though this configuration key is a good candidate for such use
      (this value depends on prod/staging/etc environment).
      
      This commit changes that type to `xsd:string`.
      
      Issue: SPR-11537
      8b2b1657
  8. 11 3月, 2014 8 次提交