Author: alessio.soldano(a)jboss.com
Date: 2012-09-13 04:43:08 -0400 (Thu, 13 Sep 2012)
New Revision: 16717
Modified:
common/trunk/src/main/java/org/jboss/ws/common/management/AbstractServerConfig.java
Log:
- [JBWS-3545] Wrap ClientConfig and EndpointConfig lists into synchronized ones
- set initial size for arraylists above to reduce memory footprint (default is 10 and
it's really too much here)
Modified:
common/trunk/src/main/java/org/jboss/ws/common/management/AbstractServerConfig.java
===================================================================
---
common/trunk/src/main/java/org/jboss/ws/common/management/AbstractServerConfig.java 2012-09-12
16:06:05 UTC (rev 16716)
+++
common/trunk/src/main/java/org/jboss/ws/common/management/AbstractServerConfig.java 2012-09-13
08:43:08 UTC (rev 16717)
@@ -25,6 +25,7 @@
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.List;
import java.util.ResourceBundle;
@@ -78,9 +79,9 @@
//The stack config
protected StackConfig stackConfig;
// The default endpoint configs, if any
- private final List<ClientConfig> clientConfigs = new
ArrayList<ClientConfig>();
+ private final List<ClientConfig> clientConfigs =
Collections.synchronizedList(new ArrayList<ClientConfig>(2));
// The default endpoint configs, if any
- private final List<EndpointConfig> endpointConfigs = new
ArrayList<EndpointConfig>();
+ private final List<EndpointConfig> endpointConfigs =
Collections.synchronizedList(new ArrayList<EndpointConfig>(3));
public MBeanServer getMbeanServer()
{
Show replies by date