You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Dmytro Rud (JIRA)" <ji...@apache.org> on 2009/10/01 11:01:00 UTC
[jira] Created: (CAMEL-2049) Improper configuration of MINA
connector and acceptor instances; Better producer
Improper configuration of MINA connector and acceptor instances; Better producer
--------------------------------------------------------------------------------
Key: CAMEL-2049
URL: https://issues.apache.org/activemq/browse/CAMEL-2049
Project: Apache Camel
Issue Type: Bug
Components: camel-mina
Affects Versions: 1.6.0
Environment: Windows XP
Reporter: Dmytro Rud
A sample scenario where both MINA producer(s) and consumer(s) are used in the same route (e.g. some kind of dispatching or proxying):
from("mina:tcp://localhost:8888?lazySessionCreation=true&sync=true")
.to("mina:tcp://localhost:7777?lazySessionCreation=true&sync=true");
from("mina:tcp://localhost:7777?lazySessionCreation=true&sync=true")
.process(/*prepare answer*/);
Due to improper configuration of MINA acceptor and connector instances in MinaComponent#createSocketEndpoint(), no more than 15 incoming threads can be served at port 8888 -- the producer becomes unable to open an outgoing session. This is actually an issue of MINA, not of Camel -- a test application written using "raw" MINA shows the same behaviour.
A solution is to apply configuration rules described, e.g., at http://mina.apache.org/configuring-thread-model.html, as done in the attached patch.
Moreover, the standard Camel-MINA producer is not thread-safe -- actually a well-known point. A second attached file contains a thread pool-based reentrant version, which can be efficiently used for TCP endpoints with both parameters 'lazySessionCreation' and 'sync' set to true.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (CAMEL-2049) Improper configuration of MINA
connector and acceptor instances; Better producer
Posted by "Dmytro Rud (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-2049?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dmytro Rud updated CAMEL-2049:
------------------------------
Attachment: MinaSocketProducer.java
MinaComponent.patch
MINA component patch and thread-save producer
> Improper configuration of MINA connector and acceptor instances; Better producer
> --------------------------------------------------------------------------------
>
> Key: CAMEL-2049
> URL: https://issues.apache.org/activemq/browse/CAMEL-2049
> Project: Apache Camel
> Issue Type: Bug
> Components: camel-mina
> Affects Versions: 1.6.0
> Environment: Windows XP
> Reporter: Dmytro Rud
> Attachments: MinaComponent.patch, MinaSocketProducer.java
>
>
> A sample scenario where both MINA producer(s) and consumer(s) are used in the same route (e.g. some kind of dispatching or proxying):
> from("mina:tcp://localhost:8888?lazySessionCreation=true&sync=true")
> .to("mina:tcp://localhost:7777?lazySessionCreation=true&sync=true");
> from("mina:tcp://localhost:7777?lazySessionCreation=true&sync=true")
> .process(/*prepare answer*/);
> Due to improper configuration of MINA acceptor and connector instances in MinaComponent#createSocketEndpoint(), no more than 15 incoming threads can be served at port 8888 -- the producer becomes unable to open an outgoing session. This is actually an issue of MINA, not of Camel -- a test application written using "raw" MINA shows the same behaviour.
> A solution is to apply configuration rules described, e.g., at http://mina.apache.org/configuring-thread-model.html, as done in the attached patch.
> Moreover, the standard Camel-MINA producer is not thread-safe -- actually a well-known point. A second attached file contains a thread pool-based reentrant version, which can be efficiently used for TCP endpoints with both parameters 'lazySessionCreation' and 'sync' set to true.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CAMEL-2049) Improper configuration of MINA
connector and acceptor instances; Better producer
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-2049?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=54657#action_54657 ]
Claus Ibsen commented on CAMEL-2049:
------------------------------------
I have fixed the missing setThreadModel in 2.0
I have also applied your patch to 1.x. Thanks a lot.
1.x: 823060.
> Improper configuration of MINA connector and acceptor instances; Better producer
> --------------------------------------------------------------------------------
>
> Key: CAMEL-2049
> URL: https://issues.apache.org/activemq/browse/CAMEL-2049
> Project: Apache Camel
> Issue Type: Bug
> Components: camel-mina
> Affects Versions: 1.6.0
> Environment: Windows XP
> Reporter: Dmytro Rud
> Assignee: Claus Ibsen
> Fix For: 1.6.2, 2.0.0
>
> Attachments: 2009-10-06.patch, MinaComponent.patch, MinaSocketProducer.java
>
>
> A sample scenario where both MINA producer(s) and consumer(s) are used in the same route (e.g. some kind of dispatching or proxying):
> from("mina:tcp://localhost:8888?lazySessionCreation=true&sync=true")
> .to("mina:tcp://localhost:7777?lazySessionCreation=true&sync=true");
> from("mina:tcp://localhost:7777?lazySessionCreation=true&sync=true")
> .process(/*prepare answer*/);
> Due to improper configuration of MINA acceptor and connector instances in MinaComponent#createSocketEndpoint(), no more than 15 incoming threads can be served at port 8888 -- the producer becomes unable to open an outgoing session. This is actually an issue of MINA, not of Camel -- a test application written using "raw" MINA shows the same behaviour.
> A solution is to apply configuration rules described, e.g., at http://mina.apache.org/configuring-thread-model.html, as done in the attached patch.
> Moreover, the standard Camel-MINA producer is not thread-safe -- actually a well-known point. A second attached file contains a thread pool-based reentrant version, which can be efficiently used for TCP endpoints with both parameters 'lazySessionCreation' and 'sync' set to true.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CAMEL-2049) Improper configuration of MINA
connector and acceptor instances; Better producer
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-2049?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=54593#action_54593 ]
Claus Ibsen commented on CAMEL-2049:
------------------------------------
I am a bit inclined to patch Camel 1.x with your socket producer as then we got different solution in 1.x vs. 2.0 (pooled)
Any thoughts?
> Improper configuration of MINA connector and acceptor instances; Better producer
> --------------------------------------------------------------------------------
>
> Key: CAMEL-2049
> URL: https://issues.apache.org/activemq/browse/CAMEL-2049
> Project: Apache Camel
> Issue Type: Bug
> Components: camel-mina
> Affects Versions: 1.6.0
> Environment: Windows XP
> Reporter: Dmytro Rud
> Assignee: Claus Ibsen
> Attachments: MinaComponent.patch, MinaSocketProducer.java
>
>
> A sample scenario where both MINA producer(s) and consumer(s) are used in the same route (e.g. some kind of dispatching or proxying):
> from("mina:tcp://localhost:8888?lazySessionCreation=true&sync=true")
> .to("mina:tcp://localhost:7777?lazySessionCreation=true&sync=true");
> from("mina:tcp://localhost:7777?lazySessionCreation=true&sync=true")
> .process(/*prepare answer*/);
> Due to improper configuration of MINA acceptor and connector instances in MinaComponent#createSocketEndpoint(), no more than 15 incoming threads can be served at port 8888 -- the producer becomes unable to open an outgoing session. This is actually an issue of MINA, not of Camel -- a test application written using "raw" MINA shows the same behaviour.
> A solution is to apply configuration rules described, e.g., at http://mina.apache.org/configuring-thread-model.html, as done in the attached patch.
> Moreover, the standard Camel-MINA producer is not thread-safe -- actually a well-known point. A second attached file contains a thread pool-based reentrant version, which can be efficiently used for TCP endpoints with both parameters 'lazySessionCreation' and 'sync' set to true.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CAMEL-2049) Improper configuration of MINA
connector and acceptor instances; Better producer
Posted by "Dmytro Rud (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-2049?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=54607#action_54607 ]
Dmytro Rud commented on CAMEL-2049:
-----------------------------------
> I am a bit inclined to patch Camel 1.x with your socket producer
> as then we got different solution in 1.x vs. 2.0 (pooled)
> Any thoughts?
If there is no way to make the 1.x producer pooled as well, it would be IMHO better to have different solutions in 1.x vs. 2.0 as to have an uniform solution which works in 2.0 only...
> Improper configuration of MINA connector and acceptor instances; Better producer
> --------------------------------------------------------------------------------
>
> Key: CAMEL-2049
> URL: https://issues.apache.org/activemq/browse/CAMEL-2049
> Project: Apache Camel
> Issue Type: Bug
> Components: camel-mina
> Affects Versions: 1.6.0
> Environment: Windows XP
> Reporter: Dmytro Rud
> Assignee: Claus Ibsen
> Fix For: 1.6.2, 2.0.0
>
> Attachments: MinaComponent.patch, MinaSocketProducer.java
>
>
> A sample scenario where both MINA producer(s) and consumer(s) are used in the same route (e.g. some kind of dispatching or proxying):
> from("mina:tcp://localhost:8888?lazySessionCreation=true&sync=true")
> .to("mina:tcp://localhost:7777?lazySessionCreation=true&sync=true");
> from("mina:tcp://localhost:7777?lazySessionCreation=true&sync=true")
> .process(/*prepare answer*/);
> Due to improper configuration of MINA acceptor and connector instances in MinaComponent#createSocketEndpoint(), no more than 15 incoming threads can be served at port 8888 -- the producer becomes unable to open an outgoing session. This is actually an issue of MINA, not of Camel -- a test application written using "raw" MINA shows the same behaviour.
> A solution is to apply configuration rules described, e.g., at http://mina.apache.org/configuring-thread-model.html, as done in the attached patch.
> Moreover, the standard Camel-MINA producer is not thread-safe -- actually a well-known point. A second attached file contains a thread pool-based reentrant version, which can be efficiently used for TCP endpoints with both parameters 'lazySessionCreation' and 'sync' set to true.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Issue Comment Edited: (CAMEL-2049) Improper configuration of
MINA connector and acceptor instances; Better producer
Posted by "Dmytro Rud (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-2049?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=54612#action_54612 ]
Dmytro Rud edited comment on CAMEL-2049 at 10/4/09 1:12 PM:
------------------------------------------------------------
Claus,
I would like to introduce a new URL parameter for MINA TCP endpoints to specify the count of producer threads (parameter "threadsCount" of MinaSocketProducer's constructor). For example,
...
.to("mina:tcp://somehost:8888?sync=true&lazySessionCreation=true&poolSize=16")
Do you agree? Or would you rather prefer this parameter to be hard-coded? What default value should it have?
And the second question: How should I handle the lazySessionCreation parameter? Currently I tend to assume that session creation is always lazy.
was (Author: rnd):
Claus,
I would like to introduce a new URL parameter for MINA TCP endpoints to specify the count of producer threads (parameter "threadsCount" of MinaSocketProducer's constructor). For example,
...
.to("mina:tcp://somehost:8888?sync=true&lazySessionCreation=true&poolSize=16")
Do you agree? Or would you rather prefer this parameter to be hard-coded? What default value should it have?
> Improper configuration of MINA connector and acceptor instances; Better producer
> --------------------------------------------------------------------------------
>
> Key: CAMEL-2049
> URL: https://issues.apache.org/activemq/browse/CAMEL-2049
> Project: Apache Camel
> Issue Type: Bug
> Components: camel-mina
> Affects Versions: 1.6.0
> Environment: Windows XP
> Reporter: Dmytro Rud
> Assignee: Claus Ibsen
> Fix For: 1.6.2, 2.0.0
>
> Attachments: MinaComponent.patch, MinaSocketProducer.java
>
>
> A sample scenario where both MINA producer(s) and consumer(s) are used in the same route (e.g. some kind of dispatching or proxying):
> from("mina:tcp://localhost:8888?lazySessionCreation=true&sync=true")
> .to("mina:tcp://localhost:7777?lazySessionCreation=true&sync=true");
> from("mina:tcp://localhost:7777?lazySessionCreation=true&sync=true")
> .process(/*prepare answer*/);
> Due to improper configuration of MINA acceptor and connector instances in MinaComponent#createSocketEndpoint(), no more than 15 incoming threads can be served at port 8888 -- the producer becomes unable to open an outgoing session. This is actually an issue of MINA, not of Camel -- a test application written using "raw" MINA shows the same behaviour.
> A solution is to apply configuration rules described, e.g., at http://mina.apache.org/configuring-thread-model.html, as done in the attached patch.
> Moreover, the standard Camel-MINA producer is not thread-safe -- actually a well-known point. A second attached file contains a thread pool-based reentrant version, which can be efficiently used for TCP endpoints with both parameters 'lazySessionCreation' and 'sync' set to true.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CAMEL-2049) Improper configuration of MINA
connector and acceptor instances; Better producer
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-2049?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=54592#action_54592 ]
Claus Ibsen commented on CAMEL-2049:
------------------------------------
In Camel 2.0 the MinaProducer is now pooled which resolves the thread safe issue there as only one instance is using it at any given time.
> Improper configuration of MINA connector and acceptor instances; Better producer
> --------------------------------------------------------------------------------
>
> Key: CAMEL-2049
> URL: https://issues.apache.org/activemq/browse/CAMEL-2049
> Project: Apache Camel
> Issue Type: Bug
> Components: camel-mina
> Affects Versions: 1.6.0
> Environment: Windows XP
> Reporter: Dmytro Rud
> Assignee: Claus Ibsen
> Attachments: MinaComponent.patch, MinaSocketProducer.java
>
>
> A sample scenario where both MINA producer(s) and consumer(s) are used in the same route (e.g. some kind of dispatching or proxying):
> from("mina:tcp://localhost:8888?lazySessionCreation=true&sync=true")
> .to("mina:tcp://localhost:7777?lazySessionCreation=true&sync=true");
> from("mina:tcp://localhost:7777?lazySessionCreation=true&sync=true")
> .process(/*prepare answer*/);
> Due to improper configuration of MINA acceptor and connector instances in MinaComponent#createSocketEndpoint(), no more than 15 incoming threads can be served at port 8888 -- the producer becomes unable to open an outgoing session. This is actually an issue of MINA, not of Camel -- a test application written using "raw" MINA shows the same behaviour.
> A solution is to apply configuration rules described, e.g., at http://mina.apache.org/configuring-thread-model.html, as done in the attached patch.
> Moreover, the standard Camel-MINA producer is not thread-safe -- actually a well-known point. A second attached file contains a thread pool-based reentrant version, which can be efficiently used for TCP endpoints with both parameters 'lazySessionCreation' and 'sync' set to true.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (CAMEL-2049) Improper configuration of MINA
connector and acceptor instances; Better producer
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-2049?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen reassigned CAMEL-2049:
----------------------------------
Assignee: Claus Ibsen
> Improper configuration of MINA connector and acceptor instances; Better producer
> --------------------------------------------------------------------------------
>
> Key: CAMEL-2049
> URL: https://issues.apache.org/activemq/browse/CAMEL-2049
> Project: Apache Camel
> Issue Type: Bug
> Components: camel-mina
> Affects Versions: 1.6.0
> Environment: Windows XP
> Reporter: Dmytro Rud
> Assignee: Claus Ibsen
> Attachments: MinaComponent.patch, MinaSocketProducer.java
>
>
> A sample scenario where both MINA producer(s) and consumer(s) are used in the same route (e.g. some kind of dispatching or proxying):
> from("mina:tcp://localhost:8888?lazySessionCreation=true&sync=true")
> .to("mina:tcp://localhost:7777?lazySessionCreation=true&sync=true");
> from("mina:tcp://localhost:7777?lazySessionCreation=true&sync=true")
> .process(/*prepare answer*/);
> Due to improper configuration of MINA acceptor and connector instances in MinaComponent#createSocketEndpoint(), no more than 15 incoming threads can be served at port 8888 -- the producer becomes unable to open an outgoing session. This is actually an issue of MINA, not of Camel -- a test application written using "raw" MINA shows the same behaviour.
> A solution is to apply configuration rules described, e.g., at http://mina.apache.org/configuring-thread-model.html, as done in the attached patch.
> Moreover, the standard Camel-MINA producer is not thread-safe -- actually a well-known point. A second attached file contains a thread pool-based reentrant version, which can be efficiently used for TCP endpoints with both parameters 'lazySessionCreation' and 'sync' set to true.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Issue Comment Edited: (CAMEL-2049) Improper configuration of
MINA connector and acceptor instances; Better producer
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-2049?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=54591#action_54591 ]
Claus Ibsen edited comment on CAMEL-2049 at 10/3/09 1:53 AM:
-------------------------------------------------------------
trunk: 821272.
1.x: 821276.
was (Author: davsclaus):
trunk: 821272.
> Improper configuration of MINA connector and acceptor instances; Better producer
> --------------------------------------------------------------------------------
>
> Key: CAMEL-2049
> URL: https://issues.apache.org/activemq/browse/CAMEL-2049
> Project: Apache Camel
> Issue Type: Bug
> Components: camel-mina
> Affects Versions: 1.6.0
> Environment: Windows XP
> Reporter: Dmytro Rud
> Assignee: Claus Ibsen
> Attachments: MinaComponent.patch, MinaSocketProducer.java
>
>
> A sample scenario where both MINA producer(s) and consumer(s) are used in the same route (e.g. some kind of dispatching or proxying):
> from("mina:tcp://localhost:8888?lazySessionCreation=true&sync=true")
> .to("mina:tcp://localhost:7777?lazySessionCreation=true&sync=true");
> from("mina:tcp://localhost:7777?lazySessionCreation=true&sync=true")
> .process(/*prepare answer*/);
> Due to improper configuration of MINA acceptor and connector instances in MinaComponent#createSocketEndpoint(), no more than 15 incoming threads can be served at port 8888 -- the producer becomes unable to open an outgoing session. This is actually an issue of MINA, not of Camel -- a test application written using "raw" MINA shows the same behaviour.
> A solution is to apply configuration rules described, e.g., at http://mina.apache.org/configuring-thread-model.html, as done in the attached patch.
> Moreover, the standard Camel-MINA producer is not thread-safe -- actually a well-known point. A second attached file contains a thread pool-based reentrant version, which can be efficiently used for TCP endpoints with both parameters 'lazySessionCreation' and 'sync' set to true.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (CAMEL-2049) Improper configuration of MINA
connector and acceptor instances; Better producer
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-2049?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen resolved CAMEL-2049.
--------------------------------
Resolution: Fixed
Fix Version/s: 2.1.0
> Improper configuration of MINA connector and acceptor instances; Better producer
> --------------------------------------------------------------------------------
>
> Key: CAMEL-2049
> URL: https://issues.apache.org/activemq/browse/CAMEL-2049
> Project: Apache Camel
> Issue Type: Bug
> Components: camel-mina
> Affects Versions: 1.6.0
> Environment: Windows XP
> Reporter: Dmytro Rud
> Assignee: Claus Ibsen
> Fix For: 1.6.2, 2.1.0, 2.0.0
>
> Attachments: 2009-10-06.patch, MinaComponent.patch, MinaSocketProducer.java
>
>
> A sample scenario where both MINA producer(s) and consumer(s) are used in the same route (e.g. some kind of dispatching or proxying):
> from("mina:tcp://localhost:8888?lazySessionCreation=true&sync=true")
> .to("mina:tcp://localhost:7777?lazySessionCreation=true&sync=true");
> from("mina:tcp://localhost:7777?lazySessionCreation=true&sync=true")
> .process(/*prepare answer*/);
> Due to improper configuration of MINA acceptor and connector instances in MinaComponent#createSocketEndpoint(), no more than 15 incoming threads can be served at port 8888 -- the producer becomes unable to open an outgoing session. This is actually an issue of MINA, not of Camel -- a test application written using "raw" MINA shows the same behaviour.
> A solution is to apply configuration rules described, e.g., at http://mina.apache.org/configuring-thread-model.html, as done in the attached patch.
> Moreover, the standard Camel-MINA producer is not thread-safe -- actually a well-known point. A second attached file contains a thread pool-based reentrant version, which can be efficiently used for TCP endpoints with both parameters 'lazySessionCreation' and 'sync' set to true.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (CAMEL-2049) Improper configuration of MINA
connector and acceptor instances; Better producer
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-2049?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen updated CAMEL-2049:
-------------------------------
Fix Version/s: 2.0.0
1.6.2
> Improper configuration of MINA connector and acceptor instances; Better producer
> --------------------------------------------------------------------------------
>
> Key: CAMEL-2049
> URL: https://issues.apache.org/activemq/browse/CAMEL-2049
> Project: Apache Camel
> Issue Type: Bug
> Components: camel-mina
> Affects Versions: 1.6.0
> Environment: Windows XP
> Reporter: Dmytro Rud
> Assignee: Claus Ibsen
> Fix For: 1.6.2, 2.0.0
>
> Attachments: MinaComponent.patch, MinaSocketProducer.java
>
>
> A sample scenario where both MINA producer(s) and consumer(s) are used in the same route (e.g. some kind of dispatching or proxying):
> from("mina:tcp://localhost:8888?lazySessionCreation=true&sync=true")
> .to("mina:tcp://localhost:7777?lazySessionCreation=true&sync=true");
> from("mina:tcp://localhost:7777?lazySessionCreation=true&sync=true")
> .process(/*prepare answer*/);
> Due to improper configuration of MINA acceptor and connector instances in MinaComponent#createSocketEndpoint(), no more than 15 incoming threads can be served at port 8888 -- the producer becomes unable to open an outgoing session. This is actually an issue of MINA, not of Camel -- a test application written using "raw" MINA shows the same behaviour.
> A solution is to apply configuration rules described, e.g., at http://mina.apache.org/configuring-thread-model.html, as done in the attached patch.
> Moreover, the standard Camel-MINA producer is not thread-safe -- actually a well-known point. A second attached file contains a thread pool-based reentrant version, which can be efficiently used for TCP endpoints with both parameters 'lazySessionCreation' and 'sync' set to true.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CAMEL-2049) Improper configuration of MINA
connector and acceptor instances; Better producer
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-2049?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=54594#action_54594 ]
Claus Ibsen commented on CAMEL-2049:
------------------------------------
And for the future it would be great if you also provide unit tests that surfaces the bug and which we can use to ensure the patch fixes "something".
> Improper configuration of MINA connector and acceptor instances; Better producer
> --------------------------------------------------------------------------------
>
> Key: CAMEL-2049
> URL: https://issues.apache.org/activemq/browse/CAMEL-2049
> Project: Apache Camel
> Issue Type: Bug
> Components: camel-mina
> Affects Versions: 1.6.0
> Environment: Windows XP
> Reporter: Dmytro Rud
> Assignee: Claus Ibsen
> Fix For: 1.6.2, 2.0.0
>
> Attachments: MinaComponent.patch, MinaSocketProducer.java
>
>
> A sample scenario where both MINA producer(s) and consumer(s) are used in the same route (e.g. some kind of dispatching or proxying):
> from("mina:tcp://localhost:8888?lazySessionCreation=true&sync=true")
> .to("mina:tcp://localhost:7777?lazySessionCreation=true&sync=true");
> from("mina:tcp://localhost:7777?lazySessionCreation=true&sync=true")
> .process(/*prepare answer*/);
> Due to improper configuration of MINA acceptor and connector instances in MinaComponent#createSocketEndpoint(), no more than 15 incoming threads can be served at port 8888 -- the producer becomes unable to open an outgoing session. This is actually an issue of MINA, not of Camel -- a test application written using "raw" MINA shows the same behaviour.
> A solution is to apply configuration rules described, e.g., at http://mina.apache.org/configuring-thread-model.html, as done in the attached patch.
> Moreover, the standard Camel-MINA producer is not thread-safe -- actually a well-known point. A second attached file contains a thread pool-based reentrant version, which can be efficiently used for TCP endpoints with both parameters 'lazySessionCreation' and 'sync' set to true.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Issue Comment Edited: (CAMEL-2049) Improper configuration of
MINA connector and acceptor instances; Better producer
Posted by "Dmytro Rud (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-2049?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=54607#action_54607 ]
Dmytro Rud edited comment on CAMEL-2049 at 10/3/09 1:12 PM:
------------------------------------------------------------
> I am a bit inclined to patch Camel 1.x with your socket producer
> as then we got different solution in 1.x vs. 2.0 (pooled)
> Any thoughts?
If there is no way to make the 1.x producer pooled as well, it would be IMHO better to have different solutions in 1.x vs. 2.0 than to have an uniform solution which works in 2.0 only...
was (Author: rnd):
> I am a bit inclined to patch Camel 1.x with your socket producer
> as then we got different solution in 1.x vs. 2.0 (pooled)
> Any thoughts?
If there is no way to make the 1.x producer pooled as well, it would be IMHO better to have different solutions in 1.x vs. 2.0 as to have an uniform solution which works in 2.0 only...
> Improper configuration of MINA connector and acceptor instances; Better producer
> --------------------------------------------------------------------------------
>
> Key: CAMEL-2049
> URL: https://issues.apache.org/activemq/browse/CAMEL-2049
> Project: Apache Camel
> Issue Type: Bug
> Components: camel-mina
> Affects Versions: 1.6.0
> Environment: Windows XP
> Reporter: Dmytro Rud
> Assignee: Claus Ibsen
> Fix For: 1.6.2, 2.0.0
>
> Attachments: MinaComponent.patch, MinaSocketProducer.java
>
>
> A sample scenario where both MINA producer(s) and consumer(s) are used in the same route (e.g. some kind of dispatching or proxying):
> from("mina:tcp://localhost:8888?lazySessionCreation=true&sync=true")
> .to("mina:tcp://localhost:7777?lazySessionCreation=true&sync=true");
> from("mina:tcp://localhost:7777?lazySessionCreation=true&sync=true")
> .process(/*prepare answer*/);
> Due to improper configuration of MINA acceptor and connector instances in MinaComponent#createSocketEndpoint(), no more than 15 incoming threads can be served at port 8888 -- the producer becomes unable to open an outgoing session. This is actually an issue of MINA, not of Camel -- a test application written using "raw" MINA shows the same behaviour.
> A solution is to apply configuration rules described, e.g., at http://mina.apache.org/configuring-thread-model.html, as done in the attached patch.
> Moreover, the standard Camel-MINA producer is not thread-safe -- actually a well-known point. A second attached file contains a thread pool-based reentrant version, which can be efficiently used for TCP endpoints with both parameters 'lazySessionCreation' and 'sync' set to true.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CAMEL-2049) Improper configuration of MINA
connector and acceptor instances; Better producer
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-2049?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=54611#action_54611 ]
Claus Ibsen commented on CAMEL-2049:
------------------------------------
Dmytro
Do you mind creating a new patch with the updated code from the 1.x branch which uses your thread safe producer.
Then it would be much easier for me to commit it to the 1.x codebase.
Then we have a solution with concurrent mina producers for both 1.x and 2.0
Backporting the pooling is *way* to much work.
> Improper configuration of MINA connector and acceptor instances; Better producer
> --------------------------------------------------------------------------------
>
> Key: CAMEL-2049
> URL: https://issues.apache.org/activemq/browse/CAMEL-2049
> Project: Apache Camel
> Issue Type: Bug
> Components: camel-mina
> Affects Versions: 1.6.0
> Environment: Windows XP
> Reporter: Dmytro Rud
> Assignee: Claus Ibsen
> Fix For: 1.6.2, 2.0.0
>
> Attachments: MinaComponent.patch, MinaSocketProducer.java
>
>
> A sample scenario where both MINA producer(s) and consumer(s) are used in the same route (e.g. some kind of dispatching or proxying):
> from("mina:tcp://localhost:8888?lazySessionCreation=true&sync=true")
> .to("mina:tcp://localhost:7777?lazySessionCreation=true&sync=true");
> from("mina:tcp://localhost:7777?lazySessionCreation=true&sync=true")
> .process(/*prepare answer*/);
> Due to improper configuration of MINA acceptor and connector instances in MinaComponent#createSocketEndpoint(), no more than 15 incoming threads can be served at port 8888 -- the producer becomes unable to open an outgoing session. This is actually an issue of MINA, not of Camel -- a test application written using "raw" MINA shows the same behaviour.
> A solution is to apply configuration rules described, e.g., at http://mina.apache.org/configuring-thread-model.html, as done in the attached patch.
> Moreover, the standard Camel-MINA producer is not thread-safe -- actually a well-known point. A second attached file contains a thread pool-based reentrant version, which can be efficiently used for TCP endpoints with both parameters 'lazySessionCreation' and 'sync' set to true.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Issue Comment Edited: (CAMEL-2049) Improper configuration of
MINA connector and acceptor instances; Better producer
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-2049?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=54591#action_54591 ]
Claus Ibsen edited comment on CAMEL-2049 at 10/7/09 11:12 PM:
--------------------------------------------------------------
trunk: 821272, 823031.
1.x: 821276, 823056.
was (Author: davsclaus):
trunk: 821272, 823031.
1.x: 821276.
> Improper configuration of MINA connector and acceptor instances; Better producer
> --------------------------------------------------------------------------------
>
> Key: CAMEL-2049
> URL: https://issues.apache.org/activemq/browse/CAMEL-2049
> Project: Apache Camel
> Issue Type: Bug
> Components: camel-mina
> Affects Versions: 1.6.0
> Environment: Windows XP
> Reporter: Dmytro Rud
> Assignee: Claus Ibsen
> Fix For: 1.6.2, 2.0.0
>
> Attachments: 2009-10-06.patch, MinaComponent.patch, MinaSocketProducer.java
>
>
> A sample scenario where both MINA producer(s) and consumer(s) are used in the same route (e.g. some kind of dispatching or proxying):
> from("mina:tcp://localhost:8888?lazySessionCreation=true&sync=true")
> .to("mina:tcp://localhost:7777?lazySessionCreation=true&sync=true");
> from("mina:tcp://localhost:7777?lazySessionCreation=true&sync=true")
> .process(/*prepare answer*/);
> Due to improper configuration of MINA acceptor and connector instances in MinaComponent#createSocketEndpoint(), no more than 15 incoming threads can be served at port 8888 -- the producer becomes unable to open an outgoing session. This is actually an issue of MINA, not of Camel -- a test application written using "raw" MINA shows the same behaviour.
> A solution is to apply configuration rules described, e.g., at http://mina.apache.org/configuring-thread-model.html, as done in the attached patch.
> Moreover, the standard Camel-MINA producer is not thread-safe -- actually a well-known point. A second attached file contains a thread pool-based reentrant version, which can be efficiently used for TCP endpoints with both parameters 'lazySessionCreation' and 'sync' set to true.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CAMEL-2049) Improper configuration of MINA
connector and acceptor instances; Better producer
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-2049?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=54591#action_54591 ]
Claus Ibsen commented on CAMEL-2049:
------------------------------------
trunk: 821272.
> Improper configuration of MINA connector and acceptor instances; Better producer
> --------------------------------------------------------------------------------
>
> Key: CAMEL-2049
> URL: https://issues.apache.org/activemq/browse/CAMEL-2049
> Project: Apache Camel
> Issue Type: Bug
> Components: camel-mina
> Affects Versions: 1.6.0
> Environment: Windows XP
> Reporter: Dmytro Rud
> Assignee: Claus Ibsen
> Attachments: MinaComponent.patch, MinaSocketProducer.java
>
>
> A sample scenario where both MINA producer(s) and consumer(s) are used in the same route (e.g. some kind of dispatching or proxying):
> from("mina:tcp://localhost:8888?lazySessionCreation=true&sync=true")
> .to("mina:tcp://localhost:7777?lazySessionCreation=true&sync=true");
> from("mina:tcp://localhost:7777?lazySessionCreation=true&sync=true")
> .process(/*prepare answer*/);
> Due to improper configuration of MINA acceptor and connector instances in MinaComponent#createSocketEndpoint(), no more than 15 incoming threads can be served at port 8888 -- the producer becomes unable to open an outgoing session. This is actually an issue of MINA, not of Camel -- a test application written using "raw" MINA shows the same behaviour.
> A solution is to apply configuration rules described, e.g., at http://mina.apache.org/configuring-thread-model.html, as done in the attached patch.
> Moreover, the standard Camel-MINA producer is not thread-safe -- actually a well-known point. A second attached file contains a thread pool-based reentrant version, which can be efficiently used for TCP endpoints with both parameters 'lazySessionCreation' and 'sync' set to true.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Issue Comment Edited: (CAMEL-2049) Improper configuration of
MINA connector and acceptor instances; Better producer
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-2049?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=54591#action_54591 ]
Claus Ibsen edited comment on CAMEL-2049 at 10/7/09 10:41 PM:
--------------------------------------------------------------
trunk: 821272, 823031.
1.x: 821276.
was (Author: davsclaus):
trunk: 821272.
1.x: 821276.
> Improper configuration of MINA connector and acceptor instances; Better producer
> --------------------------------------------------------------------------------
>
> Key: CAMEL-2049
> URL: https://issues.apache.org/activemq/browse/CAMEL-2049
> Project: Apache Camel
> Issue Type: Bug
> Components: camel-mina
> Affects Versions: 1.6.0
> Environment: Windows XP
> Reporter: Dmytro Rud
> Assignee: Claus Ibsen
> Fix For: 1.6.2, 2.0.0
>
> Attachments: 2009-10-06.patch, MinaComponent.patch, MinaSocketProducer.java
>
>
> A sample scenario where both MINA producer(s) and consumer(s) are used in the same route (e.g. some kind of dispatching or proxying):
> from("mina:tcp://localhost:8888?lazySessionCreation=true&sync=true")
> .to("mina:tcp://localhost:7777?lazySessionCreation=true&sync=true");
> from("mina:tcp://localhost:7777?lazySessionCreation=true&sync=true")
> .process(/*prepare answer*/);
> Due to improper configuration of MINA acceptor and connector instances in MinaComponent#createSocketEndpoint(), no more than 15 incoming threads can be served at port 8888 -- the producer becomes unable to open an outgoing session. This is actually an issue of MINA, not of Camel -- a test application written using "raw" MINA shows the same behaviour.
> A solution is to apply configuration rules described, e.g., at http://mina.apache.org/configuring-thread-model.html, as done in the attached patch.
> Moreover, the standard Camel-MINA producer is not thread-safe -- actually a well-known point. A second attached file contains a thread pool-based reentrant version, which can be efficiently used for TCP endpoints with both parameters 'lazySessionCreation' and 'sync' set to true.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CAMEL-2049) Improper configuration of MINA
connector and acceptor instances; Better producer
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-2049?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=54590#action_54590 ]
Claus Ibsen commented on CAMEL-2049:
------------------------------------
Thanks for these patches.
I was hoping that the Mina project much sooner have been able to release Apache Mina 2.0, which they unfortunately haven't.
So we are still using the older Mina 1.1.x.
Anyway I think you patches looks according to the recommended documentation at Mina itself so I will get them into the codebase.
> Improper configuration of MINA connector and acceptor instances; Better producer
> --------------------------------------------------------------------------------
>
> Key: CAMEL-2049
> URL: https://issues.apache.org/activemq/browse/CAMEL-2049
> Project: Apache Camel
> Issue Type: Bug
> Components: camel-mina
> Affects Versions: 1.6.0
> Environment: Windows XP
> Reporter: Dmytro Rud
> Attachments: MinaComponent.patch, MinaSocketProducer.java
>
>
> A sample scenario where both MINA producer(s) and consumer(s) are used in the same route (e.g. some kind of dispatching or proxying):
> from("mina:tcp://localhost:8888?lazySessionCreation=true&sync=true")
> .to("mina:tcp://localhost:7777?lazySessionCreation=true&sync=true");
> from("mina:tcp://localhost:7777?lazySessionCreation=true&sync=true")
> .process(/*prepare answer*/);
> Due to improper configuration of MINA acceptor and connector instances in MinaComponent#createSocketEndpoint(), no more than 15 incoming threads can be served at port 8888 -- the producer becomes unable to open an outgoing session. This is actually an issue of MINA, not of Camel -- a test application written using "raw" MINA shows the same behaviour.
> A solution is to apply configuration rules described, e.g., at http://mina.apache.org/configuring-thread-model.html, as done in the attached patch.
> Moreover, the standard Camel-MINA producer is not thread-safe -- actually a well-known point. A second attached file contains a thread pool-based reentrant version, which can be efficiently used for TCP endpoints with both parameters 'lazySessionCreation' and 'sync' set to true.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CAMEL-2049) Improper configuration of MINA
connector and acceptor instances; Better producer
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-2049?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=54613#action_54613 ]
Claus Ibsen commented on CAMEL-2049:
------------------------------------
Q1:
As it is going to be a custom solution for camel 1.x I would prefer it to be a hardcoded value. But I also think it make sense to configure it as well different users have different needs. So okay to add such an option but name it *producerPoolSize* to indicate its producer *only*.
Q2:
Yeah I think its fine in this case to let this new producer always being lazy. So the {{lazySessionCreation}} no longer apply to this new producer.
> Improper configuration of MINA connector and acceptor instances; Better producer
> --------------------------------------------------------------------------------
>
> Key: CAMEL-2049
> URL: https://issues.apache.org/activemq/browse/CAMEL-2049
> Project: Apache Camel
> Issue Type: Bug
> Components: camel-mina
> Affects Versions: 1.6.0
> Environment: Windows XP
> Reporter: Dmytro Rud
> Assignee: Claus Ibsen
> Fix For: 1.6.2, 2.0.0
>
> Attachments: MinaComponent.patch, MinaSocketProducer.java
>
>
> A sample scenario where both MINA producer(s) and consumer(s) are used in the same route (e.g. some kind of dispatching or proxying):
> from("mina:tcp://localhost:8888?lazySessionCreation=true&sync=true")
> .to("mina:tcp://localhost:7777?lazySessionCreation=true&sync=true");
> from("mina:tcp://localhost:7777?lazySessionCreation=true&sync=true")
> .process(/*prepare answer*/);
> Due to improper configuration of MINA acceptor and connector instances in MinaComponent#createSocketEndpoint(), no more than 15 incoming threads can be served at port 8888 -- the producer becomes unable to open an outgoing session. This is actually an issue of MINA, not of Camel -- a test application written using "raw" MINA shows the same behaviour.
> A solution is to apply configuration rules described, e.g., at http://mina.apache.org/configuring-thread-model.html, as done in the attached patch.
> Moreover, the standard Camel-MINA producer is not thread-safe -- actually a well-known point. A second attached file contains a thread pool-based reentrant version, which can be efficiently used for TCP endpoints with both parameters 'lazySessionCreation' and 'sync' set to true.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CAMEL-2049) Improper configuration of MINA
connector and acceptor instances; Better producer
Posted by "Dmytro Rud (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-2049?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=54612#action_54612 ]
Dmytro Rud commented on CAMEL-2049:
-----------------------------------
Claus,
I would like to introduce a new URL parameter for MINA TCP endpoints to specify the count of producer threads (parameter "threadsCount" of MinaSocketProducer's constructor). For example,
...
.to("mina:tcp://somehost:8888?sync=true&lazySessionCreation=true&poolSize=16")
Do you agree? Or would you rather prefer this parameter to be hard-coded? What default value should it have?
> Improper configuration of MINA connector and acceptor instances; Better producer
> --------------------------------------------------------------------------------
>
> Key: CAMEL-2049
> URL: https://issues.apache.org/activemq/browse/CAMEL-2049
> Project: Apache Camel
> Issue Type: Bug
> Components: camel-mina
> Affects Versions: 1.6.0
> Environment: Windows XP
> Reporter: Dmytro Rud
> Assignee: Claus Ibsen
> Fix For: 1.6.2, 2.0.0
>
> Attachments: MinaComponent.patch, MinaSocketProducer.java
>
>
> A sample scenario where both MINA producer(s) and consumer(s) are used in the same route (e.g. some kind of dispatching or proxying):
> from("mina:tcp://localhost:8888?lazySessionCreation=true&sync=true")
> .to("mina:tcp://localhost:7777?lazySessionCreation=true&sync=true");
> from("mina:tcp://localhost:7777?lazySessionCreation=true&sync=true")
> .process(/*prepare answer*/);
> Due to improper configuration of MINA acceptor and connector instances in MinaComponent#createSocketEndpoint(), no more than 15 incoming threads can be served at port 8888 -- the producer becomes unable to open an outgoing session. This is actually an issue of MINA, not of Camel -- a test application written using "raw" MINA shows the same behaviour.
> A solution is to apply configuration rules described, e.g., at http://mina.apache.org/configuring-thread-model.html, as done in the attached patch.
> Moreover, the standard Camel-MINA producer is not thread-safe -- actually a well-known point. A second attached file contains a thread pool-based reentrant version, which can be efficiently used for TCP endpoints with both parameters 'lazySessionCreation' and 'sync' set to true.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Work started: (CAMEL-2049) Improper configuration of MINA
connector and acceptor instances; Better producer
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-2049?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Work on CAMEL-2049 started by Claus Ibsen.
> Improper configuration of MINA connector and acceptor instances; Better producer
> --------------------------------------------------------------------------------
>
> Key: CAMEL-2049
> URL: https://issues.apache.org/activemq/browse/CAMEL-2049
> Project: Apache Camel
> Issue Type: Bug
> Components: camel-mina
> Affects Versions: 1.6.0
> Environment: Windows XP
> Reporter: Dmytro Rud
> Assignee: Claus Ibsen
> Fix For: 1.6.2, 2.0.0
>
> Attachments: MinaComponent.patch, MinaSocketProducer.java
>
>
> A sample scenario where both MINA producer(s) and consumer(s) are used in the same route (e.g. some kind of dispatching or proxying):
> from("mina:tcp://localhost:8888?lazySessionCreation=true&sync=true")
> .to("mina:tcp://localhost:7777?lazySessionCreation=true&sync=true");
> from("mina:tcp://localhost:7777?lazySessionCreation=true&sync=true")
> .process(/*prepare answer*/);
> Due to improper configuration of MINA acceptor and connector instances in MinaComponent#createSocketEndpoint(), no more than 15 incoming threads can be served at port 8888 -- the producer becomes unable to open an outgoing session. This is actually an issue of MINA, not of Camel -- a test application written using "raw" MINA shows the same behaviour.
> A solution is to apply configuration rules described, e.g., at http://mina.apache.org/configuring-thread-model.html, as done in the attached patch.
> Moreover, the standard Camel-MINA producer is not thread-safe -- actually a well-known point. A second attached file contains a thread pool-based reentrant version, which can be efficiently used for TCP endpoints with both parameters 'lazySessionCreation' and 'sync' set to true.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (CAMEL-2049) Improper configuration of MINA
connector and acceptor instances; Better producer
Posted by "Dmytro Rud (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-2049?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dmytro Rud updated CAMEL-2049:
------------------------------
Attachment: 2009-10-06.patch
The new patch is attached.
> Improper configuration of MINA connector and acceptor instances; Better producer
> --------------------------------------------------------------------------------
>
> Key: CAMEL-2049
> URL: https://issues.apache.org/activemq/browse/CAMEL-2049
> Project: Apache Camel
> Issue Type: Bug
> Components: camel-mina
> Affects Versions: 1.6.0
> Environment: Windows XP
> Reporter: Dmytro Rud
> Assignee: Claus Ibsen
> Fix For: 1.6.2, 2.0.0
>
> Attachments: 2009-10-06.patch, MinaComponent.patch, MinaSocketProducer.java
>
>
> A sample scenario where both MINA producer(s) and consumer(s) are used in the same route (e.g. some kind of dispatching or proxying):
> from("mina:tcp://localhost:8888?lazySessionCreation=true&sync=true")
> .to("mina:tcp://localhost:7777?lazySessionCreation=true&sync=true");
> from("mina:tcp://localhost:7777?lazySessionCreation=true&sync=true")
> .process(/*prepare answer*/);
> Due to improper configuration of MINA acceptor and connector instances in MinaComponent#createSocketEndpoint(), no more than 15 incoming threads can be served at port 8888 -- the producer becomes unable to open an outgoing session. This is actually an issue of MINA, not of Camel -- a test application written using "raw" MINA shows the same behaviour.
> A solution is to apply configuration rules described, e.g., at http://mina.apache.org/configuring-thread-model.html, as done in the attached patch.
> Moreover, the standard Camel-MINA producer is not thread-safe -- actually a well-known point. A second attached file contains a thread pool-based reentrant version, which can be efficiently used for TCP endpoints with both parameters 'lazySessionCreation' and 'sync' set to true.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CAMEL-2049) Improper configuration of MINA
connector and acceptor instances; Better producer
Posted by "Dmytro Rud (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-2049?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=54635#action_54635 ]
Dmytro Rud commented on CAMEL-2049:
-----------------------------------
BTW, the statement {{acceptorConfig.setThreadModel(ThreadModel.MANUAL);}} from _MinaComponent.patch_ seems to be absent in both 1.x and 2.0 branches. Today's _2009-10-06.patch_ introduces it again, but this patch is intended for 1.x only. Claus, could you please add the aforementioned line in 2.0 too?
> Improper configuration of MINA connector and acceptor instances; Better producer
> --------------------------------------------------------------------------------
>
> Key: CAMEL-2049
> URL: https://issues.apache.org/activemq/browse/CAMEL-2049
> Project: Apache Camel
> Issue Type: Bug
> Components: camel-mina
> Affects Versions: 1.6.0
> Environment: Windows XP
> Reporter: Dmytro Rud
> Assignee: Claus Ibsen
> Fix For: 1.6.2, 2.0.0
>
> Attachments: 2009-10-06.patch, MinaComponent.patch, MinaSocketProducer.java
>
>
> A sample scenario where both MINA producer(s) and consumer(s) are used in the same route (e.g. some kind of dispatching or proxying):
> from("mina:tcp://localhost:8888?lazySessionCreation=true&sync=true")
> .to("mina:tcp://localhost:7777?lazySessionCreation=true&sync=true");
> from("mina:tcp://localhost:7777?lazySessionCreation=true&sync=true")
> .process(/*prepare answer*/);
> Due to improper configuration of MINA acceptor and connector instances in MinaComponent#createSocketEndpoint(), no more than 15 incoming threads can be served at port 8888 -- the producer becomes unable to open an outgoing session. This is actually an issue of MINA, not of Camel -- a test application written using "raw" MINA shows the same behaviour.
> A solution is to apply configuration rules described, e.g., at http://mina.apache.org/configuring-thread-model.html, as done in the attached patch.
> Moreover, the standard Camel-MINA producer is not thread-safe -- actually a well-known point. A second attached file contains a thread pool-based reentrant version, which can be efficiently used for TCP endpoints with both parameters 'lazySessionCreation' and 'sync' set to true.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.