# Configuring the SharedActivation

`SharedActivation` provides system-wide locking capabilities for license activations shared across multiple processes. It wraps a standard `IActivation` instance with additional locking mechanisms.

The `SharedActivation` constructor requires two configuration sections:

1. **Activation Options** - Configures the underlying activation (same as regular `Activation`). How to configure activation documentation is available [here](../the-licensing-client-.net/configuring-the-activation).
2. **Locking Options** - Configures the locking mechanism for cross-process synchronization

```java
ISharedActivation activation = SharedActivation(
                activationOptions -> /* activation configuration */,
                lockingOptions -> /* locking configuration */,
                persistence);
```

### Locking Options

Locking options define how `SharedActivation` coordinates access between multiple processes:

```java
lockingOptions -> {
    // Use system-wide named file lock based on storage location
    lockingOptions.useSystemLock();
    
    // OR use system-wide named file lock based
    lockingOptions.useSystemLock("Global-YourApp-UniqueIdentifier");
    
    // OR use a custom lock implementation
    lockingOptions.useCustomLock(activation -> yourCustomLockFactory);
}
```
