Commit Graph

46 Commits

Author SHA1 Message Date
Artem Bilan
f3d3f4ee4b INT-2998: Channel Adapters' Lifecycle Refactoring
* Add XSD attributeGroup `smartLifeCycleAttributeGroup`
* Use it for all adapters tags
* Refactoring `AbstractChannelAdapterParser` hierarchy
* Refactoring some `MessageHandler`'s that should not have `autoStartup` & `phase`.
    It is the responsibility of `AbstrctEndpoint`
* Polishing some tests according new logic

JIRA: https://jira.springsource.org/browse/INT-2998

INT-2998: Polishing

Polishing

 - Reformat schemas where indentation changed
 - Add SLC to the UDP inbound adapter
2013-09-23 17:58:58 -04:00
Gary Russell
7f008b58c2 INT-1639 Externalize SpEL Evaluation Context
Allow modification of context property accessors and
functions.

Polishing

- Fix tests to ensure the EvaluationContextFactoryBean is
available when necessary.

Polishing - Use Utility for ALL EvaluationContexts

Add Test Showing Custom Function

See SpelTransformerIntegrationTests-context.xml

Polishing

Polishing -fix Remote Sync

Polishing - Emit WARN if No BeanFactory

Polishing - Do Not Override ConversionService

Kludge to Prevent Warning When No BeanFactory

Expressions for method invoking in the MessagingMethodInvokerHelper
don't need a BeanFactory - suppress the warning.

Polishing - PR Comments - Invert Boolean
2013-08-25 20:01:14 -04:00
Artem Bilan
116f4934c1 INT-2935: Improve Event Inbound Adapter
Previously, the `ApplicationEventListeningMessageProducer` accepted
all `ApplicationEvent`'s and than filtered them.
This caused some `ApplicationEventMulticaster.retrieverCache` overhead.

* Improve `ApplicationEventListeningMessageProducer` to `implements SmartApplicationListener`.

    This allows filtering earlier on first the appropriate `ApplicationEvent`
    using `ApplicationEventListeningMessageProducer#supportsEventType`
    and caching the `ApplicationListener` only for that `ApplicationEvent`.

* Re-register `ApplicationEventListeningMessageProducer` in the `ApplicationEventMulticaster`
    when  `ApplicationEventListeningMessageProducer#setEventTypes` is invoked
    to clear the `ApplicationEventMulticaster.retrieverCache`.

* Move `org.springframework.integration.gemfire.inbound.SpelMessageProducerSupport` to core `ExpressionMessageProducerSupport`.

* Add test for the new logic int `ApplicationEventListeningMessageProducer` and its behavior with respect to the `ApplicationEventMulticaster.retrieverCache`.

JIRA: https://jira.springsource.org/browse/INT-2935

INT-2935: EMPS JavaDoc & AELMP ReadWriteLock

INT-2935: AELMP#eventTypes changing 'barrier'

INT-2935: avoid 'eventTypes' mutation afterwards

INT-2935: Polishing according PR comments

INT-2935: Fix NPE in the `setEventTypes`

Minor Polishing

   Polish java docs/comments
   Remove compiler warnings
2013-05-08 12:25:04 -04:00
Gunnar Hillert
0271acaf4c INT-2916 - Upgrade to JUnit 4.11 in support of JDK7
For reference see: https://jira.springsource.org/browse/INT-2916

Changes:

* INT-2919 - Upgrade Spring Data Gemfire to 1.2.2.RELEASE
* Exclude Hamcrest transitive dependency from JUnit (as already explicitly declared)
* Set sourceCompatibility in build.gradle to 1.6
* Set targetCompatibility in build.gradle to 1.6
* Upgrade Hamcrest to 1.3 and fix deprications
  - Corematcher is(*class) change to is(instanceOf(*class))
  - Change org.junit.internal.matchers.TypeSafeMatcher to org.hamcrest.TypeSafeMatcher
  - Change import org.junit.matchers.JUnitMatchers.containsString to org.hamcrest.CoreMatchers.containsString
  - Change import org.junit.matchers.JUnitMatchers.both to org.hamcrest.CoreMatchers.both
  - Change import org.junit.matchers.JUnitMatchers.containsString to org.hamcrest.CoreMatchers.containsString
* Fix JUnit deprecations
  - changed junit.framework.Assert to org.junit.Assert
* Add few missing licenses headers to tests
* Marked several test classes with: @DirtiesContext(classMode=ClassMode.AFTER_EACH_TEST_METHOD)
  - SplitterIntegrationTests
  - GatewayInvokingMessageHandlerTests
  - FileToChannelIntegrationTests
  - FileInboundChannelAdapterWithRecursiveDirectoryTests
  - JdbcMessageStoreChannelTests
  - ChatMessageInboundChannelAdapterParserTests
* 3 Tests ignored (Still needs to be addressed):
  - testOperationOnPrototypeBean
  - testFailOperationWithCustomScope
  - testOperationOfControlBus
* Update SQL script (test-failure):
  - spring-integration-jdbc/src/test/java/org/springframework/integration/jdbc/config/outboundSchema.sql
  - add drop table statements
  - add ignore-failures="DROPS" to "jdbcOutboundChannelAdapterCommonConfig.xml"

INT-2916 - Code Review Changes

INT-2916 - Fix ignored Tests

Fix 3 previously ignored tests in *GroovyControlBusTests*:

* testOperationOnPrototypeBean
* testFailOperationWithCustomScope
* testOperationOfControlBus

INT-2916 - CI Build Testing

INT-2963 - Remove JDK7 Compilation Warnings

* Upgrade Mockito to 1.9.5
* Fix failing SubscribableJmsChannelTests

INT-2916 - Standardize Hamcrest assertions
Ensure Hamcrest assertions are standardized to: is(instanceOf(...))
2013-04-04 13:40:46 -04:00
Gary Russell
451beb424a INT-2873 Create 3.0 Schemas
Copy schemas, cleanup whitespace, update spring.schemas files,
update version in AbstractIntegrationNamespaceHandler.

For each schema compared the 2.2 version with the 3.0 version
(diff -w), ensuring the only difference is the import of
3.0 schemas (where appropriate) instead of 2.2.
2013-01-25 16:12:00 -05:00
Gary Russell
08cbab08c2 INT-2214, INT-343, INT-2250 MessageHandler Advice
Add general capability to advise just the handleRequestMessage
part of an AbstractReplyProducingMessageHandler.

This is to advise just the immediate operation, and not the
entire downstream flow.

Uses include:

* outbound gateway post processing
* adding retry behavior using spring-retry
* adding circuit breaker functionality

Initial commit for review.

Also need to advise simple message handlers (such as file
etc) to allow them to post-process file operations
with payload.delete(), payload.renameTo(...) etc.

INT-2250 Add Circuit Breaker Advice

INT-343 Add Retry Advice

Stateless and Stateful retry using spring-retry. Stateless
means the RetryTemplate performs the retries internally.
Stateful means the exception is thrown (e.g. to JMS container)
and the retry state is maintained by spring-retry.

INT-2215, INT-343, INT-2250 Refactoring

Factor out common abstract Advice class.

INT-2214 Catch Evaluation Expression Exceptions

If an onSuccess expression evaluation fails, add an
option so the user can decide whether such an exception is
caught, or propagated to the caller.

INT-2214 etc PR Review Polishing

INT-2214 etc Namespace Core, File, FTP

Add <request-handler-advice-chain/> to outbound endpoints.

INT-2214 etc. More Namespace Support

amqp, event, gemfire, groovy, http, ip, jdbc, jms, jmx, jpa, mail, rmi, sftp, twitter, ws, xmpp

INT-2214 etc Polishing

PR Review

INT-2214 etc Polishing

Don't catch Throwable.

Move Advice classes to handler.advice package.
2012-08-06 09:15:58 -04:00
Gary Russell
fcd3771c17 INT-2588 Remove Deprecation
@ExpectedException is deprecated.

Also fixes a sporadic timing issue in the client mode test;
the default retry interval is 60 seconds and we only wait
10 seconds for the connection. If the initial connection
fails, we don't retry before the timeout.

INT-2527 Remove Event Deprecation

@Test @ExpectedException... -> @Test(expected...
2012-05-25 15:30:24 -04:00
Artem Bilan
45c429ee2b INT-2275: any outbound-channel-adapter in <chain>
Add re-init logic for nested chains
Add logic about nested element for AbstractChannelAdapterParser
Refactor of DefaultOutboundChannelAdapterParser
Test for non-last nested chain with some outbound-channel-adapter
Improve XSD for chain-type
Manual outbound-channel-adapter ability for chain
Integration tests for all outbound-channel-adapter within <chain>
Remove redundant 'return-value-required' attribute from <stored-proc-outbound-channel-adapter>
Add support 'expectReply' for FileWritingMessageHandler

INT-2275 polishing & refactor FileOutbound*Parser

HttpRequestExecutingMessageHandlerTests polishing

INT-2275: polishing JavaDoc
2012-05-14 12:41:39 -04:00
Gary Russell
95cd202be6 INT-2536 Create 2.2 Schemas
Add 2.2 versions of module schemas.

JMX is already covered by an existing pull request.

INT-2536 Schema Check

Bump version for schema check in
AbstractIntegrationNamespaceHandler.

INT-2536 Remove Schema Versions

Some test config files had 2.1 versioned schemas.
2012-05-04 10:04:01 -04:00
Gary Russell
292aa90599 INT-2404 Fix Auto-Created Channel; Event, TCP, UDP
The AbstractChannelAdapterParser creates an implicit DirectChannel
if the adapter has no 'channel' attribute.

The Event, TCP, and UDP channel adapter parsers did not bind
this channel to the adapter and AC initialization failed with
'outputChannel is required'.

Further, the event schema marked the channel as being 'required',
precluding this feature.

INT-2407 Remove Channel use="required"

Parsers automatically generate the channel when none is provided.

- JMX
- JDBC
- SFTP
- Redis
- Feed
- XMPP
- Mail
- FTP
- HTTP
2012-01-23 10:12:34 -05:00
Gary Russell
f76f63f23a NT-2400 Fix tool:expected-type Classes
* MessageChannel was moved from core to the base package.
* ChannelResolver moved from core to support.
* TcpConnectionInterceptorFactoryChain was incorrect.
2012-01-13 13:21:41 -05:00
Gary Russell
b59ee8e352 INT-2369 package-info IP
INT-2360 package-info Core

INT-2361 package-info AMQP

INT-2362 package-info Event

INT-2363 package-info Feed

INT-2364 package-info File

INT-2365 INT-2380 package-info (S)FTP

INT-2366 package-info GemFire

INT-2367 package-info Groovy

INT-2368 package-info Http

INT-2378 package-info Scripting

INT-2372 package-info JMS
2012-01-05 14:42:24 -05:00
Mark Fisher
6ba83c0f8f removed xsd versions in event module 2011-10-10 10:56:40 -04:00
Mark Fisher
7c5603fe83 INT-2092 update schema imports to use 2.1 version 2011-08-31 05:26:02 -04:00
Oleg Zhurakousky
935cd01d07 INT-1512 changed the type of ID attribute to be xsd:string in all related 2.1 schema files 2011-08-08 23:34:12 -04:00
Mark Fisher
3e71b5a83b INT-2004 added 2.1 versions of all XML schemas and adjusted spring.schemas files accordingly 2011-08-05 11:07:20 -04:00
Oleg Zhurakousky
765503daa4 polishing, fixed warning messages 2011-05-03 19:20:57 -04:00
Mark Fisher
1803d73547 INT-1676 added spring.tooling and .gif icons for adapters that were missing these files 2010-12-10 10:41:54 -05:00
Gary Russell
c5dba36865 INT-1552 Add error-channel to other endpoint docs; schema doc polishing 2010-11-18 18:21:14 -05:00
Gary Russell
3af7a939db INT-1624 @author tags 2010-11-17 16:13:02 -05:00
Gary Russell
984ce33106 INT-1624 Add error-channel to event inbound channel adapter XSD, Parser, Test 2010-11-17 15:52:49 -05:00
Gary Russell
5c1652777e INT-1624 Add error-channel to event inbound channel adapter XSD, Parser, Test 2010-11-17 12:02:55 -05:00
Mark Fisher
d8ca51abc2 INT-1583 if received event has a Message as its source, it will be passed as-is 2010-11-03 12:56:17 -04:00
Mark Fisher
6cc758eefc INT-1582 if the payload is an ApplicationEvent it is passed as-is (no wrapping in MessagingException). Also, general polishing 2010-11-03 12:39:11 -04:00
Mark Fisher
b3c79358e1 INT-1505 added support for a 'payload-expression' attribute on the inbound ApplicationEvent Channel Adapter 2010-10-08 14:43:15 -04:00
Oleg Zhurakousky
32efbae90d INT-1263, more MessageHistory changes FTP, SFTP etc. 2010-09-23 09:45:01 -04:00
Oleg Zhurakousky
b6e058c59b INT-1263, added more changes and tests related valdating MessageHistory in every module 2010-09-22 18:44:51 -04:00
Mark Fisher
3b15a0dd38 INT-1390 moved MessageBuilder into the 'support' package, moved GenericMessage and ErrorMessage into the 'message' package 2010-08-31 02:51:27 +00:00
Mark Fisher
8314eeebf8 INT-1389 removed all dependencies on StringMessage from unit tests in spring-integration-event 2010-08-30 18:37:07 +00:00
Oleg Zhurakousky
2c7b57448b INT-1338, Added support for property placeholder 2010-08-23 18:10:58 +00:00
Oleg Zhurakousky
78dbf2bef5 INT-1338, Added namespace support for 'event-types' attribute 2010-08-23 17:09:32 +00:00
Mark Fisher
b879004b72 fixed event delivery to channel with no subscribers 2010-07-29 21:56:34 +00:00
Mark Fisher
164023c8bc INT-1301 MessagingTemplate methods now return void instead of boolean, but they throw Exceptions if the underlying channel send() invocation returns false. 2010-07-29 21:14:24 +00:00
Mark Fisher
3f00c75740 INT-1129 moved StringMessage from 'message' to 'core' (we might remove it before 2.0...) 2010-07-28 15:22:33 +00:00
Mark Fisher
4de9a23357 INT-1129 moved Message and MessageHeaders from 'core' to the root (org.springframework.integration) 2010-07-28 15:05:50 +00:00
Mark Fisher
94938a2746 INT-1129 moved MessageHandler from 'message' to 'core' 2010-07-28 14:54:09 +00:00
Mark Fisher
0b751cc18a INT-1129 moved SubscribableChannel from 'channel' to 'core' 2010-07-28 14:51:18 +00:00
Mark Fisher
4283315c08 INT-1129 moved PollableChannel from 'channel' to 'core' 2010-07-28 14:47:55 +00:00
Mark Fisher
00d3e351f7 INT-1129 moved MessageBuilder from 'message' to 'core' 2010-07-28 14:38:36 +00:00
David Syer
829d6efc08 Fix compiler warnings and move docbook build to a profile 2010-07-27 12:54:18 +00:00
Oleg Zhurakousky
0000aa2cfe INT-1221, Added test for pollable channel with executor 2010-06-28 18:37:16 +00:00
Oleg Zhurakousky
599bff36cb INT-1221, added namespace support for outbound-channel-adapter 2010-06-28 18:20:03 +00:00
Oleg Zhurakousky
6c402903e6 INT-1221, Added namespace support for ApplicationContextEvent Adapters 2010-06-28 16:18:21 +00:00
Chris Beams
5563c0b5af adding missing src/(test|main)/resources directories with .svnignore files to avoid empty-dir-pruning by svn 2010-05-26 14:27:42 +00:00
Chris Beams
e5219dfe8f eliminated all compiler warnings throughout all projects
updated pom to emit compiler warnings so that any new ones become obvious
added serialVersionUID to classes that could reasonably need to be serialized (GenericMessage, MessageHeaders, etc)
@SuppressWarnings("serial") on all others
@SuppressWarnings("unused") on private static classes used as spring beans for testing (their methods never get called from java)
eliminated all redundant casting
introducted generics metadata where raw types were still being used
changed public API on several FactoryBeans (by adding <Type> information to 'implements FactoryBean' clause)
2010-05-25 23:18:25 +00:00
Chris Beams
c08a7a657e renamed modules org.springframework.integration.* -> spring-integration-*
@Ignore'd SimpleTcpNetOutboundGatewayTests#testOutboundClose() to avoid failure; this failure is correlated to the module name change, but hard to understand how it would be caused by it
2010-05-25 13:21:25 +00:00