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.
Add a subscriber limit on both unicast and publish-subscribe
channels. This permits detection of inadvertent channel wiring
during context initialization.
Also add a mechanism to globally set these defaults.
Two properties are added to ChannelInitializer. If the
'channelInitializer' bean is declared before a channel, and
these properties are set, it will globally override the
default (Integer.MAX_VALUE) for these properties.
For example:
<bean id="channelInitializer" class="org.springframework.integration.config.xml.ChannelInitializer">
<property name="autoCreate" value="true" />
<property name="defaultMaxUnicastSubscribers" value="1" />
<property name="defaultMaxMulticastSubscribers" value="2" />
</bean>
will make the default max-subscribers 1 and 2 for <channel/> and
<publish-subscribe/> channels respectively.
Also applies to module channels (jms, amqp, redis).
FileReadingMessageSource supports disposition of the payload
after the message is sent (or via transaction synchronization).
The (S)FTP adapters delegate to an FRMS; add support for the
file disposition expression, result channel, and send timeout
to the (S)FTP adapters.
Also tested with ftp sample - INTSAMPLES-83 - patch will be
committed once this is in a milestone.
FTP servers return full path from listNames() whereas SFTP
returns just the filename. mget logic assumed SFTP behavior.
Add a test to see if the filename already starts with the remote
directory and remove it before calling get() (which assumes just
the filename).
Includes an @Ignored test for FTP and SFTP that runs an mget
against a server.
DefaultTcpNioSSLConnectionSupport and DefaultTcpNetSSLSocketFactorySupport need
an SSLContext which is set up in afterPropertiesSet(). However, when configuring
the connection factories with default strategies, afterPropertiesSet() is not
called. Result: NullPointerException.
Add call to afterPropertiesSet() where appropriate and tests to verify.
Previously, the UDP inbound adapter was incorrectly using
the default task scheduler (taskScheduler) to run its main
receive activity. Once a packet is read, it is handed off
to another thread for message processing, using a configured
(or default) task executor.
We should not hold on to a scheduler thread permanently; the
default scheduler has only 10 threads and one user's app
stopped working when using 10 inbound adapters.
The work around was to define an explicit 'taskScheduler'
bean with more threads.
The problem reported by INT-2630 was more extensive. For example,
the unconditional parameter conversion causes arrays to be copied
unnecessarily.
The BeanFactoryTypeConverter now does a no-op conversion whenever
the source type is assignable to the target type.
This effectively reverts to the Spring 3.0 behavior, where this
assertion resulted in the argument not being added to the
argsRequiringConversion array.
Polishing
Add a couple more tests
Pseudo transaction support means some projects now
need a transitive dependency to spring-tx. Previously
the project was marked as optional in the POM.
Improve performance.
For NIO sockets, a pair of PipedInput/OutputStreams are
used to transfer data from the reading thread to the
assembling thread.
The stream used the default buffer size (1024) which was
inefficient for large messages.
This change uses the underlying socket's receiveBufferSize
attribute to set the size of the piped stream, allowing
for more efficient data transfer.
Also adjusts the mocks in the deadlock detection test
to ensure the received data is larger than the pipe
buffer size.