-
1. Re: components scan in different projects
lvdberg Oct 27, 2009 8:20 PM (in response to vdeminico)Hi Valerio,
You can make this work, however you need to be aware of a number of restrictions. The jar file with the annotated beans should be
visible
for the war-file, meaning you need to have it also in the deploy directory. Furthermore the jar needs to have amarker-file
such as an empty seam.properties so Seam will scan through the jar. Finally the War must be loaded AFTER the jar. This gives problems in some Appservers, but it works fine nder Jboss 5.1Leo
-
2. Re: components scan in different projects
vdeminico Oct 28, 2009 5:37 PM (in response to vdeminico)Ok, it works fine also with Tomcat 6.
Thanks,
Valerio -
3. Re: components scan in different projects
clay.clay.ratliff.bsgclearing.com May 17, 2010 6:15 PM (in response to vdeminico)Is it necessary to include a components.xml file in the external jar? I have a similar issue where the classes aren't being loaded from an external jar file that we're using as a common library for several projects. It has a seams.properties file, it is loaded before the war file but the annotated classes it contains are never being brought into seam.
Any ideas?
Clay
-
4. Re: components scan in different projects
vdeminico May 17, 2010 6:25 PM (in response to vdeminico)No, components.xml is not necessary... I only put a seam.properties file into root of jar file and it works. Which is the name of your properties file actually?? I hope it isn't
seams.properties
as you have written above... :D -
5. Re: components scan in different projects
clay.clay.ratliff.bsgclearing.com May 17, 2010 6:41 PM (in response to vdeminico)
valerio de minico wrote on May 17, 2010 18:25:
No, components.xml is not necessary... I only put a seam.properties file into root of jar file and it works.OK, so the only thing needed to be scanned is seam.properties? Then I am at something of a loss. I am expecting to see the components from that file loaded appear in the seam initialization logs either before or with the components from the war file that uses it but there is nothing, even with the logging turned up to debug level.
Which is the name of your properties file actually?? I hope it isn'tseams.properties
as you have written above... :DLOL No, that was a typo, it is, in fact, seam.properties. I even checked. :)
Click HELP for text formatting instructions. Then edit this text and check the preview.
-
6. Re: components scan in different projects
vdeminico May 17, 2010 6:48 PM (in response to vdeminico)Stupid question but... is the jar with required component classes into the WEB-INF/lib directory of your webapp????