Commit Graph

201 Commits

Author SHA1 Message Date
Gary Russell
0f46176c3d INT-2287 Timing Hole With Send-and-Forget TCP
If a tcp client connection factory was configured for single-use
connections (one socket per message), and it was used by an outbound
channel adapter (send and forget), the socket is closed immediately
after sending the message.

This could cause issues with the connection handling because certain
failures could occur. For example, the close could occur before we
ever registered the channel for read selection, resulting in a
ClosedChannelException. Secondly, there was a small timing hole
where a selection key could be invalidated between the isValid()
call and isReadable().

These problems have been corrected.
2011-11-30 16:23:33 -05:00
Gary Russell
3fff33c99b INT-2268 Fix Spurious Failing Test
Occasional test failures caused because test HelloWorldInterceptor
could prematurely close the connection, depending on timing.

Also added some minor cleanup to the tests themselves.
2011-11-29 11:50:32 -05:00
Mark Fisher
4417d5d8b0 Update version to 2.1.0.BUILD-SNAPSHOT 2011-11-23 17:33:09 -05:00
Mark Fisher
1001d74ba7 Release version 2.1.0.RC1 2011-11-23 17:20:56 -05:00
Mark Fisher
6c1454ae3d INT-2238 removing warnings in JavaDoc 2011-11-22 21:48:34 -05:00
Oleg Zhurakousky
43f60dae08 INT-2238 interim commit
INT-2238 fixing warning comments

INT-2238 fixing warning comments

INT-2238 fixing warning comments
2011-11-22 21:10:32 -05:00
Mark Fisher
2bd870200d Update version to 2.1.0.BUILD-SNAPSHOT 2011-10-26 11:26:37 -05:00
Mark Fisher
4f12694d82 Release version 2.1.0.M3 2011-10-26 10:44:18 -05:00
Gary Russell
7c3f2ee8c4 INT-2184 Lifecycle Problem With TCP OB Adapter
Autostartup defaulted to false and isRunning() returned
the status of the associated connection factory instead
of its own status. Precluded it being started because
LifeCycle processor thought it was already started.
2011-10-17 11:56:48 -04:00
Gary Russell
e9778b7526 INT-2167 Code Polishing
Missing braces.

Add private constructors to utility classes.

Remove unnecessary logger overrides.

Remove unnecessary null check.

Remove redundant 'implements BeanNameAware'.

Improve Synchronization in UDP.

Removed Unused Obsolete Constants
2011-10-17 11:50:21 -04:00
Gary Russell
57121604d3 INT-1872 Allow Indefinite Socket Timeout
Previously, for single-use server sockets, and for client sockets
that have a collaborating inbound adapter, the socket timeout
was set to 10 seconds, with no way to set to infinity. The work
around was to set it to Integer.MAX_VALUE.

The intent was to avoid DoS attacks and mis-behaved clients, but
some users have expressed a desire to be able to set an infinite
timeout in both scenarios.

A future release may remove the 10 second default from the client
socket that has a collaborating inbound adapter, and default to
infinity. For this reason, that case now emits a warning.

The default 10 second timeout on single-use server sockets will
likely remain.

INT-1872 Remove WARN Log

We decided to eliminate the log message regarding a possible
future change to the default timeout for client sockets used
for request/reply.
2011-10-17 11:45:08 -04:00
Gary Russell
9f302172c6 INT-2183 Fix Multicast Regression Issue
Multicast tests are @Ignored because multicast has specific
requirements on the build machine. A regression issue was
introduced by INT-2050.
2011-10-15 13:53:53 -04:00
Gary Russell
a7bda6bbb2 INT-1770 Support Client Mode For TCP Endpoints
Add client mode for inbound endpoints, and for the
outbound adapter.

INT-1770 Allow Inbound Adapter to Open Connection

Normally, inbound adapters use server sockets and wait for incoming
connection. There are use cases where the adapter should establish
the connection and wait for inbound messages.

INT-1770 Open Connection on Start

Allow configuration of outbound adapter to permit
connection establishment when the adapter is started
rather than when the first message arrives.

INT-1770 Allow Inbound Gateway to Open Connection

Normally, inbound gateways listen for connections. There are
use cases where an inbound gateway might open the connection
and then wait for incoming requests.

INT-1770 Parsers

Update parsers and tests to support attributes for setting
endpoints in client-mode.

INT-1770 Docs

Update reference with client-mode information.

INT-1770 Add Control Bus for Client Mode

Enable control bus commands to check status and to attempt
connection establishment.
2011-10-14 18:10:06 -04:00
Gary Russell
1cb7990f6c INT-2179 Fix NPE If Connection Id Header Missing
ip_connection_id header is used to determine to which socket
a message should be written. If this header is missing, we
can't send the message and we log an error. Previously, an
NPE was thrown.

This applies to inbound gateway replies and asynchronous
outbound server messages.
2011-10-13 17:08:10 -04:00
Mark Fisher
ad0ccf5dff Update version to 2.1.0.BUILD-SNAPSHOT 2011-10-12 15:47:10 -04:00
Mark Fisher
b0793cb3bd Release version 2.1.0.M2 2011-10-12 15:34:49 -04:00
Mark Fisher
e09a5da3ec versionless schemas for http and ip modules 2011-10-10 12:49:30 -04:00
Gary Russell
7ff2861168 INT-2168 Reinstate Port in Tcp Connection Id
Port was always zero; broken by INT-1822.
2011-10-05 17:41:15 -04:00
Gary Russell
7981855c78 INT-2050 Code Polishing
INT-1876 Add AutoStart and Phase to TCP Endpoints

There was no way for an application to control the startup
of TCP endpoints. This is particularly an issue for controlling
availability of inbound endpoints.

The TCP Endpoints are mostly static, with dynamic behavior
being contained in connection factories. The factories
implement SmartLifecycle but there is no way to
configure auto-startup.

Adds auto-startup and phase attributes to all TCP endpoints

Starting/stopping an endpoint will start/stop the underlying
connection factory. When a connection factory is stopped,
all open connections are closed, and no new connections will
be acceptedi (inbound) or allowex (outbound).

While the factories implement SmartLifecycle, they return
false to auto-startup. We rely on the fact that
the endpoints are dependent on factories and
the factories will be started because of this dependency.

Finally, with collaborating endpoints (where an inbound and
outbound adapter are bound to the same factory), starting/
stopping one endpoint will affect the collaborating
endpoint too.

INT-1876 Polish Schema Docs

Doc was incorrectly talking about connection factories instead
of endpoints.

INT-2162 Add apply-sequence to Connection Factory

When messages are generated as a result of incoming tcp messages, and this
attribute is true (default=false), the sequenceNumber and
correlationId headers will be set. This will facilitate
downstream resequencing if necessary.

The 'ip_connection_id' header is still required for internal correlation
of reply messages to the right socket (regardless of whether downstream
components have altered the correlationId), and will contain the same value
as the correlationId (if set). This will not use up more memory for the
header content because they will both point to the same heap object.

The 'ip_connection_seq' header is deprecated and may be removed
in a future release.

TcpConnection.getConnectionSeq() has been renamed to
incrementAndGetConnectionSequence() because it is not a simple
getter method, it increments the connection's sequence number.

INT-2162 Update Docs for apply-sequence

Add documentation for apply-sequence attribute on
TCP Connection Factories.
2011-10-03 15:20:57 -04:00
Gary Russell
5624feacc0 INT-2154 Minor Refactoring
Factor out socket creation to a protected method, to facilitate
easier subclassing, enabling something other than the default
Socket factories to be used.
2011-09-27 11:56:17 -04:00
Gunnar Hillert
b01f987882 INT-2123 - Cleaned up dependencies
2 modules still had Spring 3.1 transitive dependencies:

* Spring Integration Redis
* Spring Integration Gemfire

1 module was lacking a Jackson dependency:

* Spring Integration AMQP
2011-09-13 11:55:37 -04:00
Mark Fisher
797b4f39f0 Update version to 2.1.0.BUILD-SNAPSHOT 2011-09-02 18:13:36 -04:00
Mark Fisher
1c49e222db Release version 2.1.0.M1 2011-09-02 18:04:49 -04:00
Mark Fisher
8dd16104d5 updated template.mf files 2011-09-02 17:23:49 -04:00
Mark Fisher
9a1f72b95a INT-2099 upgraded to Spring 3.0.6.RELEASE 2011-08-31 16:43:26 -04:00
Mark Fisher
9f59001230 removed deprecated trigger sub-elements non-core 2011-08-31 12:54:22 -04:00
Mark Fisher
7c5603fe83 INT-2092 update schema imports to use 2.1 version 2011-08-31 05:26:02 -04:00
Mark Fisher
189d047514 INT-2078 valid repositories IDs for Maven 3.0 2011-08-24 20:06:46 -04:00
Mark Fisher
a946f9960a updated POMs with Spring 3.0.5.RELEASE 2011-08-19 16:17:13 -04:00
Oleg Zhurakousky
1b0a2e85c3 INT-2029 added initial implementation of RedisMessageStore. Upgraded Jackson to version 1.8.3 which is used by spring-data-redis. Regenerated POM files 2011-08-09 09:34:59 -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
Oleg Zhurakousky
74817b98fc INT-2036 added Spring 3.0.5 exclusions for spring-integration-ws and spring-integration-xml in build.gradle. Regenerated POMs 2011-08-08 16:15:52 -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
Mark Fisher
b727868306 INT-2018 added explicit spring-tx dependency in spring-amqp-integration and refined the exclusions 2011-08-05 08:38:54 -04:00
Mark Fisher
6e225847aa INT-2018 added excludes for spring modules in the spring amqp dependency of spring-integration-amqp 2011-08-04 17:51:25 -04:00
Mark Fisher
c35a79a0e9 INT-2032 migrated 'spring-integration-gemfire' to main branch from sandbox in preparation for 2.1 development 2011-08-04 16:16:13 -04:00
Dave Syer
304e9b2abb regenerate poms for AMQP changes 2011-08-03 14:38:21 +01:00
Mark Fisher
8cec1e5aa5 INT-2003 added the 'spring-integration-amqp' module 2011-07-22 18:28:37 -04:00
Mark Fisher
f976e697f2 INT-2002 removed the spring-integration-httpinvoker module 2011-07-22 18:08:29 -04:00
Mark Fisher
8b597c1cda INT-1999 upgraded to Spring Framework 3.1 M2 2011-07-22 18:00:40 -04:00
Mark Fisher
74747fdd8f INT-1999 updated template.mf files for new 2.1.0 version range 2011-07-22 17:01:33 -04:00
Mark Fisher
46238e555c INT-1999 updated version to 2.1.0.BUILD-SNAPSHOT and regenerated POMs 2011-07-22 16:59:09 -04:00
Mark Fisher
9a43781973 updated POMs for 2.0.6.BUILD-SNAPSHOT 2011-07-18 18:09:12 -04:00
Mark Fisher
2e605f24c9 updated template.mf files for 2.0.6.BUILD-SNAPSHOT 2011-07-18 18:07:12 -04:00
Mark Fisher
b1ee08b8d1 Release version 2.0.5.RELEASE 2011-07-18 17:36:31 -04:00
Oleg Zhurakousky
98bbb98de3 INT-1975 regenerated POM files 2011-07-14 11:49:16 -04:00
Gary Russell
9b626c946b INT-1937 Fix NIO Connection State on Exception 2011-06-11 10:35:12 -04:00
Gary Russell
fc7f3e9f83 INT-1895 Use FactoryBean to Allow Late-Binding of using-nio Attribute 2011-06-09 19:16:36 -04:00
Oleg Zhurakousky
5bf590bbfb changed POMs to use version 2.0.5.BUILD-SNAPSHOT 2011-05-23 08:19:47 -04:00
Mark Fisher
6d0aaa7c62 Update version to 2.0.5.BUILD-SNAPSHOT 2011-05-18 14:40:41 -04:00