Coherence config default override path

1.5k views Asked by At

I've already spent more than 2 days trying to make this work without any result. The server is WebLogic 12c with embedded Coherence server. It is important to mention that I do not run Coherence in standalone mode, instead it starts automatically alongside the application server that has access to Coherence via JNDI context. I am trying to implement POF serialization approach using PortableObject interface to serialize certain objects I save in Coherence. I've also created the corresponding pof-config.xml registering the objects I'm planning to serialize. The only problem is: How do I add the override to the coherence class path?

According to http://docs.oracle.com/cd/E24290_01/coh.371/e22837/gs_config.htm#COHDG5014 I can use the following system property:

java -Dtangosol.pof.config=MyPOF.xml -cp COHERENCE_HOME;COHERENCE_HOME\lib\coherence.jar com.tangosol.net.DefaultCacheServer

The only problem here is that I have no idea which sh/cmd file to edit, since all edits I made to the files in Oracle_Home\coherence\bin\ had no effect.

Also the same article says that there is a way to confirm the pof-config override:

The output for a Coherence node indicates the location and name of the POF configuration deployment descriptors that are loaded at startup. The configuration messages are among the messages that display after the Coherence copyright text is emitted and are associated with the cache service that is configured to use POF. The output is especially helpful when developing and testing Coherence applications and solutions.

Loading POF configuration from resource "file:/D:/coherence/my-pof-config.xml"

But I couldn't find any of the mentioned lines in the logs produced by the server instance.

Any ideas?

1

There are 1 answers

3
Display Name is missing On

Instead of editing files inside of your Oracle_Home, try the following inside of the weblogic admin console:

  • Login to admin console
  • Servers link -> Server Name
  • Click the Server Start tab
  • Edit the Arguments: text box and add in -Dtangosol.pof.config=MyPOF.xml
    • You can also change the classpath, Class Path: box, here if you need to

Every time your server starts it should have that property. If you are not using the nodemanager to start your server, you should do the following instead. Keep in mind this will change the properties for every server in your weblogic domain:

  • Navigate to your <domain home>/bin directory
  • Edit startWebLogic.sh/cmd
  • Edit the JAVA_OPTIONS= line and add in -Dtangosol.pof.config=MyPOF.xml
    • You can also change the classpath CLASSPATH= here if you need to