ALFCOM-2816: Changes for JBoss v5.0.1.GA compatibility

- All code that resolves classpath resources goes through JBossEnabledResourceLoader with VFS support
- JBossEnabledResourcePatternResolver can handle recursion within VFS directory structures
- Reflection used to avoid runtime dependency on JBoss classes
- resource-ref declared in jboss-web.xml 
- Work around incorrect treatment of env-entry-value tag in web.xml

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@14106 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Dave Ward
2009-04-28 14:07:52 +00:00
parent f743983dcb
commit e1d365e545
7 changed files with 98 additions and 66 deletions

View File

@@ -31,8 +31,12 @@ import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.core.io.Resource;
import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
import org.springframework.core.io.support.ResourcePatternResolver;
/**
* Initialises Log4j's HierarchyDynamicMBean (refer to core-services-context.xml) and any overriding log4.properties files.
@@ -62,10 +66,11 @@ import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
* WEB - INF / classes / alfresco / module / org.alfresco.module.avmCompare / log4j.properties
* </pre>
*/
public class Log4JHierarchyInit
public class Log4JHierarchyInit implements ApplicationContextAware
{
private static Log logger = LogFactory.getLog(Log4JHierarchyInit.class);
private List<String> extraLog4jUrls;
private ResourcePatternResolver resolver = new PathMatchingResourcePatternResolver();
public Log4JHierarchyInit()
{
@@ -85,6 +90,16 @@ public class Log4JHierarchyInit
extraLog4jUrls.add(url);
}
}
/* (non-Javadoc)
* @see org.springframework.context.ApplicationContextAware#setApplicationContext(org.springframework.context.ApplicationContext)
*/
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException
{
this.resolver = applicationContext;
}
@SuppressWarnings("unchecked")
public void init()
@@ -120,7 +135,6 @@ public class Log4JHierarchyInit
private void importLogSettings(Method method, String springUrl)
{
PathMatchingResourcePatternResolver resolver = new PathMatchingResourcePatternResolver();
Resource[] resources = null;
try