Commit Graph

232 Commits

Author SHA1 Message Date
Artem Bilan
5be8ef3fd8 INT-3147: (3167,3173,1941) Improve MetadataStore
Previously, `MetadataStore` couldn't be configured for Twitter Adapters
- only a global one could be used.
The `metadataKey` was generated automatically with a 'difficult' value.

* Register all `MessageSource` for `SourcePollingChannelAdapter`
as beans with id based on adapter id and prefix '.source' (INT-3147)
* Polishing parser to get rid of explicit `MessageSource` beans. (INT-3147)
* Make Feed and Twitter adapters `id` attribute as required -
now it presents a `metadataKey` for `MetadataStore` (INT-3147)
* Add to Twitter adapters a reference attribute for `MetadataStore` (INT-3173)
* Add Twitter adapters `poll-skip-period` attribute (INT-3167)
* Add and implement `MetadataStore#remove` (INT-1941)
* Make `MetadataStore` as `@ManagedResource` (INT-1941)
* Polishing tests

JIRAs:
https://jira.springsource.org/browse/INT-3147
https://jira.springsource.org/browse/INT-3167
https://jira.springsource.org/browse/INT-3173
https://jira.springsource.org/browse/INT-1941

INT-3147: Polishing and fixes

* add domain suffix to `metadataKey`
* change contract of `MetadataStore.remove`
* remove timeout window from `AbstractTwitterMessageSource`
* polishing and fix `SearchReceivingMessageSourceWithRedisTests`

INT-3147: Rebasing and polishing

INT-3147: fix 'metadata' package tangle

INT-3147 Doc Polishing
2013-11-04 12:44:12 -05:00
Gary Russell
9849e2087d INT-2628 Add ObjectNamingStrategy to IMBE
Allow customization of the generated ObjectName for the
Integration components.

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

INT-2628 Polishing

- Address PR comments
- Rename `naming-strategy` to `object-naming-strategy` for consistency with `object-name-static-properties`
2013-11-01 16:47:03 +02:00
Gary Russell
008bc8522b INT-3183 Document the IMBE 'id' Attribute
When declaring an IntegrationMBeanExporter, use an 'id' attribute
if you wish to obtain programmatic access to it (using injection
or referencing the BeanFactory.

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

Also turn off debug logging for JMX test cases.
2013-10-31 16:03:04 -04:00
Gary Russell
945eea7a36 INT-3188 Make Direct Handler Call Tests Robust
Previously, these tests examined specific stack frames to
verify the handler was directly invoked by the Dispatcher.

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

Add a utility method to scan the stack trace instead to
verify that the Dispatcher frame exists before any
MessagingMethodInvokerHelper frame.
2013-10-31 11:14:20 -04:00
Gary Russell
435064453f INT-3182 Fix JMX Operation Invoking With Primitive
Previously, methods with primitive parameters were not matched
with primitive wrapper objects.

Check, if the argument is a primitive wrapper, that the paramer type
can be the equivalent primitive.

Add test case.

INT-3182 Polishing - PR Comments

Extract PrimitiveWrapper->Primitive map to ClassUtils.

JIRA: https://jira.springsource.org/browse/INT-3182
2013-10-31 15:44:11 +02:00
Gary Russell
eaa28a9dbf INT-3186 Fix Metrics For Direct MessageHandler
When a simple MessageHandler is referenced from a
`<service-activator/>`, it is wrapped in an anonymous
AbstractReplyProducingMessageHandler to facilitate proper handling of
the `<request-handler-advice-chain/>` and so that normal
'produced no reply` messages are logged.

Previously, this caused 2 MBeans to be exposed, one for tha actual
handler; one for the wrapper.

This added more stack frames between the dispatcher and the
handler (because 2 sets of statistics were captured).

The root cause was that the MBean exporter was not aware of the
relationship between these objects.

https://jira.springsource.org/browse/INT-3186

Add code to the IntegrationMBeanExporter to suppress adding
metrics to the wrapper.

This involves detecting that it is a wrapper and not exposing
it as an MBean and, when matching handlers with endpoints,
checking that the wrapped handler is the actual handler for the endpoint.

Update test to reflect the reduced number of stack frames between
the dispatcher and handler.

Also add tests to verify the detection of multiple references to
the same ARPMH.

INT-3186: `IntegrationMBeanExporter` optimization
2013-10-31 15:38:19 +02:00
Gary Russell
848f3a5103 INT-3185 Fix Direct Handlers When Exposed as MBean
When determining candidates for direct invocation, we need
to use the target of any existing proxy (such as JMX Metrics).

Copy ServiceActivatorDefaultFrameworkMethodTests to the JMX project
and adjust to work with JMX Proxies.

INT-3185: fix for AbstractSMHFBean#checkReuse

JIRA: https://jira.springsource.org/browse/INT-3185
2013-10-30 18:58:34 +02:00
Gary Russell
928b6b8bc3 INT-2961 Make ARPMH.onInit() Final; Add doInit()
https://jira.springsource.org/browse/INT-2961

onInit() relied on subclasses calling super.onInit() to apply the
advice chain and add the BeanFactory to the MessagingTemplate.

At least one extension (smpp) failed to do this, disabling these features.

Make onInit() final and call doInit() for subclass initialization (no-op in ARPMH).

INT-2961 Polishing

- do not increase visibility of doInit in subclasses.
- remove final modifiers from doInit so user subclasses can participate in initialization if needed.
2013-10-29 10:20:19 +02:00
Gary Russell
be87cfc365 INT-3152 Speed Up Build Times
Add a `@Rule` to skip long-runing tests during normal builds.

Add the rule to long-running tests in gemfire, ip, jms, jmx.

Add an environment variable `RUN_LONG_INTEGRATION_TESTS`; when set
to true, all tests are run.

Set the environment variable to true on all nightly builds.

Build now runs in 13 minutes on my 3 year old laptop.
2013-09-26 17:38:38 -04:00
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
197f9d75ba INT-3144 Fix JMX Tests Timing Issue
Really only an issue with the queue channel test, but change
all tests to use CountDownLatches instead of relying on Thread.sleep().
2013-09-20 11:39:04 +03:00
Gary Russell
81ac7e56be INT-3124 JMX Check Mutually Exclusive Attributes
Only one of query-name and query-name-ref
Only one of query-expression and query-expression-ref
2013-09-03 18:49:54 -04:00
Gary Russell
99fa064dda INT-3124 Make Test Domains Unique
Gradle build failed with InstanceAlreadyExistsException.

Make domains unique in new tests and the one that failed.
2013-09-03 13:58:02 -04:00
Pid
5212ea13ef INT-3124 Add JMX MBean Tree Inbound Adapter
Add an MBeanTreePollingMessageSource that produces a graph of simple objects representing the JMX tree (INT-3124).

The DefaultMBeanObjectConverter converts MBean objects into a graph of Lists, Maps and arrays or primitives.

Formatting tidy, per feedback.

Feedback incorporated: split setter/attributes, more tests, inner bean constructor, logging changes.

Overloaded setter methods with different parameter types are now named separately, the endpoint attributes reflect this and tests are added to reflect this.

An inner bean can be supplied to provide an alternative MBeanObjectConverter.

Log a warning instead of a more destructive UnsupportedOperationException where there's incomplete parsing in the DefaultMBeanObjectConverter and add a trace level for exception debugging.

Minor test change and doc/reference update

Added attribute filter interface as suggested. Three implementations are provided 'all', 'named only' and 'not named'

actually add notnamedfield filter (doh).

Polishing
2013-09-03 13:06:01 -04:00
Gary Russell
db8da81d16 INT-3125 Fix Handler MBean Names Within Chains
Some handlers get a componentName, but not a beanName. For example
the TransformerFactoryBean may create a Transformer that's not
a bean, to wrap a POJO, or expression. The AbstractSimpleMessageHandlerFactoryBean
transfers the component name to the transformer but it has a null
beanName. It would not be appropriate for the FB to change the beanName.

The IntegrationMBeanExporter's fallback, when it can't find the handler
as part of a stand-alone endpoint, is to use the handler's toString().

IntegrationObjectSupport (IOS) toString delegates to Object.toString()
if there is no beanName.

IOS's getComponentName() falls back to the beanName if there is no
component name.

Change the IMBE to use the componentName as the first fallback and,
if null, fallback to the current fallback.

One side effect is that handlers that do have a bean name
will no longer have '.handler' at the end of their name; but this
is not really an issue because the MBean is designated as a
handler anyway (via the bean component of the ObjectName).

However, identifying chain components is new in 3.0 so this is
not really a breaking change.
2013-09-01 10:08:42 -04:00
Artem Bilan
70886b2543 INT-2822: 'requires-reply' for Outbound Gateways
* Add `requires-reply` attribute for all adapters outbound gateways as `true` by default
* WS-outbound-gateway is still without it, because it has its own specific attribute `ignore-empty-responses`
* Make `requires-reply` as `false` by default for `jdbc:stored-proc-outbound-gateway` inasmuch as `jdbc:stored-proc-outbound-adapter`
doesn't have ability to configure `returning-resultset`
* add parser tests for `requires-reply`

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

INT-2822 'requires-reply' for ws:outbound-gateway

Default false.

INT-2822: Polishing after rebase

INT-2822: deprecate 'ignore-empty-responses'

* Add 'requires-reply' section into What's New

INT-2822: remove 'ignore-empty-responses' from RM

INT-2822: Polishing after rebase

INT-2822: Rebased and polished

INT-2822: Rebased and polished

Add WARN within deprecated `AbstractWebServiceOutboundGateway#setIgnoreEmptyResponses`

Revert 'ignore-empty-responses'; Doc Polishing
2013-08-19 13:48:31 -04:00
Gary Russell
1847eaa194 INT-3110 Fix JMX Control Bus With SF 3.2.3
Spring 3.2.3 registers MBean operations with parameter names
instead of the JVM default p1, p2 etc based on parameter position
in the method signature.

Since the OperationInvokingMessageHandler matched the supplied
arguments using the p1, p2 etc names, this prevented the control
bus from finding the target method.

Fall back to the old naming scheme based on parameter position
if a matching parameter is not found.

Add a test using a Map payload to supply the named arguments (p1, p2).

Add an ignored test that tests using named arguments (key, channelName).

Test with 3.1.4; remove Ignore and test with 3.2.3.

TODO: remove the Ignore annotation when SF 3.2.3 is the minimum.
2013-08-16 16:14:29 -04:00
Gary Russell
50e728f9e0 INT-3035 Fix ExponentialMovingAverageRate 'window'
'window' constructor arg was not used.

Add test.
2013-06-06 11:37:30 -04:00
Artem Bilan
ecf15a9834 INT-2755: Support 'id' For <chain> Child Elements
* Introduce XSD 'id' attribute for all `<chain>` sub-components
* Register `<chain>` sub-components as Beans with names based on `<chain>` 'id'
* Generate aliases for sub-components based on element 'id'
* Add `<chain>` parser test to check sub-components as Beans within `BeanFactory`
* Ignore `NestedChainParserTests` as abnormal and confused for SI-configs
* Now `<chain>` sub-components are trackable by `MessageHistory`
* Now `<chain>` sub-components are eligible for JMX export
* Polishing some failed tests

https://jira.springsource.org/browse/INT-2755
https://jira.springsource.org/browse/INT-2321

INT-2755: Register as Beans only if 'id' provided

INT-2755: Set 'componentName' for handlers with 'id'

When components within `<chain>` are configured with an 'id' attribute
the 'componentName' of the handler is  constructed as:
chainHandler.componentName + '.' + handler.componentName.
Otherwise it is as was before.

INT-2755: Polishing

INT-2755: changes according PR's comments

* Add INFO about preference of `id` attribute for `<chain>` in the `ChainParser`
* Change `<chain>`'s sub-components `id` generation algorithm
* Configure `<chain>`'s sub-component `componentName` in the `ChainParser` instead of in the `MessageHandlerChain`
* Add `componentName` property to the `JpaOutboundGatewayFactoryBean`
* Add a note to the Reference Manual

INT-2755: Localize duplicate 'id' within chain

INT-2755: remove child beans aliasing

* Polishing tests
* Polishing docs

INT-2755 Polishing: Handle Nested Chain Bean Names

Previously named beans within a nested chain did not get unique
bean names.

INT-2755: Polishing nested chains

Doc Polishing
2013-05-21 12:26:27 -04:00
Gunnar Hillert
05062aa0b2 INT-2964 Various JavaDoc Fixes
INT-2964 - JavaDoc: <emphasis> should be <em>

INT-2964 - JavaDoc: <p/> should be <p>

INT-2964 - JavaDoc polishing

* <li></li> should be wrapped in <ul></ul>
* wrap code snippets in {@code myCode()}
* change <code>false</false> to <code>false</code>

INT-2964 - Polish - Fix more JavaDoc errors

* Mockito-all dependency causes JavaDoc error. Change dependency to Mockito-Core.
2013-04-15 17:11:38 -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
32ccd988a0 INT-2929 Fix JMX Occasional Failing Tests
ExponentialMovingAverageRateTests are VERY sensitive to
timing, when running on a busy platform.

Add code to skip the assertions if we detect we are
running on a slow machine.
2013-02-14 02:08:53 -05:00
Gary Russell
e822bfd908 INT-2823 Add QueueChannelOperations
Operations on QueueChannel (clear, getQueueSize etc) are not available
when the IntegrationMBeanExporter is configured because they
are not declared on the PollableChannel interface.

Add an additional interface QueueChannelOperations.

The proxy proxies all interfaces so users can cast the
proxy to QueueChannelOperations to use its methods.
2013-02-12 15:05:01 -05: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
d28fefc884 INT-2487 Object Name Patterns for Notifications
Permit the specification of an ObjectName pattern in
NotificationListeningMessageProducer.

Permit a collection of ObjectNames (patterns).

INT-2487 Polishing

Use varargs and a SpEL Reference instead of 2 setters.

Log an error if no MBeans matching pattern(s).

INT-2487 Polishing: PR Review Comments

Add patterns to ERROR log when no MBean(s) found.

Add doc to schema and reference.
2012-09-07 08:07:36 -04:00
Gary Russell
273bba370b INT-2730 Move OrderlyShutDownAware Interface
Move from core to context.
2012-08-31 17:57:33 -04:00
Gunnar Hillert
dad4eac9ac INT-2710 - Remove hard-coded schema references
For reference see: https://jira.springsource.org/browse/INT-2710
2012-08-28 17:08:43 -04:00
Oleg Zhurakousky
246a202661 INT-2626 Fix RLR parser
Fix RecipientListRouterParser to extend
from AbstractRouterParser, thus eliminating
the problem described in INT-2626.

Previously, the router was a top level bean and, since
it is an @ManagedResource, the mbean exporter eagerly
instantiated it (and its Recipients) before the
ChannelInitializer ran.

Now, it is an anonymous inner bean inside a FB,
so the exporter no longer "finds" it,
thus deferring the Recipient instantiation
until the router itself is instantiated via its FB,
which will be after the C.I. runs.

This is all fine, with one caveat - previously the RLR
is made available as an MBean - now it is not,
unless you ALSO add the int-jmx:mbean-exporter.

However, the MBean is very basic, with no attributes and
a single operation 'setShouldTrack()', so the risk is
extremely low and the workaround is to add the
IntegrationMBeanExporter.

INT-2626 polished based on PR comments
2012-08-14 15:21:20 -04: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
Gunnar Hillert
57bc67b8fb INT-2689 - SI builds without warnings (Except Spring Integration HTTP)
* Ensure that no deprecation warnings occur
* Spring Integration builds with all tests successfully for Spring 3.1.2.RELEASE and 3.0.7.RELEASE (Except Spring Integration HTTP)

For reference see: https://jira.springsource.org/browse/INT-2689

INT-2694 - Fix Http Test Failures with Spring 3.0

As part of INT-2689, fix Http Test Failures in the Spring Integration Http Module when using Spring 3.0.7.RELEASE
For reference see: https://jira.springsource.org/browse/INT-2694
2012-08-01 13:09:51 -04:00
Gary Russell
c63141f6e0 INT-2665 JMX Endpoints And Remote MBeanServer
JMX endpoints need a reference to an MBeanServer. The MBeanServer
is a sub-interface of MBeanServerConnection.

When connecting to a remote MBeanServer, the server is an
instanceof MBeanServerConnection, not MBeanServer.

Change the Endpoints to get a reference to an MBeanServerConnection.

Add IOException catch clauses where necessary.
2012-07-19 13:04:04 -04:00
Artem Bilan
dce4e8ec01 INT-2641: fix JavaDoc warnings
JIRA: https://jira.springsource.org/browse/INT-2641
2012-06-29 09:42:58 -04:00
Gary Russell
ae0abc4f6c INT-2515 More Orderly Shutdown
* Add beginShutdown() and endShutdown() to OrderlyShutdownCapable
* JMS/AMQP stop listener containers
* TCP (server side)
** after beginShutdown() disallow new connections, drop (log) new messages
** after endShutdown() close server socket
* HTTP (server side)
** after beginShutdown() disallow any new requests (503 Service Unavailable)

* Docbook updates
** What's new section
** Orderly Shutdown section.
2012-06-26 10:31:22 -04:00
Artem Bilan
5bc41bc60b INT-1029: Support for outbound-gateways in chain
XSD refactoring: remove use="required" from 'request-channel' attribute of all 'outbound-gateways'
Tests for all 'outbound-gateways' inside the <chain>
2012-06-07 13:20:56 -04:00
Oleg Zhurakousky
835d8ff77a INT-2318
removed pre-initialization of MBeanExporter form IntegrationMBeanExporter since its no longer required
2012-06-01 11:52:19 -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
0a12a496cc INT-2485 Orderly Shutdown
Initial commit - @ManagedOperation on IMBE

- can be invoked via JMX, <control-bus/>, or getting a reference to
the IMBE from the application context.

INT-2485 Updates After Review Comments (JIRA)

* Shutdown Schedulers first, and wait for them
* Add a force parameter, which overrides thread pool shutdown options
* Shutdown Sources/Channels after all thread pools have stopped
* Mark other components as OrderlyShutdownCapable (e.g. JMS/AMQP Listener containers) and shut them down first
* Wait for remaining time to allow for quiescence

Also
* remove TimeUnit parameter (not JMX-friendly); time limit is now always milliseconds
* If thread pools don't stop in time limit, force them down.

INT-2485 Handle Self-Destruction

Add shutdown-executor to IMBE.

When the shutdown was called on a Spring-Managed thread, the shutdown
was not clean because we timed out waiting for the current thread to
terminate. After that, we force terminated other components.

Now, by providing a dedicated Executor for the shutdown process, it
is used for the shutdown instead of the current thread. This Executor
is *not* shutdown.

It is not necessary to provide an Executor if the stopActiveComponents()
method is called on some other thread that is not involved in the
shutdown.

Also adds executor name to logs, when available.

INT-2485 Polishing

Fix MBean object name collision when running all tests.

INT-2485 Enable TCP Shutdown

Make TCP connection factories 'OrderlyShutdownCapable' so
they are stopped before schedulers/executors in order for
them to release any executor threads they are holding.

INT-2485 Polishing

Didn't need DirectFieldAccessor - scheduler and executor have
an accessor for the native ExecutorService.

Copyrights

INT-2485 Polishing

schemaLocation version.

INT-2485 PR Review Polishing
2012-05-10 08:10:00 -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
Oleg Zhurakousky
458eac43da INT-2434 Fix How input-channels are auto-created
Channel creation logic for channels that are not explicitly defined but identified via an 'input-channel' attribute on the corresponding endpoint is now done by ChannelInitializer - an InitializingBean implementation.

This bean plays a role of pre-instantiator since it is instantiated and initialized as the very first bean of all SI beans using AbstractIntegrationNamespaceHandler

INT-2434-v3 polishing

INT-2434-v3 polishing, changed ChannelCreatingFactoryBean from BeanFactoryPostProcessor to BeanFactoryAware

INT-2434 polishing

fix the test

changed the default name of the CHANNEL_CREATOR_BEAN_NAME to a simple name

added additional test

changed ChannelCreatingFactoryBean from FactoryBean to InitializingBean and renamed it to ChannelInitializer

INT-2434 added test validating how automatic channel creation can be disabled

INT-2434 polished based on the latest PR comments

INT-2434-v3 polishing based on comments and discussions with @markfisher and @garyrussell. Added support for disabling aut-creatioin of channels

INT-2434-v3 polished based on @garyrussell last comments

INT-2434-v3 final polishing
2012-03-30 14:40:22 -04:00
Gary Russell
864a4ef291 INT-2415 MBean Name Collisions in Tests
JMX Tests failed due to InstanceAlreadyExistsException; name
collisions between MBeans registered in multiple tests.

Adds a domain to the new tests added to fix INT-2413 to
force unique MBean names.
2012-01-23 11:52:43 -05:00
Gary Russell
b899595e01 INT-2413 <int-jmx:mbean-export/> And <control-bus>
When an AbstractMappingMessageRouter is included in an
ApplicationContext that also has an <int-jmx:mbean-exporter/>,
the @ManagedOperations (set and remove mapping) are no longer
visible to the <control-bus/>.

Adds these methods to a new interface MappingMessageRouterManagement,
thus making them available on the proxy that the MBean exporter
creates.
2012-01-23 10:34:58 -05: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
Chris Beams
f30da932e8 INT-2388 Update Gradle build
This is a significant update to the build system, including the changes
listed below. README.md has been updated with instructions on the most
important day-to-day commands.

 - Eliminate buildSrc submodule

   In favor of using the new bundlor and docbook-reference plugins. The
   net effect is a large reduction in number of lines of build code.
   Common docbook resources, stylesheets, etc are stored directly in the
   docbook plugin.

   This means that --recursive is no longer required when cloning and
   there will never be a need to use `git submodule` commands. README
   files have been updated to reflect.

   Use of the new bundlor plugin also means the removal of template.mf
   files from the source tree in favor of an inline approach. See
   build.gradle for details. Bundlor 'import templates' are built up
   programmatically and kept physically close to gradle dependency
   declarations, leading to more convenience when changing these values
   and hopefully fewer errors / version inconsistencies over time.

   Certain tests depended on the presence of template.mf files, all of
   which have recently been removed from the source tree in favor of the
   new bundlor plugin which allows for inlining bundlor configuration
   within the Gradle build script. These tests now create temp files
   using the java.io.File API instead.

 - Upgrade to Gradle 1.0-milestone-6

   The m6 release is significantly faster when resolving dependencies
   and has a number of valuable new features over the earlier m3
   version. Review the release notes for Gradle 1.0-milestone-6 online
   for full details.

 - Switch to repo.springsource.org repository

   Previously the project build declared as many repositories as
   necessary to resolve all project dependencies.

   Now depending on a single 'virtual repository' defined within the
   SpringSource Artifactory instance at http://repo.springsource.org.
   Currently, the virtual repository in use is 'libs-milestone', which
   allows for the resolution of all "milestone-or-better" versions of
   all S2 and third-party dependencies.

   Should snapshot dependencies become required, this value may be
   changed from 'libs-milestone' to 'libs-snapshot'. To build only
   against GA releases, change the value to 'libs-release'.

 - New build plan(s)

   Spring Integration build plans have been updated to use the
   Artifactory Bamboo plugin and publish to repo.springsource.org.
   Build plans have names like 2.1.x to reflect the version under
   development, not necessarily the name of the branch, as this may
   change over time and across major releases.

 - Improve release process

   As mentioned above, Spring Integration will now use the Artifactory
   Bamboo plugin to publish releases and also use Artifactory's support
   for pushing builds directly into Maven Central via oss.sonatype.org.

   Generate poms that contain all necessary fields for onboarding at
   Maven central (scm, developers, organization, licenses, etc).

   Generate -source and -javadoc poms to comply with Maven Central
   onboarding rules (and for general good practice anyway).

   Generation of PGP signatures, sha1 and md5 checksums are all handled
   automatically by Artifactory. These are also requirements for
   automated entry into Maven Central.

 - Remove source-level pom generation

   Automatic generation of Maven poms suitable for use in building
   Spring Integration is no longer supported. Generation and
   publication of poms for the purpose of dependency management remains
   supported.

   Sonar support has to date depended on these poms, but will be
   switched over to use the Gradle Sonar plugin shortly.

 - Eliminate docs subproject

   Move docs/src to the root of the project and eliminate docs as a
   formal subproject. This simplifies the build in a number of ways,
   including removing the need for distinguishing between 'subprojects'
   and 'javaprojects' as well as allowing users to build both 'api' and
   'reference' docs without qualifying with a ':docs' prefix.

   Also rename the src/info directory to src/dist to better reflect that
   these files are packaged with the distribution. For example, the
   readme.txt there is really the distribution readme, distinct from the
   README.md at the root of the project which is for building from source,
   etc.
2012-01-05 17:49:04 -05:00
Gary Russell
89cdef7a90 INT-2373 package-info JMX
INT-2374 package-info Mail

INT-2375 package-info MongoDB

INT-2376 package-info Redis

INT-2377 package-info RMI

INT-2379 package-info Security

INT-2381 package-info Stream
2012-01-05 15:29:48 -05:00
Gary Russell
65fa5358e7 INT-2355 Update Mockito to 1.9.0 2012-01-04 12:05:48 -05:00
Mark Fisher
abe6220e02 Update version to 2.1.0.BUILD-SNAPSHOT 2011-12-23 12:15:13 -05:00
Mark Fisher
e67c115004 Release version 2.1.0.RC2 2011-12-23 12:00:52 -05:00
Mark Fisher
21c727b6fe INT-2329 upgrading to Spring 3.0.7 2011-12-22 15:27:53 -05:00
Oleg Zhurakousky
03754b917a INT-2307
fixed NPE due to the missing class name from BeanDefinition
2011-12-20 16:23:14 -05:00
Mark Fisher
77abc55a1e INT-2322 2011-12-20 13:18:57 -05:00