Utilising the Cache Configuration Document Program Property
Having fun with a default Cache Setting Document
Coherence try designed away-of-box to utilize the initial coherence-cache-config.xml file that is found on the classpath. To make use of an excellent coherence-cache-config.xml file, brand new file have to be located on the classpath and may predate Siperian naiset treffit the newest coherence.jar library; otherwise, the newest shot coherence-cache-config.xml document that’s found in the coherence.jar would-be utilized.
Build a copy of take to coherence-cache-config.xml file which is found in the coherence.container and you may save they to some other location. This new cache definitions which might be as part of the try file was to have trial intentions and really should be used just like the a starting point to own performing solution-particular cache setup.
Make certain that the spot that the coherence-cache-config.xml document was saved is in the classpath on runtime and you may that the area precedes the coherence.jar document in the classpath.
Another example reveals undertaking a good cache machine that utilizes a beneficial coherence-cache-config.xml cache configuration file that is located in COHERENCE_Household .
Overriding the fresh new Standard Cache Configuration Document
The default title and you can located area of the cache configuration deployment descriptor is specified in the functional implementation descriptor for the feature. This element can be overridden to identify yet another identity an location to be studied into standard cache setting file.
Generate a duplicate of the default coherence-cache-config.xml cache configuration document which is found in the coherence.container and you can save they to help you a place that have another type of identity.
Edit this new working override document and you will get into a good node you to determine the name of the cache setup file created in step one. In the event the cache setup file is not located in the classpath, go into the complete (or cousin) way to the latest file too. The fresh new feature and additionally helps the usage a Url whenever specifying the location away from a cache arrangement document.
The second example shows carrying out a cache host playing with a working override document and you may a customized cache setup file that will be found in the COHERENCE_Domestic .
New tangosol.coherence.cacheconfig system property is always indicate a personalized cache setting implementation descriptor for usage as opposed to the designed standard cache setting deployment descriptor. The device possessions brings ways to button between more setup which is smoother during the creativity and testing.
So you can establish a personalized cache arrangement document, enter the identity of file while the a worth of the newest tangosol.coherence.cacheconfig program property. This is certainly generally complete while the a great -D Java choice whenever carrying out an excellent Coherence node. If your document is not found in the classpath, go into the full (otherwise cousin) path to the brand new document together with name. The device property and helps the effective use of good Hyperlink whenever indicating the spot away from an excellent cache arrangement file.
The second example begins an effective cache host and you will specifies an effective cache arrangement deployment descriptor named MyConfig.xml which is situated in COHERENCE_House .
Watching And that Cache Setting Document are Stacked
New returns to have an effective Coherence node means the spot and you can label of one’s cache arrangement implementation descriptor that is stacked at the business. The setting message ‘s the very first content to demonstrate following Coherence copyright laws text are produced. This new yields is very useful whenever developing and you may assessment Coherence apps and you will solutions.
Next example efficiency reveals a cache configuration content and this ways one a great cache setup implementation descriptor titled Myconfig.xml is actually stacked:
Indicating a beneficial POF Setup File
The brand new pof-config.xml POF setup deployment descriptor file is employed in order to identify personalized affiliate versions when using Mobile phone Object Style (POF) having serialization. On work on time, Coherence spends the initial exemplory instance of pof-config.xml that’s based in the classpath.
A good POF setup deployment descriptor is only loaded in case your POF serializer try either designed within a good cache system or designed in the world for everyone cache systems. The fresh standard coherence-cache-config.xml provides a good example cache design one represent this new POF serializer, but it’s said out by default.
Theo Healthplus.vn
Chưa có bình luận