# cConfig

Sets the CamelContext using Java code.

## cConfig Standard properties

These properties are used to configure cConfig running in the Standard Job framework.

The Standard cConfig component belongs to the Custom family.

## Basic settings

| Properties | Description |
| --- | --- |
| Code | Type in the Java code you want to implement. |

## Advanced settings

| Properties | Description |
| --- | --- |
| Use MDC Logging | Select this check box to enable the use of MDC logging.<br><br>To be able to use this option, you need to open the Log4j view in the Project<br>Settings dialog box by clicking File &gt; Edit Project Properties on the toolbar of the Talend Studio main window. Select the Activate log4j in<br>components check box to activate the log4j feature. Then change<br>the ConversionPattern in the log4j template to<br>add your custom MDC property like %X{mdcPropertyName}.<br><br>To show the MDC information in the log, use the cLog component and a cProcessor before and after the cLog. In the cProcessor before the cLog, enter the code org.apache.log4j.MDC.put("Key", "Value"); to add the custom property. In the cProcessor after the cLog, enter the code org.apache.log4j.MDC.remove("Key"); to remove the MDC property.<br><br>For more information about how to activate Log4j in components<br>and how to customize Log4j configuration, see [Activating and configuring Log4j](https://help.qlik.com/talend/r/en-US/8.0/studio-user-guide/studio-configure-log4j) in<br>the Talend Studio User Guide.<br><br>For more information about MDC logging, see the website http://camel.apache.org/mdc-logging.html.<br><br>For more information about the cLog component, see [cLog](https://help.qlik.com/talend/en-US/components/8.0/mediation-logs-and-errors/clog). |
| Imports | Enter the Java code that helps to import, if necessary, external<br>libraries used in the Code box. |
| Dependencies | Click [+] to add the library or libraries that are<br>required by the CamelContext or Typeconverter Registry to Talend Studio.<br><br>Click [...] in the Lib Path field<br>to show the Module dialog box. For more information, see<br>the tLibraryLoad component.<br><br>Information noteNote: It is recommended to<br>use the camel-activemq-alldep jar instead of activemq-all jar to work with<br>Apache ActiveMQ. |
| Check | Click this button to check the version of the libraries that are added to the<br>Route in the Talend Artifact Repository. The libraries are listed in the table below, with the versions shown in the<br>Update To column. If the version of the local library<br>is the same as in the Talend Artifact Repository, a √ is shown in the Status<br>column. If the version of the local library is older than in the Talend Artifact Repository, a × is shown in the Status<br>column, and the check box in the Sync column is selected<br>by default. |
| Sync | Select the check box in the Sync column of the table for<br>the libraries that you want to update and click the Sync<br>button to download and install the newer version from the Talend Artifact Repository into Talend Studio. |

## Usage

| Usage guidance | Description |
| --- | --- |
| **Usage rule** | cConfig cannot be added directly in a Route. |
| Limitation | n/a |

**Related concepts**

* [Implementing a dataset from the Registry](https://help.qlik.com/talend/en-US/mediation-components/8.0/mediation-camelcontext/cconfig-cmessagingendpoint-cprocessor-cprocessor-implementing-dataset-from-registry)