---
schema_version: "1"
id: f58027918e9092d24bbc80b0b4b2b049c76acf0c03fafbdb48ddd1b04e66feda
title: Mule Services Injection
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/mule-sdk/latest/mule-service-injection.md
canonical_url: https://docs.mulesoft.com/mule-sdk/latest/mule-service-injection
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 15a2cc5891471c4ce3ad7499c52e9b566009ef16427caded20d9edfadb7b15fc
description: MuleSoft Documentation Site
release: "1.13"
latest: true
---
---
product: Mule SDK
version: 1.13
is-latest-version: true
keywords: mule, sdk, dependency, inject, registry, service
---

# Mule Services Injection

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

## Using Mule Services

When implementing your module, you might need to use some of the services that Mule provides.
Examples of these services include `ObjectStoreManager`, `LockFactory`, and `HttpService`.

To achieve this, there is no need to get them from the registry of the `MuleContext`. You can simply
inject them into your component (such as an operation, source, or configuration) through the
`@Inject` annotation.

Here is a simplified example that injects a service from the registry into a component:

Example: Using the @Inject Annotation

```java
public class ObjectStoreOperations {
// ...
  @Inject
  private ObjectStoreManager runtimeObjectStoreManager;
// ...
  @Throws(StoreErrorTypeProvider.class)
  public void store(String key,
                  @Content TypedValue<Serializable> value,
                  @Optional @ParameterDsl(allowInlineDefinition = false) ObjectStore objectStore) {
    ObjectStore os = objectStore == null ? runtimeObjectStoreManager.getDefaultPartition() : objectStore;
    os.store(key, value);
  }
// ...
}
```

Here are some common Mule services:

- `LockFactory`: All Mule components that require synchronization to access shared data must be
  synchronized using locks from the default implementation of this interface. For more information
  regarding `LockFactory`, refer to
  [Distributed Locking](https://docs.mulesoft.com/mule-runtime/4.4/distributed-locking).

- `ExpressionManager`: Provides universal access for evaluating expressions embedded in Mule
  configurations, such as XML, Java, scripting, and annotations.

- `TransformationService`: Service that tries to transform a value into another given type.

- `HttpService`: Provides both HTTP server and client implementations. Whenever using an HTTP
  connection on your connector, you should try to use this service.

- `SchedulerService`: Provides access to the different schedulers and thread pools that exist in the
  Mule runtime, allowing you to schedule tasks on those.

- `SoapService`: Service that creates SOAP clients to consume SOAP services.

- `ObjectStoreManager`: Manager in charge of creation and management of `ObjectStore` instances.
