0

We are using Mule Server but this question is generally for all server.

In constructor we have following property named skipindexing.

if (!Boolean.parseBoolean(System.getProperty("skipIndexing"))) {
            //searchIndexer.doIndexing(propertyIndexing, threadsToLoadObjects, threadsForSubsequentFetching);
         }

Every time i need to comment this code to run on server because i do not know how to pass this skipIndexing property on runtime.

Could anyone suggest how to pass this value as false?

fatherazrael
  • 5,511
  • 16
  • 71
  • 155

2 Answers2

1

Set property in mule/conf/wrapper.conf

Nirmal- thInk beYond
  • 11,847
  • 8
  • 35
  • 46
0

I am not sure what you mean by pass it to server, but setting that system property "skipIndex" could be set on the command line of your app by adding it with the -D flag as

java -DskipIndexing=true -jar ....

HTH, Gal

Gal Nitzan
  • 391
  • 2
  • 12
  • Like Mule start or stop is done like "mule start" then should it be done like mule start -DskipIndexing=true or tomcat startup.bat -DskipIndexing=false ? – fatherazrael Feb 21 '18 at 12:21
  • I am not familiar with mule, if mule is a .bat file than you might want to check that file, it might have the java command in it? if it runs under tomcat's startup.bat than you could add the -D inside the startup.bat – Gal Nitzan Feb 21 '18 at 17:17