diff --git a/config/alfresco/dbscripts/upgrade/2.2/org.hibernate.dialect.MySQLInnoDBDialect/upgrade-from-2.1.sql b/config/alfresco/dbscripts/upgrade/2.2/org.hibernate.dialect.MySQLInnoDBDialect/upgrade-from-2.1.sql index cbdfe9c1fb..164a010f2e 100644 --- a/config/alfresco/dbscripts/upgrade/2.2/org.hibernate.dialect.MySQLInnoDBDialect/upgrade-from-2.1.sql +++ b/config/alfresco/dbscripts/upgrade/2.2/org.hibernate.dialect.MySQLInnoDBDialect/upgrade-from-2.1.sql @@ -696,11 +696,15 @@ INSERT INTO alf_locale (id, locale_str) VALUES (1, '.default'); -- Locales come from the attribute table which was used to support MLText persistence -- Query OK, 0 rows affected (17.22 sec) +--FOREACH alf_attributes.id system.upgrade.alf_attributes.batchsize INSERT INTO alf_locale (locale_str) SELECT DISTINCT(ma.mkey) FROM alf_node_properties np JOIN alf_attributes a1 ON (np.attribute_value = a1.id) JOIN alf_map_attribute_entries ma ON (ma.map_id = a1.id) + LEFT OUTER JOIN alf_locale l ON (ma.mkey = l.locale_str) + WHERE l.locale_str IS NULL + AND a1.id >= ${LOWERBOUND} AND a1.id <= ${UPPERBOUND} ; -- ------------------------------- diff --git a/config/alfresco/dbscripts/upgrade/2.2/org.hibernate.dialect.MySQLInnoDBDialect/upgrade-from-2.2SP1.sql b/config/alfresco/dbscripts/upgrade/2.2/org.hibernate.dialect.MySQLInnoDBDialect/upgrade-from-2.2SP1.sql index 0b41fcf587..59a85e0ac4 100644 --- a/config/alfresco/dbscripts/upgrade/2.2/org.hibernate.dialect.MySQLInnoDBDialect/upgrade-from-2.2SP1.sql +++ b/config/alfresco/dbscripts/upgrade/2.2/org.hibernate.dialect.MySQLInnoDBDialect/upgrade-from-2.2SP1.sql @@ -411,11 +411,15 @@ CREATE TABLE alf_locale INSERT INTO alf_locale (id, locale_str) VALUES (1, '.default'); -- Locales come from the attribute table which was used to support MLText persistence +--FOREACH alf_attributes.id system.upgrade.alf_attributes.batchsize INSERT INTO alf_locale (locale_str) SELECT DISTINCT(ma.mkey) FROM alf_node_properties np JOIN alf_attributes a1 ON (np.attribute_value = a1.id) JOIN alf_map_attribute_entries ma ON (ma.map_id = a1.id) + LEFT OUTER JOIN alf_locale l ON (ma.mkey = l.locale_str) + WHERE l.locale_str IS NULL + AND a1.id >= ${LOWERBOUND} AND a1.id <= ${UPPERBOUND} ; -- ------------------------------- diff --git a/config/alfresco/subsystems/email/InboundSMTP/inboundSMTP-context.xml b/config/alfresco/subsystems/email/InboundSMTP/inboundSMTP-context.xml index 1a66145512..b62f469e77 100755 --- a/config/alfresco/subsystems/email/InboundSMTP/inboundSMTP-context.xml +++ b/config/alfresco/subsystems/email/InboundSMTP/inboundSMTP-context.xml @@ -24,6 +24,9 @@ ${email.server.port} + + ${email.server.connections.max} + ${email.server.blocked.senders} diff --git a/config/alfresco/subsystems/email/InboundSMTP/inboundSMTP.properties b/config/alfresco/subsystems/email/InboundSMTP/inboundSMTP.properties index 9f81f53309..e94f63c2ab 100755 --- a/config/alfresco/subsystems/email/InboundSMTP/inboundSMTP.properties +++ b/config/alfresco/subsystems/email/InboundSMTP/inboundSMTP.properties @@ -8,6 +8,7 @@ email.inbound.enabled=true email.server.enabled=false email.server.port=25 +email.server.connections.max=3 email.server.domain=alfresco.com email.server.allowed.senders=.* email.server.blocked.senders= \ No newline at end of file diff --git a/source/java/org/alfresco/email/server/EmailServer.java b/source/java/org/alfresco/email/server/EmailServer.java index 6c0832196b..51b3c8d6fc 100644 --- a/source/java/org/alfresco/email/server/EmailServer.java +++ b/source/java/org/alfresco/email/server/EmailServer.java @@ -44,6 +44,7 @@ public abstract class EmailServer extends AbstractLifecycleBean private boolean enabled; private String domain; private int port; + private int maxConnections; private Set blockedSenders; private Set allowedSenders; @@ -58,6 +59,7 @@ public abstract class EmailServer extends AbstractLifecycleBean this.enabled = false; this.port = 25; this.domain = null; + this.maxConnections = 3; this.blockedSenders = new HashSet(23); this.allowedSenders = new HashSet(23); } @@ -93,6 +95,24 @@ public abstract class EmailServer extends AbstractLifecycleBean this.port = port; } + /** + * Returns the maximum number of connection accepted by the server. + * @return the maximum number of connections + */ + protected int getMaxConnections() + { + return maxConnections; + } + + /** + * Sets the maximum number of connection accepted by the server + * @param maxConnections + */ + public void setMaxConnections(int maxConnections) + { + this.maxConnections = maxConnections; + } + /** * Set the blocked senders as a comma separated list. The entries will be trimmed of * all whitespace. diff --git a/source/java/org/alfresco/email/server/impl/subetha/SubethaEmailServer.java b/source/java/org/alfresco/email/server/impl/subetha/SubethaEmailServer.java index e3abf202f6..eea3c6fdb0 100644 --- a/source/java/org/alfresco/email/server/impl/subetha/SubethaEmailServer.java +++ b/source/java/org/alfresco/email/server/impl/subetha/SubethaEmailServer.java @@ -57,6 +57,7 @@ public class SubethaEmailServer extends EmailServer serverImpl = new SMTPServer(new HandlerFactory()); serverImpl.setPort(getPort()); serverImpl.setHostName(getDomain()); + serverImpl.setMaxConnections(getMaxConnections()); serverImpl.start(); log.info("Email Server has started successfully"); }