Skip to content

Example Use Cases

Mads Hansen edited this page Mar 6, 2016 · 8 revisions

While CoRB has many options and is extensible even further, there are two typical uses for CoRB: manipulating data, and generating a report.

As mentioned previously, properties can be set directly on the command line using main method argument positioning, using the –D commandline switch to set a system property for each CoRB property, or by using –DOPTION-FILES to specify a properties file. If the same option is provided in multiple places, the order of precedence goes from class arguments down to system properties, and finally what’s in the properties file. The reason for the different options stems from the desire to support backward compatibility.

With so many ways to set properties, it's not reasonable to have an example in this section for every possibility. Therefore, this wiki provides one example using class arguments, one example using system properties arguments, and the rest using a properties file which could be considered a best practice.

Regardless of which approach is used, it will always be necessary to have the required jars on the classpath when executing CoRB. The first jar necessary is the one that contains CoRB itself which is currently: marklogic-corb-2.2.1.jar. Second, the jar containing MarkLogic’s XCC connection API is necessary which is currently: marklogic-xcc-8.0.4.jar. Finally, if Jasypt encryption is being used, you'll need the jar for it as well as the properties file for Jasypt: jasypt-1.9.2.jar, jasypt.properties.

Clone this wiki locally