In the NetBeans Project window, right-click on the Project to display its context menu.
From the menu, select New > Deployment Profile to display the Create Deployment Profile dialog.
Enter the Deployment Profile Name you want to use (or accept the default).
The resulting application ( .ear ) file will default to a concatenation of the Deployment Profile name and the Project name (see Naming the Application File).
Select the Environment to which you want to deploy the Project.
Select the Connectivity Map(s) to include in the deployment.
The Deployment Profile Editor now appears, showing all deployable Project components.
Drag the Project components from the left panel and drop them into the appropriate Environment components in the right panel.
Drag the topics and queues to the appropriate message server, being careful not to split inbound and outbound message destinations between separate servers.
Drag the Collaborations to the appropriate application servers.
Drag the Adapter components to the appropriate external systems.
You can select multiple components of the same type that are destined for a single external system, dragging them to that external system in one operation.
When the Environment components are fully populated, the left panel will be blank. You should now Save the profile.
You can deploy two services that are not directly dependent upon each other across two domains; however, two processes that need to have direct access to one another must be deployed to the same domain.