SourceForge.net Logo
Main Overview Wiki Issues Forum Build Fisheye

Welcome, Guest
Guest Settings
Help

Compass Support Forums » Compass » Compass Users

Thread: Making config changes after initialization

This question is answered.


Permlink Replies: 27 - Pages: 2 [ 1 2 | Next ] - Last Post: Dec 3, 2011 4:20 AM Last Post By: longchamp
Ivan

Posts: 39
Registered: 3/10/08
Making config changes after initialization
Posted: Apr 7, 2008 4:33 PM
 
  Click to reply to this thread Reply
I am using compass in a spring application. Unfortunately, the filesystem directory is specified in JNDI, and the compass.engine.connection setting can only be set to CDATA in the spring config file. Is it possible to change the search directory after the bean has been set?

I have been trying in the following three ways:

    public void afterPropertiesSet() throws Exception {
 
        // compass directory does not support beans, just strings
        if (directory instanceof FSDirectory) {
            File fsDir = ((FSDirectory)directory).getFile();
            String path = fsDir.getAbsolutePath();
 
            // method 1 - simply change the setting
            compass.getSettings().setSetting(CompassEnvironment.CONNECTION, path);
 
            // method 2 - clone compass (using method 1 call as well)
            compass = compass.clone(compass.getSettings());
 
            // method 3- create a new config and rebuild compass
            CompassConfiguration conf =
                CompassConfigurationFactory.newConfiguration();
 
            CompassSettings settings = compass.getSettings();
            Collection keys = settings.keySet();
            for (Object key: keys) {
                String value = settings.getSetting((String)key);
                conf.setSetting((String)key, value);
            }
            conf.setSetting(CompassEnvironment.CONNECTION, path);
 
            compass = conf.buildCompass();
        }
    }


Method 1 and 2 do not change anything. Method 3 results in an alias mapping cannot be found error. What is the proper way to change the directory setting?
Shay Banon

Posts: 4,028
Registered: 9/6/05
Re: Making config changes after initialization
Posted: Apr 8, 2008 2:16 AM   in response to: Ivan in response to: Ivan
Correct
  Click to reply to this thread Reply
You can simply extend the LocalCompassBean and add your own settings based on the logic below before the Compass instance gets created.
Ivan

Posts: 39
Registered: 3/10/08
Re: Making config changes after initialization
Posted: Apr 8, 2008 10:16 AM   in response to: Shay Banon in response to: Shay Banon
 
  Click to reply to this thread Reply
Thanks for the help. I assumed LocalCompassBean wasn't extendable because the config is marked as private, but luckily all I need is setConnection().

Can one simply set a connection property directly into the bean instead of a prop of the settings?
Shay Banon

Posts: 4,028
Registered: 9/6/05
Re: Making config changes after initialization
Posted: Apr 8, 2008 2:18 PM   in response to: Ivan in response to: Ivan
 
  Click to reply to this thread Reply
You must use settings in order to inject the settings.
Ivan

Posts: 39
Registered: 3/10/08
Re: Making config changes after initialization
Posted: Apr 9, 2008 10:04 AM   in response to: Ivan in response to: Ivan
 
  Click to reply to this thread Reply
Let me just reply to my own message if someone finds this thread during a search. What I failed to see while reading the API, was that LocalCompassBean has a injectable configuration post processor (LocalCompassBeanPostProcessor). More effective than subclassing LocalCompassBean. The config object is private, but is accessible to the postprocessor.
discount oakley...

Posts: 35
Registered: 8/20/11
Re: Making config changes after initialization
Posted: Aug 20, 2011 4:18 AM   in response to: Ivan in response to: Ivan
 
  Click to reply to this thread Reply
oakley sunglasses is one of the leading sports performance brands in the world. The holder of over 500 patents, discount oakley sunglasses is continually seeking problems, solving them with inventions and wrapping those inventions in art. This philosophy has made oakley sunglasses discount one of the most iconic and inimitable brand on the market and in turn made oakley frogskins some of the most sought after.welcome to our oakley sunglasses outlet. with big discount ,all oakley holbrook in lowest price.
louisvuittonbox

Posts: 411
Registered: 8/23/11
Re: Making config changes after initialization
Posted: Aug 23, 2011 9:35 PM   in response to: Ivan in response to: Ivan
 
  Click to reply to this thread Reply
Welcome to louis vuitton online! Here at our online shop, we enable you to select as many styles louis vuitton bags as you can at greatly discounted prices. Established in 2006, We have already landed so many returning customers from louis vuitton outlet. We have been known for the authentic quality of our items,such as louis vuitton belts and louis vuitton purses unsurpassed customer service, rapid delivery, unique prices and so on and so forth. What we did, are doing and will do is only to make our esteemed customers consume those world-renowned luxury designer merchandise with peace of mind. So we sincerely hope that you could be our next returning customer. We are confident that you will be quite satisfied with everything we offer here. Wish you a very good shopping louis vuitton store!
louisvuittonbox

Posts: 411
Registered: 8/23/11
Re: Making config changes after initialization
Posted: Aug 23, 2011 10:00 PM   in response to: Ivan in response to: Ivan
 
  Click to reply to this thread Reply
Sports brand Nike (Nike) has announced the new 2010 summer footwear, including the nike air max, Tennis Classic, and Air Max 90 Current Torch three groups. nike shox which are yellow, orange, and blue color, with some bright colors there is a refreshing feeling. Tennis Classic with a white and green color, low-cut shoes suitable for summer wear. And with the nike air jordan of the latest technology Torch nike shoes uk Current Torch shoes are hit with the classic black and white color with the toe position with the Torch materials, mining forefoot nike air max 2011 Free technology coupled with the classic appearance , reflecting the retro and technology integration.
factoryoutlet

Posts: 523
Registered: 10/5/11
louis vuitton outlet
Posted: Oct 5, 2011 8:25 PM   in response to: Ivan in response to: Ivan
 
  Click to reply to this thread Reply

louis vuitton outlet leads you to bags collection of wide, such as LV bags and LV handbag etc. They are main name in luxury and style. It is excellent quality, fine Italian technology and extraordinary beauty.LV is universally renowned as a luxury brand. louis vuitton online store offers customers the newest fashion collections which can make you different.

In the past, Louis Vuitton only emphasis on classic, but in recent year, Louis Vuitton change its strategy and style to acquire new breakthrough. Especially louis vuitton bags like Louis Vuitton Vernis Wallet.Want to become more charming and faddish? Go to visit louis vuitton outlet webpage and select the most suitable products for yourself.

Want to become more charming and faddish? Go to visit louis vuitton outlet webpage and select the most suitable products for yourself.louis vuitton outlet online may often be the consideration alternative inside of your event to get these kinds of bags.Is without a doubt louis vuitton online seriously is present? Is it possible to offer an outlet designed for Louis Vuitton merchandise speaks out?

The choices are likely to be basically countless seeing that louis vuitton outlet occurs with the help of completely new and also incredible concepts once in a while.Mainly because mentioned before, you could buy in the louis vuitton online, via the producer's the web outlet. Owning worn it in past times. They can supply a appropriate evaluate for the property's simplicity as well as client service description.louis vuitton outlet online is the method to show the confidence of our handbags. The person who show himself in front of other people is a confident one.

LV bags in the louis vuitton outlet are a feminine update on an urban classic. With plenty of room for all of your essentials this covetable carryall will take you through the weekend in style.LV is universally renowned as a luxury brand. louis vuitton online store offers customers the newest fashion collections which can make you different.

This collection focus more on color selection compared with other LV handbags. Cute and sunshine design style increases its charm. louis vuitton outlet online provides you the very famous luxury worldwide brand.We are glad you come to join in our louis vuitton outlet online store, because the winter is upcoming now, Louis Vuitton released many new handbags to feedback our customers.Just come to visit once the louis vuitton online, you will fall in love with its fancy bags, purses, sunglasses, shoes and so on.

factoryoutlet

Posts: 523
Registered: 10/5/11
coach factory outlet
Posted: Oct 5, 2011 8:28 PM   in response to: Ivan in response to: Ivan
 
  Click to reply to this thread Reply

coach factory outlet offer excellent, elegant coach products in order to generate room for your new collections.They're purchased more quickly that you may at any time imagine.coach factory store is the greatest destination to buy what type of bags you like. If you need to manage a new Coach carrier and most preferable strategy is to the coach regarding coupon codes.Here's your new way to look sophisticated styles. Carry the hot coach factory outlet store of this summer and be the true trendsetter!in the market you definitely can find various colorways that are designed in as well as the high quality that applied in. For most of you would like to come. So just come to our coach factory outlet online store to choose one.

coach factory outlet is really sizzling kinds of shopping way for you. With the usage of the replica designer coach bags, you can surely be able to change your individual looks in a stunning manner.You know, Coach items are so perfect and fascinating. Now I grow up, and find coach outlet on the Internet offering affordable products with reliable quality.Many fashionable women match with practical Coach Purses which will make the street shopping become relaxed,and make every person can enjoy more diversiform combination in coach factory outlet online.The coach factory outlet store are utilized for formal event in company area that will display your excellent taste.Not only does a briefcase make is easier to carry things.

Almost everyone has identified effectively about this, below, among the best to make sure you will get much more information about coach outlet.In the coach outlet online shop, a collection of high quality and hottest Coach Shoulder Bags is offered to you. They are all at the best prices you will ever find.

You know, Coach items are so perfect and fascinating. Now I grow up, and find coach outlet on the Internet offering affordable products with reliable quality.Once visit, you will be unable to restrain loving it. Warmly welcome all of you to the Summer Sales Promotion on coach factory outlet.coach factory outlet has new coach laptop bags in listing. No matter which style do you want, we can provide it for you.Coach bags enjoy high popularity throughout the world. I would like to share the coach factory outlet online with you. What are you waiting for? Just come to visit.

coach factory outlet supplies the newest and most fashionable brand Coach on sale.The more Coach shoulder bags you order, the more discount you will get.It's wonderful to find out it does not slip in your signature at the bottom of the case and the appearance of brass accents from coach outlet online, Because women who can look stylish this summer.coach outlet has a zippered closure and buckles for extra security. Shiny brass hardware, rounded leather handle, and an interior pocket. It also includes a limited edition Hawaii luggage tag and lock.You can find all kinds of coach bags whatever you chose which one in coach factory outlet online will never be out of fashion. Not only they have many nice and design styles, but also made from the finest leather and fabric.

With the great diversity of styles, patterns and sizes available nowadays, finding the right pieces to highlight your personality is quite important. coach outlet offers exactly what you want.coach factory outlet supplies the newest and most fashionable brand Coach on sale.The more Coach shoulder bags you order, the more discount you will get.Look at this golden Coach bag in the? coach factory outlet online.Those new bags with classic and fashionable design are more and more popular now!After graduating from university, my cousin came back to my hometown from USA last month. She told me that coach outlet store is very popular among her classmate.

coach outlet online own a couple of line, color, or the selected theme, it should be a good choice. It may be the place where offer the bag ladies handbag, you will be able to follow a course of education or training receives for the slim project chest strap wallet.coach outlet will send you a coupon in the post to use in their upon only after you type a achieve. The Coach bags are customarily somewhat many than the ones in the stores.In particular, products from coach factory outlet with leather design are fashionable, handmade,leading the wave of American pop.It with simple,durable and unique style to win consumers.coach factory not only supply with the highest quality crystal at reasonable price but also provide good after-sales service. Companies operating purposes: science and technology in order to survive, credibility and development, strict quality control.

coach outlet handbags's special design and fashion is certainly and so eye-catching, I hope you are able to get much more attention towards the Cheap Coach Crossbody.As long as you open our coach factory outlet webpage, you will view various Coach New Arrivals which are the most popular also the most fashionable in this year.Are you anxious to choose some of the brand bags? Are you searching for reliable sellers? When you come to the coach factory outlet online, these are not problems.

At the coach outlet online you have the largest selection of the day. If you touch the item and like it, keep it in your possession until you make your final decision.Over the years, coach factory online has added a multitude of new handbag shapes, styles and materials to their collection. However, the highest care is taken that every Coach handbags is both aesthetically beautiful and functional.Are you searching for a cool and stylish coach bag? The coach factory outlet online Online is your first priority.

eemm

Posts: 68
Registered: 10/31/11
Re: Making config changes after initialization
Posted: Oct 31, 2011 9:13 PM   in response to: Ivan in response to: Ivan
 
  Click to reply to this thread Reply
[url=http://www.coachoutletonlinefactory.org/][b]Coach Outlet Online[/b][/url] offer different kinds of [url=http://www.coachoutlet-purse.org/][b]coach handbags outlet[/b][/url]. Another very important item details from [url=http://www.hot-louisvuittonoutlet.com/][b]Louis Vuitton Outlet Online[/b][/url], I bet you won't have identified feasible fact of [url=http://www.coachfactorystore-s.com/][b]coach outlet online[/b][/url] are possibly one of the most option and look for to pursue handbags. [url=http://www.coach-factory-onlines.com/][b]Coach Factory Online Store[/b][/url] updates quicker with very good good quality with entire [url=http://www.womancoachoutlet.net/][b]Coach Outlet Online[/b][/url] at exact value but you can only purchase [url=http://www.saledunkshoe.com/][b]nike dunk[/b][/url] or gucci canvas bag so [url=http://www.coachoutletstoresonlines.net/][b]Coach outlet online store[/b][/url] progressively preferred in current years, nearly started to be a ordinary [url=http://www.coachoutletonlinepurses.com/][b]Cheap Coach Purses[/b][/url]. Choose [url=http://www.coach-factorys.com/][b]Coach Factory Outlet Store[/b][/url], it will allow you on this summer time awesome self-confidence. Seemingly [url=http://www.northfaceoutlet-jacket.com/][b]North Face Outlet[/b][/url] little visual appeal however the fundamental merchandise could be total accommodate. American stylish pioneer manufacturer new [url=http://www.allcoachoutlet.net/][b]Coach Purses Outlet[/b][/url] presented the girl stylist in spring 2010. [url=http://www.louisvuittonpurse-outlets.com/][b]Louis Vuitton Bags Outlet[/b][/url] little shoulder bag are also stylish and grave [url=http://www.coach-factoryoutlets.com/][b]Coach Outlet[/b][/url]. We perform with each other with stylish component to overturn everything. Buying cheap coach purses from [url=http://www.canada-coach-outlets.com/][b]Coach Outlet Online[/b][/url] substance is completely gauzy and most palpable of which top [url=http://www.usguccishoes.org/][b]cheap gucci handbags[/b][/url] designer to go with. Welcome order on our [url=http://www.coachfactoryoutlet-s.com/][b]Coach Factory Outlet[/b][/url]! You can always find a luxury Coach Shoulder Bags that can catch your heart, you will have the surprise when you place the order! Go head!
eemm

Posts: 68
Registered: 10/31/11
Re: Making config changes after initialization
Posted: Oct 31, 2011 9:13 PM   in response to: Ivan in response to: Ivan
 
  Click to reply to this thread Reply
Coach Outlet Online offer different kinds of coach handbags outlet. Another very important item details from Louis Vuitton Outlet Online, I bet you won't have identified feasible fact of coach outlet online are possibly one of the most option and look for to pursue handbags. Coach Factory Online Store updates quicker with very good good quality with entire Coach Outlet Online at exact value but you can only purchase nike dunk or gucci canvas bag so Coach outlet online store progressively preferred in current years, nearly started to be a ordinary Cheap Coach Purses. Choose Coach Factory Outlet Store, it will allow you on this summer time awesome self-confidence. Seemingly North Face Outlet little visual appeal however the fundamental merchandise could be total accommodate. American stylish pioneer manufacturer new Coach Purses Outlet presented the girl stylist in spring 2010. Louis Vuitton Bags Outlet little shoulder bag are also stylish and grave Coach Outlet. We perform with each other with stylish component to overturn everything. Buying cheap coach purses from Coach Outlet Online substance is completely gauzy and most palpable of which top cheap gucci handbags designer to go with. Welcome order on our Coach Factory Outlet! You can always find a luxury Coach Shoulder Bags that can catch your heart, you will have the surprise when you place the order! Go head!
xiaopy

Posts: 95
Registered: 11/4/11
Re: Making config changes after initialization
Posted: Nov 4, 2011 9:10 PM   in response to: Ivan in response to: Ivan
 
  Click to reply to this thread Reply

In affiliation to fashionable style,Louis Vuitton Outlet about annihilation may adversary the absolute aberration from the Louis Vuitton wallet, Louis Vuitton budget, or even Louis Vuitton hues. Diehard cast loyalists anticipate next to annihilation associated with giving aural the absolute bacon artlessly for just a little handbag.
Louis Vuitton Outlet Store Aperture Abundance Some of the planet’s the majority of notable superstars, music artists, in accession to versions will generally be taken photos associated with affective about the a lot of contempo Louis Vuitton layouts. louis vuitton electric abundance online shop. Accordingly what is the absolute afflatus in affiliation to this array of preferred? Exactly why is Louis Vuitton purses accordingly abundant bigger than added handbags?
To activate with, the absolute architecture home is in fact ashore central a longer, quality-driven background. Because it’s alpha aural 1821, the business may be bearing a few of the sector’s best customized baggage items forth with handbags. Louis Vuitton Handbags Outlet themselves 1st began alive from the bound boutique central London, Portugal.

xiaopy

Posts: 95
Registered: 11/4/11
Re: Making config changes after initialization
Posted: Nov 4, 2011 9:15 PM   in response to: Ivan in response to: Ivan
 
  Click to reply to this thread Reply
I am very curious Louis Vuitton Outlet because a close buddy Louis Vuitton outlet locations on mine louis vuitton outlet online explained Louis Vuitton outlet that louis vuitton outlet store her cousin works in Louis Vuitton uk a Louis louis vuitton outlet Vuitton factory Louis Vuitton Wallet positioned in California, Louis Vuitton outlet stores and Louis Vuitton Outlet her Louis Vuitton Belt cousin Louis Vuitton Luggage get’s her genuinely excellent discount Louis Vuitton uk on them, louis Vuitton and they are genuine!!, I am not positive if Louis vuitton replica she’s telling cheap louis vuitton the reality or not. She Louis Vuitton outlet showed Louis vuitton shoes me a handbag that louis vuitton store her cousin supposedly louis vuitton outlet hooked her up on Louis vuitton handbag and louis vuitton outlet it is quality Louis Vuitton purse authentic, louis vuitton sale I can Discount louis vuitton tell due to the fact replica louis vuitton I have cheap louis vuitton authentic Louis vuitton myself, An individual make sure you permit me know!! Related
ying

Posts: 182
Registered: 11/8/11
Re: Making config changes after initialization
Posted: Nov 8, 2011 7:34 PM   in response to: Ivan in response to: Ivan
 
  Click to reply to this thread Reply
The 2nd type of bag user is certainly one that alternates between two or more totes. This switching process has to do with color, size bag, and also function for which the bag is being applied to that particular morning. This lady may be equally as tough to be with her handbags since the user within the first category, but they keep going longer because her?Coach Outlet Online get breaks involving usage. Another type of purse user features a collection. The girl Burberry Beat Check Tote are employed very intermittently using much the same criteria as the user inside category a pair of, but mood also performs a role. She’s got enough practical and great looking Coach Handbags Beat Check Tote that they can make a choice based on your ex mood for the entire day. Her luggage last eternally and she tends to take good care of them between trips Coach Outlet Store..
Legend
Guru: 2001 + pts
Expert: 501 - 2000 pts
Super-star: 101 - 500 pts
Assistant: 51 - 100 pts
Participant: 0 - 50 pts
Helpful Answer (5 pts)
Correct Answer (10 pts)

Point your RSS reader here for a feed of the latest messages in all forums