DigitalBuzz Logo
MuleSoft

Wanna Create Shared Resources To Reuse – Use The Steps To Create Domain Project

Soma Mitra
Posted By
Soma Mitra
Technical Guide
5 min read
Wanna Create Shared Resources To Reuse – Use The Steps To Create Domain Project
Mule Domain Project Architecture Overview
Figure 1: Mule Domain Project architectural overview

Domain Project is used to create shared resources which can reuse across other projects who are referring to domain projects.

Below are the following steps how to create domain project in mule 4 -

1Create the domain project in anypoint studio. File -> New -> Mule Domain Project

Create the domain project in anypoint studio. File -> New -> Mule Domain Project
Figure 2: New Mule Domain Project menu in Anypoint Studio

2In the Global Elements tab, click Manage Modules:

In the Global Elements tab, click Manage Modules:
Figure 3: Manage Modules button in Global Elements tab

3Click on + button to add modules. From exchange import the HTTP and socket module and the modules which required.

Click on + button to add modules. From exchange import the HTTP and socket module and the modules which required.
Figure 4 & 5: Adding HTTP and Socket modules from Exchange
Click on + button to add modules. From exchange import the HTTP and socket module and the modules which required. (Continued)

4Now select the required connector config.

Now select the required connector config.
Figure 6: Configuring the shared connector configuration

5Create a mule project.

Create a mule project.
Figure 7: Creating standard Mule application project

6Remove modules which are in domain project.

7Right click on the mule application. Click on properties. Go to mule project.

Right click on the mule application. Click on properties. Go to mule project.
Figure 8: Project properties menu in Anypoint Studio

8Select the domain project from the drop down.

Select the domain project from the drop down.
Figure 9: Linking the domain project to the Mule application

9Now we can see Http and socket module from domain project.

Now we can see Http and socket module from domain project.
Figure 10: Modules inherited from domain project

10The configuration will automatically come in the dropdowns.

The configuration will automatically come in the dropdowns.
Figure 11: Reusable shared configuration available in connector drop-downs
Quote

“Thank you for taking out time to read the above post. Hope you found it useful. In case of any questions, feel free to comment below. Also, if you are keen on knowing about a specific topic, happy to explore your recommendations as well.”

Soma Mitra
About the Author

Soma Mitra

Integration specialist and enterprise solution engineer at DigitalBuzz Software, focusing on MuleSoft middleware, domain architectures, and reusable resource management.

Share this article