-
1. Re: (Still) More flexible structure for components.xml
pmuir Jun 12, 2007 8:34 AM (in response to luizruiz)Sorry, I'm not really sure what you are asking...
You can put components.xml in
WEB-INF/
META-INF/
/any/java/package/
and .component.xml in
/any/java/package/ -
2. Re: (Still) More flexible structure for components.xml
luizruiz Jun 12, 2007 9:04 AM (in response to luizruiz)I think that the components.xml files can be very large with all the components definitions, then I thought separating by ClassName.component.xml. The ClassName.component.xml is only loaded when exists a ClassName class in the package, but the class will be in jar and the archives open will not be loaded.
It would be great if the components loader loaded all the *.components.xml files of the directories that you cited in your reply. Is this is possible? -
3. Re: (Still) More flexible structure for components.xml
gavin.king Jun 12, 2007 12:36 PM (in response to luizruiz)There is an existing request for this in JIRA:
http://jira.jboss.org/jira/browse/JBSEAM-669
It is scheduled to be fixed in 1.3 BETA. -
4. Re: (Still) More flexible structure for components.xml
luizruiz Jun 12, 2007 4:09 PM (in response to luizruiz)Thank you Gavin,
I'm trying to do this with a little modification in Initialization.scanForHotDeployableComponents, adding this code, that load all .component.xml in META-INF from the redeploy classloader:try { URL[] urls = Classpath.search(redeployStrategy.getClassLoader(), "META-INF/", ".component.xml"); for (URL url : urls) { try { log.info("reading " + url); installComponentsFromXmlElements(XML.getRootElement(url .openStream()), getReplacements()); } catch (Exception e) { throw new RuntimeException("error while reading " + url, e); } } } catch (IOException e1) { }
Classpath is a Facelets utility class that I'm using for convenience.