[ https://issues.apache.org/jira/browse/CXF-6454?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15246435#comment-15246435 ]
ASF GitHub Bot commented on CXF-6454: ------------------------------------- GitHub user vikash32504 opened a pull request: https://github.com/apache/cxf/pull/131 3.1.x fixes CXF-6454 - Orphaned JMS connections created in endless loop Changing the code to limit the number of retries to a pre-defined value. It can be configured as maxNoOfRetries in JMS Enpoint. Adding another property to make the sleep time configurable. We were seeing high CPU consumption because of low sleep interval time. You can merge this pull request into a Git repository by running: $ git pull https://github.com/apache/cxf 3.1.x-fixes Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cxf/pull/131.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #131 ---- commit 0ddd071dd1e7c475d8a0463564a991d62c96e3b0 Author: Colm O hEigeartaigh <cohei...@apache.org> Date: 2016-02-04T17:08:56Z Introducing a REST interface for the STS commit 9f457003d766950abc6a22d87d7045d3cf6aee44 Author: Sergey Beryozkin <sberyoz...@gmail.com> Date: 2016-02-05T13:32:33Z Cleaning up AbstractImplicitService and prototyping the code to deal with id_token response type in OidcImplicitService, not complete yet commit 89b7bb172804ebaffaa69c9207065e50eb5a5d36 Author: Sergey Beryozkin <sberyoz...@gmail.com> Date: 2016-02-05T14:15:58Z Converting most of AbstractJose* helpers into concrete classes to make it simpler to delegate to them without having to extend commit c3399966e4060837fd17511d604a26c8d12dad7c Author: Sergey Beryozkin <sberyoz...@gmail.com> Date: 2016-02-05T14:20:40Z Adding the renamed resources commit 14ed2e2c44b6da7641c95fb57212f8b5a5e77f3d Author: Sergey Beryozkin <sberyoz...@gmail.com> Date: 2016-02-05T14:30:05Z Updating OidcImplicitService to process IdToken commit 6a08736476f84c3bc40826d6debc6d4d96589cde Author: Sergey Beryozkin <sberyoz...@gmail.com> Date: 2016-02-05T14:32:25Z Fixing a typo commit dbfaf2b5aea3c4b09a825c82cae88c9d5f777aac Author: Colm O hEigeartaigh <cohei...@apache.org> Date: 2016-02-05T12:09:56Z Renaming tests commit 9aae5c5622dec1198a333ac6bb3508d3ca4634c1 Author: Colm O hEigeartaigh <cohei...@apache.org> Date: 2016-02-05T14:54:03Z Refactor of "BasicAuthFilter" commit 0b7e0e914328aa7a78a2eab00bb1040c703e9b63 Author: Sergey Beryozkin <sberyoz...@gmail.com> Date: 2016-02-05T16:53:40Z Prototyping OAuth2 redirection service which can support all the response types on a single path commit 194224faeb3e8eb6c8feabe6397f6b42ff0f605d Author: Colm O hEigeartaigh <cohei...@apache.org> Date: 2016-02-05T16:14:08Z Fixed TLS client auth issue commit bbe5e870579720272af49b9cea65b8293d5b1f3c Author: Colm O hEigeartaigh <cohei...@apache.org> Date: 2016-02-05T17:53:25Z Changing the default to issue tokens rather than WS-Trust responses commit 96802a240f833a1e1cf66cca376f8123b75d68cf Author: Colm O hEigeartaigh <cohei...@apache.org> Date: 2016-02-05T17:53:39Z Update SourceProvider to be able to write out any Nodes and not just Documents commit 04300f6e34a3243418f764640f85be60eb7e05df Author: Sergey Beryozkin <sberyoz...@gmail.com> Date: 2016-02-08T12:05:34Z Return a correct error if a composite oAuth AS can not find the right service commit 814dafbb8d0b6124b3a7efe5ead768f731a9ff66 Author: Sergey Beryozkin <sberyoz...@gmail.com> Date: 2016-02-08T13:23:31Z Updating SubjectCreator to accept Client too as it may be needed to create UserSubject correctly commit e8719af028f014782a282da4c5907ea2252c5095 Author: Sergey Beryozkin <sberyoz...@gmail.com> Date: 2016-02-08T14:16:56Z Fixing a duplicate state property issue when OidcImplicitService handles an id_token response type commit 03a3cf4f94236f94fc35c39b5c075ff79c82e0dc Author: Sergey Beryozkin <sberyoz...@gmail.com> Date: 2016-02-08T16:02:12Z Adding a homeRealm property to OAuth2 Client commit b60702df6f4f8a651395999ee7cc583bb89589e3 Author: Colm O hEigeartaigh <cohei...@apache.org> Date: 2016-02-08T11:24:06Z Adding more STS tests commit 01956cc9af68f80d4f12018a3779c12f36d5308e Author: Colm O hEigeartaigh <cohei...@apache.org> Date: 2016-02-08T11:58:36Z Adding AppliesTo support commit bc025f0fe4acf7191430230080318346272543e1 Author: Colm O hEigeartaigh <cohei...@apache.org> Date: 2016-02-08T12:17:57Z Adding claims test commit 9da51a99400fad5e6396949bd74a9efaf2093ade Author: Colm O hEigeartaigh <cohei...@apache.org> Date: 2016-02-08T14:13:16Z Got the PublicKey case working with TLS client certs commit 1808d49f62dd08b701c886f529ae7b9efb4b9fbe Author: Colm O hEigeartaigh <cohei...@apache.org> Date: 2016-02-08T14:42:35Z Got WS-Trust issuing working again commit 547f8af0519e6fd973e9cf379034fa6940eb7ceb Author: Colm O hEigeartaigh <cohei...@apache.org> Date: 2016-02-08T16:33:51Z Adding tests for POST interface commit 448fdcf01e27006fef31de39c7672cc251e07dbc Author: Sergey Beryozkin <sberyoz...@gmail.com> Date: 2016-02-09T12:19:47Z Passing request params to SubjectCreator too commit d0e42861b5df45cf24985d956372f75bf04800f3 Author: Sergey Beryozkin <sberyoz...@gmail.com> Date: 2016-02-09T13:00:41Z Restoring the option to store client id in a session commit 87fd53f908c9cdbcf37b2c763664d66f4a4b8420 Author: Sergey Beryozkin <sberyoz...@gmail.com> Date: 2016-02-09T13:55:48Z Converting a username in the introspection response commit b0ccc3f87b373009f4bd9d9a6a7aa9484e7aca73 Author: Sergey Beryozkin <sberyoz...@gmail.com> Date: 2016-02-09T16:17:00Z Avoiding linking UserSubject to indiv clients too early commit a75df553a2bb0cee94b96fababa723d7d0f45d90 Author: Colm O hEigeartaigh <cohei...@apache.org> Date: 2016-02-09T17:52:28Z Adding renew/validate tests for the REST STS commit b6b48c1bca784fd0e84c6e74223f0d535f4c7ec6 Author: Sergey Beryozkin <sberyoz...@gmail.com> Date: 2016-02-10T10:57:38Z [CXF-6771] Checking ContextProvider before Servlet contexts are initialized from the message commit 60c24cda73a2612551bdc518d901a7c6bc82ee77 Author: Sergey Beryozkin <sberyoz...@gmail.com> Date: 2016-02-10T11:15:42Z [CXF-6772] Reporting browserType property as HTTP User-Agent header commit 23112f714cc6c52bef8678739f216f5a8ef26d49 Author: Sergey Beryozkin <sberyoz...@gmail.com> Date: 2016-02-10T12:05:57Z [CXF-6770] Fixing NPE ---- > Orphaned JMS connections created in endless loop > ------------------------------------------------ > > Key: CXF-6454 > URL: https://issues.apache.org/jira/browse/CXF-6454 > Project: CXF > Issue Type: Bug > Components: JMS, Transports > Affects Versions: 3.0.5 > Reporter: Waldemar Szostak > Priority: Critical > > h3. Problem description > In JMSFactory.createConnection(JMSConfiguration): > {code}public static Connection createConnection(JMSConfiguration jmsConfig) > throws JMSException { > String username = jmsConfig.getUserName(); > ConnectionFactory cf = jmsConfig.getConnectionFactory(); > Connection connection = username != null > ? cf.createConnection(username, jmsConfig.getPassword()) > : cf.createConnection(); > if (jmsConfig.getDurableSubscriptionClientId() != null) { > > connection.setClientID(jmsConfig.getDurableSubscriptionClientId()); > } > return connection; > }{code} > there is no exception handling if the clientID fails to be set. Such an > exception would exit this method without passing the reference to the > just-opened JMS connection to exception handling code > (JMSDestination.createTargetDestinationListener()). > Moreover, JMSDestination.restartConnection() keeps on starting new > connections (there is no max attempt restriction!) until it creates one > without an exception thrown in the process. > Now, if the clientID is already connected to the ESB, this creation of new > connection will last until server resources are no longer available to the > JVM. > h3. Possible solution > # Close the connection if it's not possible to set the specified clientID at > the time: > {code}public static Connection createConnection(JMSConfiguration jmsConfig) > throws JMSException { > String username = jmsConfig.getUserName(); > ConnectionFactory cf = jmsConfig.getConnectionFactory(); > Connection connection = username != null > ? cf.createConnection(username, > jmsConfig.getPassword()) > : cf.createConnection(); > if (jmsConfig.getDurableSubscriptionClientId() != null) { > try { > connection.setClientID(jmsConfig.getDurableSubscriptionClientId()); > } catch (InvalidClientIDException e) { > connection.close(); > throw e; > } > } > return connection; > }{code} > # Add a setting to restrict the maximum attempts to restart the connection in > JMSDestination.restartConnection() A configurable value would be best, but > even a hardcoded.. anything but the practically endless loop ;-) -- This message was sent by Atlassian JIRA (v6.3.4#6332)