[esb-issues] [JBoss JIRA] Commented: (JBESB-3085) Misloading of Template Files in ContentBasedRouter

Fernando Ribeiro (JIRA) jira-events at lists.jboss.org
Tue Jan 5 21:59:57 EST 2010


    [ https://jira.jboss.org/jira/browse/JBESB-3085?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12502369#action_12502369 ] 

Fernando Ribeiro commented on JBESB-3085:
-----------------------------------------

The issue is that ContentBasedRouter doesn't look for files in the classpath only, and therefore is the only one which parameter can't begin with a "/".

I suggest that to change to avoid errors.

> Misloading of Template Files in ContentBasedRouter
> --------------------------------------------------
>
>                 Key: JBESB-3085
>                 URL: https://jira.jboss.org/jira/browse/JBESB-3085
>             Project: JBoss ESB
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: Content Based Routing
>    Affects Versions: 4.7
>            Reporter: Fernando Ribeiro
>
> Unlike XsltAction, for example, ContentBasedRouter tries to find the template file in the file system before loading it from the classpath.
> // Get the properties file stream...
> if (ruleSetFile.exists()) {
> 	try {
> 	        ruleStream = new FileInputStream(ruleSetFile);
>         } catch (FileNotFoundException e) {
> 	        throw new MessageRouterException("Unable to open rule properties file '" + ruleSetFile.getAbsolutePath() + "'.", e);
>         }
>         lastLoaded = ruleSetFile.lastModified();
> } else {
> 	ruleStream = ClassUtil.getResourceAsStream(ruleSetConfig, AbstractPropertyRulesRouter.class);
> }
> (from AbstractPropertyRulesRouter.java)
> It is an easy miss because it is the only parameter that can't begin with "/".

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

        


More information about the esb-issues mailing list