SourceForge.net Logo
Main Overview Wiki Issues Forum Build Fisheye
Issue Details (XML | Word | Printable)

Key: CMP-457
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Shay Banon
Reporter: janekk
Votes: 5
Watchers: 5
Operations

If you were logged in you would be able to see more operations.
Compass

Spring and Compass configuration externalization.

Created: 16/Sep/07 06:04 AM   Updated: 17/Sep/09 11:53 AM
Component/s: Compass::Spring
Affects Version/s: None
Fix Version/s: 2.1.0 M3


 Description  « Hide
Compass schema support works with system properties placeholders, but does not work with Spring PropertyPlaceholderConfigurer. Support for Spring PropertyPlaceholderConfigurer would be usefull.

 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Craig Baker added a comment - 16/Oct/07 07:25 AM
This would be great, I wanted to use PropertyPlaceholderConfigurer to set my compass index directory.

James Carman added a comment - 06/Sep/08 08:42 AM
This would be really nice. Is this a limitation of Spring since it's not translating the value before it's passed in? I guess it really can't because you have to process the actual XML (or it could translate the XML first by replacing all property values and then pass the resulting XML to be processed to the schema handlers).

James Carman added a comment - 06/Sep/08 08:45 AM
Apparently, this problem has been around for a while:

http://forum.springframework.org/showthread.php?t=33812


James Carman added a comment - 06/Sep/08 10:16 AM
This will actually work, but it's going to take a lot of refactoring. You'll have to actually build up your bean definitions and add them to the BeanDefinitionBuilder instead of instantiating the beans yourself. The property value will be translated for you by spring if you do it that way.

James Carman added a comment - 07/Sep/08 08:36 AM
Is there a way to hand-code this stuff so that everything works just like with the namespace support? I need to get our project working again and we really want to use PropertyPlaceholderConfigurer. I'm trying to hand-code it, but I'm running into troubles. I have custom analyzers/filters defined in my spring configuration file. I can't use a Compass configuration file because it requires that we set up the connection (at least that's what the XSD document says) and we want to do that in our spring file so that the index directory is obtained via the PropertyPlaceholderConfigurer. Is there a way to just use plain ole Spring to configure everything we need?

statcomp added a comment - 17/Sep/09 11:53 AM
Is this broken in version 2.2.0? I am experiencing exactly this problem using the compass namespace spring configuration.