You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Manu T George (JIRA)" <ji...@apache.org> on 2008/03/12 11:46:35 UTC
[jira] Created: (AMQ-1618) Improper handling of container
restrictions in creation of sessions
Improper handling of container restrictions in creation of sessions
-------------------------------------------------------------------
Key: AMQ-1618
URL: https://issues.apache.org/activemq/browse/AMQ-1618
Project: ActiveMQ
Issue Type: Bug
Components: Connector, Geronimo Integration
Affects Versions: 5.0.0, 4.1.1
Environment: All
Reporter: Manu T George
Fix For: 4.1.2, 5.1.0, 5.2.0
In the getServerSession() method of org.apache.activemq.ra.ServerSessionPoolImpl there is an issue with the code block given below
ServerSessionImpl ss = createServerSessionImpl();
// We may not be able to create a session due to the container
// restricting us.
if (ss == null) {
if (idleSessions.size() == 0) {
throw new JMSException("Endpoint factory did not allows to any endpoints.");
}
return getExistingServerSession();
}
If the container restricts the creation of a session then messages should be queued to an existing session. So the check should be
if (activeSessions.size() == 0) {
throw new JMSException("Endpoint factory did not allows to any endpoints.");
}
instead of the one above
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (AMQ-1618) Improper handling of container
restrictions in creation of sessions
Posted by "David Jencks (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/AMQ-1618?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
David Jencks reassigned AMQ-1618:
---------------------------------
Assignee: David Jencks
> Improper handling of container restrictions in creation of sessions
> -------------------------------------------------------------------
>
> Key: AMQ-1618
> URL: https://issues.apache.org/activemq/browse/AMQ-1618
> Project: ActiveMQ
> Issue Type: Bug
> Components: Connector, Geronimo Integration
> Affects Versions: 4.1.1, 5.0.0
> Environment: All
> Reporter: Manu T George
> Assignee: David Jencks
> Fix For: 4.1.2, 5.1.0, 5.2.0
>
>
> In the getServerSession() method of org.apache.activemq.ra.ServerSessionPoolImpl there is an issue with the code block given below
> ServerSessionImpl ss = createServerSessionImpl();
> // We may not be able to create a session due to the container
> // restricting us.
> if (ss == null) {
> if (idleSessions.size() == 0) {
> throw new JMSException("Endpoint factory did not allows to any endpoints.");
> }
> return getExistingServerSession();
> }
> If the container restricts the creation of a session then messages should be queued to an existing session. So the check should be
> if (activeSessions.size() == 0) {
> throw new JMSException("Endpoint factory did not allows to any endpoints.");
> }
> instead of the one above
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (AMQ-1618) Improper handling of container
restrictions in creation of sessions
Posted by "David Jencks (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/AMQ-1618?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=41684#action_41684 ]
David Jencks commented on AMQ-1618:
-----------------------------------
Fix for this particular problem committed in trunk rev 637004 and branches/4.1 rev 637006. However the code appears to be seriously not-thread-safe, so I'm considering what other ways this kind of problem may arise before closing issue.
> Improper handling of container restrictions in creation of sessions
> -------------------------------------------------------------------
>
> Key: AMQ-1618
> URL: https://issues.apache.org/activemq/browse/AMQ-1618
> Project: ActiveMQ
> Issue Type: Bug
> Components: Connector, Geronimo Integration
> Affects Versions: 4.1.1, 5.0.0
> Environment: All
> Reporter: Manu T George
> Assignee: David Jencks
> Fix For: 4.1.2, 5.1.0, 5.2.0
>
>
> In the getServerSession() method of org.apache.activemq.ra.ServerSessionPoolImpl there is an issue with the code block given below
> ServerSessionImpl ss = createServerSessionImpl();
> // We may not be able to create a session due to the container
> // restricting us.
> if (ss == null) {
> if (idleSessions.size() == 0) {
> throw new JMSException("Endpoint factory did not allows to any endpoints.");
> }
> return getExistingServerSession();
> }
> If the container restricts the creation of a session then messages should be queued to an existing session. So the check should be
> if (activeSessions.size() == 0) {
> throw new JMSException("Endpoint factory did not allows to any endpoints.");
> }
> instead of the one above
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (AMQ-1618) Improper handling of container
restrictions in creation of sessions
Posted by "Manu T George (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/AMQ-1618?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=41662#action_41662 ]
Manu T George commented on AMQ-1618:
------------------------------------
Thanks to David Jencks for finding the issue and its soln
> Improper handling of container restrictions in creation of sessions
> -------------------------------------------------------------------
>
> Key: AMQ-1618
> URL: https://issues.apache.org/activemq/browse/AMQ-1618
> Project: ActiveMQ
> Issue Type: Bug
> Components: Connector, Geronimo Integration
> Affects Versions: 4.1.1, 5.0.0
> Environment: All
> Reporter: Manu T George
> Fix For: 4.1.2, 5.1.0, 5.2.0
>
>
> In the getServerSession() method of org.apache.activemq.ra.ServerSessionPoolImpl there is an issue with the code block given below
> ServerSessionImpl ss = createServerSessionImpl();
> // We may not be able to create a session due to the container
> // restricting us.
> if (ss == null) {
> if (idleSessions.size() == 0) {
> throw new JMSException("Endpoint factory did not allows to any endpoints.");
> }
> return getExistingServerSession();
> }
> If the container restricts the creation of a session then messages should be queued to an existing session. So the check should be
> if (activeSessions.size() == 0) {
> throw new JMSException("Endpoint factory did not allows to any endpoints.");
> }
> instead of the one above
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (AMQ-1618) Improper handling of container
restrictions in creation of sessions
Posted by "David Jencks (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/AMQ-1618?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
David Jencks closed AMQ-1618.
-----------------------------
Resolution: Fixed
Original bug fixed, and synchronization looks ok to me now.
RDavies made initial sync fixes in r637028 in trunk
I refined this in r637218 trunk and 637246 4.1
> Improper handling of container restrictions in creation of sessions
> -------------------------------------------------------------------
>
> Key: AMQ-1618
> URL: https://issues.apache.org/activemq/browse/AMQ-1618
> Project: ActiveMQ
> Issue Type: Bug
> Components: Connector, Geronimo Integration
> Affects Versions: 4.1.1, 5.0.0
> Environment: All
> Reporter: Manu T George
> Assignee: David Jencks
> Fix For: 4.1.2, 5.1.0, 5.2.0
>
>
> In the getServerSession() method of org.apache.activemq.ra.ServerSessionPoolImpl there is an issue with the code block given below
> ServerSessionImpl ss = createServerSessionImpl();
> // We may not be able to create a session due to the container
> // restricting us.
> if (ss == null) {
> if (idleSessions.size() == 0) {
> throw new JMSException("Endpoint factory did not allows to any endpoints.");
> }
> return getExistingServerSession();
> }
> If the container restricts the creation of a session then messages should be queued to an existing session. So the check should be
> if (activeSessions.size() == 0) {
> throw new JMSException("Endpoint factory did not allows to any endpoints.");
> }
> instead of the one above
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.