You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by "Steve Brewin (JIRA)" <se...@james.apache.org> on 2006/02/02 23:57:04 UTC

[jira] Commented: (JSIEVE-5) You'd better change the way you load sieveConfig.xml

    [ 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