Commit Graph

45 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
Artem Bilan
6a9cb75668 INT-2312 Add HTTP RequestMapping support
The general idea is to use Spring-MVC as much as possible.

* Introduce `RequestMapping`, `IntegrationRequestMappingHandlerMapping`
* Introduce XSD nested element `<request-mapping>` for HTTP Inbound Endpoints
* Introduce `inboundCommonAttributes` XSD attributeGroup for HTTP Inbound Endpoints
* Introduce `IntegrationNamespaceUtils#createExpressionDefIfAttributeDefined` & `IntegrationNamespaceUtils#createDirectChannel`
* Remove deprecated `name` attribute
* Remove `UriPathHandlerMapping` as superseded by `IntegrationRequestMappingHandlerMapping`
* Add documentation for `<request-mapping>`
  - Add description to Reference Manual about `<request-mapping>`
* Add documentation to section 'What's new'
* Add additional test for `<request-mapping>`

JIRA: https://jira.springsource.org/browse/INT-2312, https://jira.springsource.org/browse/INT-2619

Additional changes:

* INT-2528 Remove deprecations in HTTP module
  - JIRA: https://jira.springsource.org/browse/INT-2528
* Add Jackson 2 support for HTTP-inbound
* Using Jackson 2 HttpMessageConverter if Jackson 2 is available in classpath
* Make `RequestMapping` public
* Introduce `HttpContextUtils` and move `HANDLER_MAPPING_BEAN_NAME` to it
* Revert and deprecate public API
* Improve JavaDocs
* Improve Reference Manual

Thanks also to Biju Kunjummen for his incorporated commit.
2013-10-01 18:00:28 -04:00
Artem Bilan
28131aab32 INT-3158: Mark Delayer Int. tests as long-running
JIRA: https://jira.springsource.org/browse/INT-3158
2013-10-01 22:57:51 +03:00
Artem Bilan
7101120589 INT-3153: Fix Mongo Mapping for List in Headers
JIRA: https://jira.springsource.org/browse/INT-3153

Polishing: remove compiler (generic) warning in test case
2013-09-30 09:46:23 -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
Artem Bilan
f42f6eca57 INT-3024: Add <poller> to mongodb:o-c-adapter
In addition add `<request-handler-advice-chain>`

JIRA: https://jira.springsource.org/browse/INT-3024
2013-09-16 17:12:01 -04:00
Artem Bilan
77b0917190 INT-3138: add awaitTermination to delayer tests
`DelayerHandlerRescheduleIntegrationTests` fail sometimes
on asserts. Looks like `context.destroy()` works very slow
and `<delayer>` manages to send delayed Messages

JIRA: https://jira.springsource.org/browse/INT-3138
2013-09-16 13:00:06 -04:00
Artem Bilan
98b42cbe36 INT-3070: Fix Delayer with MongoDbMessageStore
The `DelayHandler.DelayedMessageWrapper` works correctly, as designed by INT-3049.
However `DelayHandler.DelayedMessageWrapper` contains `Message` as a property
and `GenericMessage` can't be reconstructed automatically.

So, added new `DBObjectToGenericMessageConverter` to read `GenericMessage` for
`DelayHandler.DelayedMessageWrapper#original` property.

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

Cherry-picked 2.2.x

INT-3070: PR comments

INT-3070: Remove `assert` for common state
2013-09-03 18:15:02 -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
jodiestjohn
56af118656 INT-3087:Fix MongoDbMessageStore RemoveMessage Bug
Add new query so the same message found in pollMessageFromGroup is the
one which gets deleted.

See jira for more details: https://jira.springsource.org/browse/INT-3087

INT-3087 Polishing

Use an atomic method in pollMessageFromGroup to pop the first message.

Add test cases for pollMessageFromGroup and removeMessageFromGroup
where the same message exists in multiple groups.
2013-08-19 11:34:48 -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
Mark Fisher
985374ca69 INT-1812 eliminated package cycles 2012-11-07 15:50:00 -05:00
Oleg Zhurakousky
65ca797721 INT-2779 spring-data-mongo upgrade
upgraded to spring-data-mongo-1.1.1.RELEASE
removed safety logic that was put temporarily to address DATAMONGO-550/551
2012-10-19 11:20:00 -04:00
Oleg Zhurakousky
ee91a6ce5a INT-1819 Mail pseudo-tx support
Added pseudo-tx support for Mail inbound adapters
For polling adapters no changes have been made other then returning a javax.mail.Message instead of its copy so
post-tx dispositions could be performed on it.
For Imap IDLE adapter changes are simiar to the once present in SPCA where TX synchronization logic was added to ImapIdleChannelAdapter
Couple of things to note:
First IDLE receives an array of messages while Polling task receives one message which means i need to sendMessage in the Polling task in the separate thread, so for maintaining single thread semantics we have now it uses single thread executor to send Messages
Renamed MSRH to TransactionalResourceHolder since we no longer use 'source' anywhere and in the case of IDLE there is no MessageSource. Its is truly a holder of attributes we want to make available for use (e.g., SpEL)

INT-1819 Polishing

- Change TransactionalResourceHolder to IntegrationResourceHolder
- Make messageSource available as an attribute
- Allow configuration of Executor for ImapIdle adapter
- Add parser test for TX ImapIdle adapter
- Fix bundlor config for mail
- Remove top level <transactional/> element that was added to core
- Restore 'legacy' mail attributes in TX, and add schema doc

INT-1819 Mail TX Reference Docs

Add reference documentation for mail transaction support.

INT-1819 Remove 'public abstract' from interface

Modifiers are not needed on an interface.
2012-09-19 12:12:31 -04:00
Oleg Zhurakousky
94cc5a73e2 INT-2727 PseudoTX Refactoring
Remove the need for pseudo-transactional element

INT-2727 PseudoTX
Add PseudoTransactionalTransactionManager

INT-2727
addressed PR comments
cherry picked previous code for mail module to eliminate breaking change

INT-2727
initial refactoring pseudo-tx support to use common configuration

INT-2727
finalizing pseudo-tx synchronization support

INT-2727 polishing

INT-2727 polishing based on PR comments

INT-2727 addressed PR comments

INT-2727 polishing

INT-2727 Remove PseudoTransactionalMessageSource

Instead of getResource, bind the resource holder before
receive() and then add attributes to the holder.

INT-2727 polishing

INT-2727 Polishing

Remove bind of #resource; add beforeCommit() test;
add TransactionTemplate tests.
2012-09-05 16:55:34 -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
bd51b3ee7a INT-2612 Add MongoDb Adapters
Initial support for MongoDb adapters
based on initial work done by Amol Nayak

INT-2612b Add namespace support
Add entityClass and expectSingleResult attribiutes to MongoDbMessageSource

INT-2612 Polishing

Mostly JavaDocs and a few asserts; plus renamed mongodb-template to
mongo-template.

INT-2612 Remove 'store-' Prefix from Elements

INT-2612 Polish Tests

Add tests for mongo-converter pass and fail when template present

INT-2612 Add missing files

INT-2612 Polishing

INT-2612 Add @MongoDbAvailable to parser tests

INT-2612b Add dedicated parser tests
2012-08-22 10:38:46 -04:00
Oleg Zhurakousky
a37c7a0821 INT-2479 UUID Header Conversion
Refactored MongoDbMessageStore to ensure that the Message metadata is persisted consistently using already provided converters. Major refactoring went into MessageWrapper and MongoDbMessageStore.write method which was greatly simplified based on the fact that MessageWrapper now represents the structure that needs to be persisted

INT-2479
fixed default converters to make sure that UUID is stored in Mongo with type information, so the actuall UUID type could be restored
2012-03-29 15:48:16 -04: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
Mark Fisher
8ddb6d5c6b polishing 2011-12-22 23:25:08 -05:00
Sean Brandt
0fe6a76453 INT-2334 Fix for MongoDbMessageStore storing MessageHistory
This fix ensures that MongoDbMessageStore properly stores
MessageHistory that is stored in the 'history' header
of MessageHeaders.

polished contribution from Sean Brandt, added tests

fixed header deserialization logic to ensure that objects are converted to a proper type

removed write converter
2011-12-22 23:24:48 -05:00
Oleg Zhurakousky
86c574e493 INT-2311
modified implementation of MessageGroupQueue to use interruptible locks

Basically modeled it after LinkedBlockingQueue

changed to use ReadWriteLock

refactored MessageGroupQueue and added tests

changed MessageGroupQueue to use Condition

added messageGroupSize(groupId) method to MessageGroupStore and all the implementations

polishing based on Gary's comments

removed setStoreLock method in favor of additional constructors

polishing tests, decreased timeouts

made peek() thread safe

added logging
2011-12-19 19:32:23 -05:00
Oleg Zhurakousky
bd9d591dbf INT-2253
added support for updating MessageGroup with lastModified timestamp on every touch
2011-11-22 04:16:17 -05:00
Oleg Zhurakousky
50d8caa1c3 INT-2231
Fixed JdbcMessageStore to reuse CREATED_DATE while updating UPDATED_DATE

  Added support for configuring MessageGroup timeout based on the idle time of the MessageGroup

  Changed updatedTimestamp to lastModified

  Added an assertion to AbsractMessageGroup.expireMessageGroups to check if lastModified is 0

  Changed attribute name in MessageWrapper in Mongo Message Store
2011-11-21 15:56:04 -05:00
Oleg Zhurakousky
ddeab16394 INT-2182 interim
INT-2182 interim

INT-2182 work in progress

INT-2182 Refctored MessageGroupQueue and related classes
- created MGS.pollMessageFromGroup(groupId)
- removed MARKED messages concept
- renamed UNMARKED to just Messages
- removed keepReleasedMessages attribute
- refactored JdbcMessageStore to NOT store Messages that belong to a MessageGroup in the MessageGroup table, only relationship
- provided implementation of pollMessageFromGroup method in JdbcMessageStore
- polished tests

INT-2182 refactored MongoDB support to reflect changes to MGQ

INT-2182 added Gemfire support for polling

INT-2182 added Redis support

INT-2182 polishing
removed syncronized blocks from SMG, added availablePermits() method to UpperBound, polished JdbcMessageStore

INT-2182 polishing

INT-2182 polishing

INT-2182 polishing

INT-2182 polishing

INT-2182 polishing

INT-2182 polishing based on PR comments
2011-10-25 12:50:17 -04:00
Mark Fisher
598a1afe79 versionless schemas for mongo and redis modules 2011-10-10 13:34:39 -04:00
Oleg Zhurakousky
a386a1c3c5 INT-2135-mongo-patch fixed NPE in MongoDbMessageStore
also, removed XSD versions from Gemfire test configs
2011-10-10 12:38:47 -04:00
Oleg Zhurakousky
946b9e2b82 INT-2152
parent issue for INT-2134, INT-2135, INT-2142, INT-2155, INT-2158
2011-10-07 12:48:20 -04:00
Oleg Zhurakousky
1702413143 MongoDbMessageStore for M1
subclassed from AbstractMessageGroupStore
  added initial tests for Mongo based MessageGroupStore
  added initial implementation of MongoDb-based MessageGroupStore
  polished MongoDbMessageStore, made it more inline with JdbcMessageStore, added tests
  using MessageWrapper as stored object to accommodate groupId and marked attributes
  no longer setting _id explicitly
  removed synchronized blocks and concurrency test
2011-08-26 16:26:31 -04:00
Mark Fisher
da2f275074 INT-2046 added @ManagedAttribute to MessageStores
Added to the getMessageCount() in GemfireMessageStore, MongoDbMessageStore, and RedisMessageStore.
2011-08-11 13:59:12 -04:00
Oleg Zhurakousky
521a602dad INT-2040 changed signature of MessageStore.getMessageCount() to return long. Changed affected implementations 2011-08-11 13:07:41 -04:00
Mark Fisher
00ffa9c0a5 renaming MongoMessageStore to MongoDbMessageStore for consistency 2011-08-05 10:13:56 -04:00
Mark Fisher
97c61e2512 using hasText instead of simple null check for collectionName 2011-08-04 12:40:53 -04:00
Mark Fisher
f94411e11d changed case 2011-08-02 17:38:16 -04:00
Mark Fisher
89a4060ad4 removed some commented out code 2011-08-02 17:27:59 -04:00
Mark Fisher
de1b0c1402 MongoMessageStoreTests now actually assert the payload, headers, and Message itself all are equal before and after storing 2011-08-02 17:24:41 -04:00
Mark Fisher
aa0db376ce refactored MongoMessageStore to support reading object payloads again 2011-08-02 17:17:36 -04:00
Mark Fisher
ca1fa6b727 polishing MongoDB availability rule code 2011-08-02 17:08:01 -04:00
Mark Fisher
950c05e6ab updated MongoMessageStore to use a MongoDbFactory rather than direct Mongo instance 2011-08-02 16:53:23 -04:00
Oleg Zhurakousky
c6403f3feb INT-2026 added new packages 2011-08-01 10:03:56 -04:00
Oleg Zhurakousky
24236fa981 INT-2026 added support for @MongodbAvailable to MongoDB-based tests 2011-08-01 10:03:16 -04:00
Oleg Zhurakousky
17999e198e Added @Ignore to Redis and Mongo tests for now. Will be looking into using @Rule 2011-07-28 08:02:46 -04:00
Oleg Zhurakousky
47e3b47955 INT-2016 modified DefaultAmqpHeaderMapper to NOT copy headers such as ID, TIMESTAMP, REPLY_CHANNEL and ERRPR_CHANNEL 2011-07-28 07:48:07 -04:00
Oleg Zhurakousky
12cb670e01 validating that MongoDB instance running in CI could be used for testing 2011-07-26 14:05:06 -04:00
Oleg Zhurakousky
c26a1c6c6b INT-1991 moved MongoDB module to the main branch 2011-07-26 08:47:35 -04:00