[jbossseam-issues] [JBoss JIRA] Commented: (JBSEAM-669) Scanner and components.xml inside packages

Luiz Augusto Ruiz (JIRA) jira-events at lists.jboss.org
Fri Jun 15 18:07:11 EDT 2007


    [ http://jira.jboss.com/jira/browse/JBSEAM-669?page=comments#action_12365651 ] 
            
Luiz Augusto Ruiz commented on JBSEAM-669:
------------------------------------------

Suggestion: 
To be able to indicate through some init param, or something similar, a directory that would be scanned in the search for ClassName.component.xml, to give more granularity to the components definitions in projects with strong XML orientation

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:
Code:

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.

> Scanner and components.xml inside packages
> ------------------------------------------
>
>                 Key: JBSEAM-669
>                 URL: http://jira.jboss.com/jira/browse/JBSEAM-669
>             Project: JBoss Seam
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.1.1.GA
>            Reporter: Pete Muir
>         Assigned To: Norman Richards
>             Fix For: 1.3.0.BETA1
>
>
> If you put a components.xml inside a package which has no classes which are seam components inside it then it is not picked up by the scanner.
> This is because Initialization.installScannedClass attempts to install from the components.xml file for that package BUT for the flow to get to installScannedClass at least one of the classes in the package must be a seam component.

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

        



More information about the seam-issues mailing list