[
https://issues.apache.org/jira/browse/TUSCANY-3104?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12725054#action_12725054
]
Ramkumar Ramalingam commented on TUSCANY-3104:
----------------------------------------------
Looks like here the issue is not about supporting files that are part of other
contributions, but to support the paths relative to the current VM working
directory, which is a deviation from the current contribution model that we are
following in SCA.
NOTE: In Spring, plain paths in FileSystemXmlApplicationContext will always be
interpreted as relative to the current VM working directory, even if they start
with a slash. (This is consistent with the semantics in a Servlet container.)
Use an explicit "file:" prefix to enforce an absolute file path.
I believe, this will lead to some confusion within the user, whether they
should place the files within the contribution OR keep them outside always.
So, I think it would be good if we can remove the support of loading multiple
application contexts with FileSystemXmlApplicationContext in
implementation.spring.
NOTE: We will still support loading of multiple application contexts with
ClassPathXmlApplicationContext, and we will recommend the users to use
ClassPathXmlApplicationContext for all the multiple application context loading
feature with Tuscany.
I will make necessary changes to remove this feature.
> Using "FileSystemXmlApplicationContext" to load multiple application context
> files has problems with relative path identification
> ---------------------------------------------------------------------------------------------------------------------------------
>
> Key: TUSCANY-3104
> URL: https://issues.apache.org/jira/browse/TUSCANY-3104
> Project: Tuscany
> Issue Type: Bug
> Components: Java SCA Spring Implementation Extension
> Environment: All
> Reporter: Hasan Muhammad
> Assignee: Ramkumar Ramalingam
>
> From Spring point of view, the path's relative to the contribution is not
> accepted as they expect a path relative to the current VM working directory.
> We should follow this standard to keep Spring happy. So for example, the path
> should be as shown below.... (ref from itest/spring testcases)
> <bean id="beanRefFactory"
> class="org.springframework.context.support.FileSystemXmlApplicationContext">
> <constructor-arg>
> <list>
>
> <value>/src/main/resources/beanRef-SpringHelloWorld-context.xml</value>
>
> <value>/src/main/resources/bean-frontend-springimpl-context.xml</value>
> </list>
> </constructor-arg>
> </bean>
> From Tuscany point of view, we need to decide whether we should support files
> outside the contribution. Recently Raymond raised an similar issue in 2.x for
> spring context files outside the contribution.
> Need to fix this.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.