[jboss-dev] jboss-beans.xml versus spring-beans.xml

David M. Lloyd david.lloyd at redhat.com
Fri Aug 1 10:22:43 EDT 2008


On 07/29/2008 07:40 AM, Adrian Brock wrote:
> On Tue, 2008-07-29 at 07:37 -0500, David M. Lloyd wrote:
>> On 07/29/2008 04:17 AM, Adrian Brock wrote:
>>> Since a number of users are complaining about us
>>> trying to process WEB-INF/spring-beans.xml
>>> as an MC -beans.xml file, even though
>>> spring-beans.xml should be in WEB-INF/classes
>>> I'm going to go through and change all our
>>> -beans.xml files to end with -jboss-beans.xml
>> Does the file name matcher not use a longest-match kind of rule?  If not, 
>> perhaps it should...  Intuitively this seems like the wrong move to me, but 
>> I admit I'm not really sure why it seems that way.
> 
> The matching logic is in AbstractParsingDeployer.
> Currently it is very simple - suffix matching, if you want to contribute
> some more rules that's the place to do it.

AbstractParsingDeployerWithOutput is the "highest" class with a suffix 
property on it.  Searching for uses reveals that there really is no one 
place where the matching logic is implemented. 
AbstractVFSParsingDeployer's isDeployable(VirtualFile) method checks the 
suffix and just returns a boolean, so presumably there's something that 
scans through, looking for the first one that matches...

Looks like the logic is actually in FileStructure... though it doesn't work 
how I expected.  There's a checkFileMatchers() method that returns true if 
*some* file matcher matches, though it doesn't say which one.  Find usages 
on that method reveals a dead end.  I must be barking up the wrong tree?

Ah well, I'm defeated for now.  Too much other stuff to do.  If anyone else 
wants to tackle this, I think it's worth doing, but beyond my capabilities 
for the time being.

- DML



More information about the jboss-development mailing list