[ 
https://issues.apache.org/jira/browse/OPENJPA-3072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18141800#comment-18141800
 ] 

ASF subversion and git services commented on OPENJPA-3072:
----------------------------------------------------------

Commit 61c5c286c2b05c5b39165e2cb431c03347faff87 in openjpa's branch 
refs/heads/OPENJPA-3072 from Richard Zowalla
[ https://gitbox.apache.org/repos/asf?p=openjpa.git;h=61c5c286c ]

[OPENJPA-3072] TCPRemoteCommitProvider: only accept connections from the 
configured peers and limit receiving connections

The TCP listener accepted connections from any host, started one receiver
thread per connection without a limit and never removed finished receiver
threads.

- Accept incoming connections only from the configured Addresses and from
  this host (loopback and local interface addresses). The new
  RestrictToPeers property (default true) turns this off.
- Limit the number of simultaneously receiving connections with the new
  MaxReceiveConnections property (default 100, 0 or less means no limit).
- Rejected connections are closed and logged without stopping the accept loop.
- Receiver threads are kept in a concurrent set and remove themselves when
  they finish.
- The listener is shared per port, so a connection is accepted if any
  registered provider accepts it and the highest limit applies. A new
  listener registers its provider before it starts accepting.
- The peer check reads the current addresses, so it follows address updates
  of DynamicTCPRemoteCommitProvider, which additionally refreshes its
  addresses (at most once per second) before rejecting an unknown host, so
  newly started peers are not rejected until the next periodic refresh.
- Document the new properties in the reference guide.


> TCPRemoteCommitProvider: only accept connections from the configured peers 
> and limit receiving connections
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-3072
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-3072
>             Project: OpenJPA
>          Issue Type: Improvement
>            Reporter: Richard Zowalla
>            Assignee: Richard Zowalla
>            Priority: Major
>             Fix For: 4.2.0
>
>
> The TCP remote commit provider accepts connections from any host and starts 
> one thread per connection without a limit, and finished receiver threads are 
> never removed from the listener. Accept only connections from the configured 
> Addresses (and this host), with an option to turn this off, limit the number 
> of receiving connections, and remove finished threads.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to