struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gvanma...@comcast.net (Gary VanMatre)
Subject Re: [shale] clay config loading from classpath
Date Fri, 06 Jan 2006 21:37:03 GMT
>From: Ryan Wynn <bigwynnr@gmail.com> 
>
> I know that clay will load any config files as 
> META-INF/clay-config.xml from jars on the classpath. Is there any way 
> to tell clay to load config files of any name from jars on the 
> classpath? 
> 
> I want to break up my clay config file (included in a lib) because it 
> is getting pretty big. With spring configuration files I am able to 
> do this: 
> 
><context-param>
>  <param-name>contextConfigLocation</param-name>
>  <param-value>
>     classpath*:/META-INF/context1.xml,
>     classpath*:/META-INF/context2.xml,
>     classpath*:/META-INF/context3.xml
>  </param-value>
></context-param>

Clay looks at the file prefix and if it begins with "META-INF", the class loader is used;
otherwise, the servlet context is used.  

http://svn.apache.org/viewcvs.cgi/struts/shale/trunk/clay-plugin/src/java/org/apache/shale/clay/config/beans/ComponentConfigBean.java?view=markup

getConfigDefinitions(String configFiles)
 
> 
> 
> If clay already supports something like this then great. But if not 
> then can I suggest we support Spring's convention or some other known 
> convention if it exists. 

I like the notation "classpath:" because you would be able to load from any package.  Please
write this one up as a bugzilla ticket (http://issues.apache.org/bugzilla/enter_bug.cgi).

> 
> Thanks, 
> Ryan

I'd love to hear how you are using Shale/Clay and your experiences sometime when you have
a chance :-).

Gary
 
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message