james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Brewin (JIRA)" <server-...@james.apache.org>
Subject [jira] Commented: (JSIEVE-5) You'd better change the way you load sieveConfig.xml
Date Thu, 02 Feb 2006 22:57:04 GMT
    [ http://issues.apache.org/jira/browse/JSIEVE-5?page=comments#action_12365011 ] 

Steve Brewin commented on JSIEVE-5:
-----------------------------------

I assume you mean in a context switching environment, such as a J2EE application? This is
not a problem in non-context switching environments such as James. 

These days Thread.currentThread().getContextClassLoader() is the safest route to go for resolving
resources in all enviroments.

A useful non-breaking change. 

> You'd better change the way you load sieveConfig.xml
> ----------------------------------------------------
>
>          Key: JSIEVE-5
>          URL: http://issues.apache.org/jira/browse/JSIEVE-5
>      Project: jSieve
>         Type: Improvement
>     Reporter: Vladimir

>
> I've placed sieveConfig.xml in jsieve's jar (I think that might be much better if you
use jsieve as a library).
> You'd better change in ConfigurationManager method: getConfigStream
> this: return ClassLoader.getSystemResourceAsStream(getConfigName());
> with this:
> return Thread.currentThread().getContextClassLoader().getResourceAsStream(getConfigName());
> ClassLoader doesn't load config if you use jsieve as a library

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message