The only thing I store is an InheritableThreadLocal which contains the same value for all Messages which are processed by the same thread.
An example. Suppose we have incoming messages on...
Type: Posts; User: davidcyp; Keyword(s):
The only thing I store is an InheritableThreadLocal which contains the same value for all Messages which are processed by the same thread.
An example. Suppose we have incoming messages on...
Oleg,
That's correct. The message carries a header containing a unique piece of data which can be used to determine the destination thread.
I don't use scoped-proxy. We (ab)use the "invalid scope" for some integration tests, but not in production code.
Yes Marc, I did. It resulted in a "dispatcher has no subscribers" error. Sidenote: When the application starts, all beans are instantiated in an invalid scope, which I defaulted to...
Done, see https://jira.springsource.org/browse/INT-2654
Adding some randomness to my code, clarified that different threads are used. It seems that, for every instance, my ThreadPoolExecutor bean starts counting from zero.
Thus:
instance1 spawns a...
I've managed to find a partial solution. I now have an instance of my serviceActivator(EchoService) per simulation. But I am still searching for a way to have a DEDICATED thread per simulation.
...
Rajesh,
I have compared your setup with mine, and it's quite similar, eg:
<bean id="sessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
...
Hello,
I have the following requirement:
- each simulation must run on a dedicated thread (which must be the same thread for all consecutive simulations with the same id)
Therefore I have...
Thanks, I might take a look at a more robust solution, as proposed by you. My first concern, and why I did it this way, was to make something very straightforward for the developers who create the...
Thanks for your explanation. I eventually fixed it by using that splitter and the nullChannel.
One could workaround this by adding following code:
<integration:channel id="channel-one"/>
<integration:channel id="channel-two"/>
<integration:payload-type-router...
In the meanwhile, I have created a testcase which learned me a lot.
First I had defined 1 bean, exceptionThrowingServiceActivator , as service-activator to the input-channel.
The output was, as...
I am using version 2.0.4
This is (part of) my configuration (+ slightly adapted to obfuscate some classnames + added some comments)
Actually what happens is :
an xmpp message is received
...
Hello,
I have got the following flow:
An incoming FooMessage. This message is immediately put on a separate thread
<integration:channel id="xmppInboundCanonical">
...
Something worth investigating:
If I use a singleton-scoped bean, the value of this in the constructor of Foo is :
com.acme.Foo@bb3f71
If I use a different scoped bean, e.g....
Indeed, I am using an ApplicationContext :). I think there is nothing more I can do now than to turn on tracing and try to find out why the system acts this way. If I'll find the solution I will...
Okay, I thought about an issue with myCustomScope too. But why does it then also fail with prototype scope?
Note: I will instantly compare my scope with the Request/Session scope.
Hello,
I have the following issue. Does anyone has a clue what is going wrong?
@Component
@Scope( "myCustomScope" )
public class Foo {
static {
Hello,
I have a @ServiceActivator which throws an exception, e.g. throw new FooException( "Invalid foo", e );
I have following configuration:
<integration:exception-type-router...
Oleg, thanks for helping me!
I have filed a jira improvement request INT-2073 (which can be found here).
The solution was indeed to replace the outbound-channel-adapter
...
Nope, I (think I) am not using it as a serviceActivator.
This is part of my integration-config.xml:
<xmpp:xmpp-connection id="xmppConnection" user="${user}" password="${password}"...
Hello,
I would like to inject a custom ChatMessageSendingMessageHandler implementation, which copies some custom headers to the outgoing xmpp smack message's properties.
I have created the...