Starting Shark

xiaoxiao2021-03-06  110

Starting Shark

Shark can be started through a client application, first of all, configure (support three different styles), get a Shark instance. Here is the most common way:

String conffilepath = "shark.conf";

Shark.configure (confiLEPATH);

Shark Shark = Shark.getInstance ();

If you want to use Shark's CORBA interface, first you have to launch a CORBA service (via run script) so you can access (Boot management services through the Runa) via Shark's CORBA API. After the service is started through the RUN, the server will automatically start on the machine.

Configuring Shark

Here is a few different Shark configuration methods:

1. Use the non-parametric configure () method:

SHARK is configured through the configuration file in the JAR file, this configuration, Shark runs by default, without a lot of internal API tools (cache, verification, user groups).

2. Using configure (filepath) method

Create through a given configuration file path

3. Use configure (file configfile)

Shark first uses the properties given in the JAR file, and additional configuration is implemented through a specific file. If there is the same property in the configuration file, the default JAR configuration will override the default properties, plus additional configuration properties, will be applied to the Shark configuration. The profile you are incorporated does not need to define all configuration items, but you can redefine the default configuration parameters (such as EngineName, ObjectFactoryClassName, etc.) and additional configuration information.

4. Using Configure (Properties Props)

In fact, as the previous method is the basic functionality (in fact, it is a Properties object that turns the protocol of the previous method into the Properties object), which provides a client that uses the Properties object for Shark configuration.

You can use different configurations to instantiate Shark. If you want to use multiple SHARK instances from the same database (from multiple VMs), you usually need to use different "EngineName" configuration properties (also, if you use multiple VMs, all configurations must be overloaded the DODS cache space value ( Must be set to 0), the cacheManagerclassName property should not exist). This is because the process is executed synchronously. If a VM executes a process operation, the process will be locked by this Shark instance, so it cannot be used by other VM until the process completes its work.

Shark is a well-configurable engine with all components, including Kernel, can customize definitions.

转载请注明原文地址:https://www.9cbs.com/read-97432.html

New Post(0)