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 "Zsombor Gegesy (JIRA)" <se...@james.apache.org> on 2007/09/17 00:14:32 UTC
[jira] Commented: (JAMES-803) Add ability to load resources from
the classpath instead of the file system
[ https://issues.apache.org/jira/browse/JAMES-803?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12527907 ]
Zsombor Gegesy commented on JAMES-803:
--------------------------------------
There is one little problem with the current code, it's explicitly checks that the config file name is starts with file://, so the components are not usable, so please change the code
- if (!sqlFileName.startsWith("file://")) {
+ if (!sqlFileName.startsWith("file://") && !sqlFileName.startsWith("classpath:")) {
throw new ConfigurationException
- ("Malformed sqlFile - Must be of the format 'file://<filename>'.");
+ ("Malformed sqlFile - Must be of the format 'file://<filename>' or 'classpath:<resource>'.");
in the following files:
core-library/src/main/java/org/apache/james/userrepository/AbstractJdbcUsersRepository.java core-library/src/main/java/org/apache/james/vut/JDBCVirtualUserTable.java core-library/src/main/java/org/apache/james/mailrepository/JDBCMailRepository.java
> Add ability to load resources from the classpath instead of the file system
> ---------------------------------------------------------------------------
>
> Key: JAMES-803
> URL: https://issues.apache.org/jira/browse/JAMES-803
> Project: James
> Issue Type: Improvement
> Components: James Core
> Affects Versions: Trunk
> Reporter: Zsombor
> Assignee: Bernd Fondermann
> Priority: Minor
> Attachments: loading-from-the-classpath-spring.patch, loading-from-the-classpath.patch
>
>
> Currently lots of components try to get their configuration files from the filesystem, but most of the time it's simpler to get from the classpath.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org