mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Merge V2.0 to HEAD
5234: LicenseService shutdown 5256: AR-1273 workaround 5289: AWC-1142 5294: WCM-360 5296: Potential NPE in patches dao git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5333 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -0,0 +1,15 @@
|
|||||||
|
/*
|
||||||
|
* Solution to PostgreSQL issue:
|
||||||
|
* function information_schema._pg_keypositions() does not exist
|
||||||
|
* Taken from: http://archives.postgresql.org/pgsql-general/2005-12/msg00060.php
|
||||||
|
* Author: Jason Long
|
||||||
|
* Tested against PostgreSQL 8.2
|
||||||
|
* First seen during upgrade testing of PostgreSQL from Alfresco 1.4.3 to 2.0
|
||||||
|
*/
|
||||||
|
SET search_path TO information_schema, public;
|
||||||
|
CREATE FUNCTION _pg_keypositions() RETURNS SETOF integer
|
||||||
|
LANGUAGE sql
|
||||||
|
IMMUTABLE
|
||||||
|
AS 'select g.s
|
||||||
|
from generate_series(1,current_setting(''max_index_keys'')::int,1)
|
||||||
|
as g(s)';
|
@@ -118,7 +118,8 @@ public class HibernatePatchDaoServiceImpl extends HibernateDaoSupport implements
|
|||||||
{
|
{
|
||||||
AppliedPatch appliedPatch = iterator.next();
|
AppliedPatch appliedPatch = iterator.next();
|
||||||
Date appliedOnDate = appliedPatch.getAppliedOnDate();
|
Date appliedOnDate = appliedPatch.getAppliedOnDate();
|
||||||
if (appliedOnDate != null && fromDate.compareTo(appliedOnDate) >= 0 || toDate.compareTo(appliedOnDate) <= 0)
|
if (appliedOnDate != null &&
|
||||||
|
(fromDate.compareTo(appliedOnDate) >= 0 || toDate.compareTo(appliedOnDate) <= 0))
|
||||||
{
|
{
|
||||||
// it is out of range
|
// it is out of range
|
||||||
iterator.remove();
|
iterator.remove();
|
||||||
|
@@ -185,6 +185,10 @@ public class DescriptorServiceImpl extends AbstractLifecycleBean implements Desc
|
|||||||
@Override
|
@Override
|
||||||
protected void onShutdown(ApplicationEvent event)
|
protected void onShutdown(ApplicationEvent event)
|
||||||
{
|
{
|
||||||
|
if (this.licenseService != null)
|
||||||
|
{
|
||||||
|
this.licenseService.shutdown();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -396,6 +400,10 @@ public class DescriptorServiceImpl extends AbstractLifecycleBean implements Desc
|
|||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void shutdown()
|
||||||
|
{
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -132,6 +132,10 @@ public class FreeMarkerProcessor implements TemplateProcessor
|
|||||||
// rethrow any exception so we can deal with them
|
// rethrow any exception so we can deal with them
|
||||||
config.setTemplateExceptionHandler(TemplateExceptionHandler.RETHROW_HANDLER);
|
config.setTemplateExceptionHandler(TemplateExceptionHandler.RETHROW_HANDLER);
|
||||||
|
|
||||||
|
// localized template lookups off by default - as they create strange noderef lookups
|
||||||
|
// such as workspace://SpacesStore/01234_en_GB - causes problems for ns.exists() on DB2
|
||||||
|
config.setLocalizedLookup(false);
|
||||||
|
|
||||||
// set default template encoding
|
// set default template encoding
|
||||||
if (defaultEncoding != null)
|
if (defaultEncoding != null)
|
||||||
{
|
{
|
||||||
|
@@ -54,4 +54,9 @@ public interface LicenseService
|
|||||||
@NotAuditable
|
@NotAuditable
|
||||||
public LicenseDescriptor getLicense() throws LicenseException;
|
public LicenseDescriptor getLicense() throws LicenseException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Informs the service it is being shutdown
|
||||||
|
*/
|
||||||
|
@NotAuditable
|
||||||
|
public void shutdown();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user