C Custom Microservices will, by default, load a NetBeans-based UI in a separate process. To use the eclipse-based eStudio CPS, perform the following actions:
- Sources generated while creating Custom Microservices will be imported as a new Java Project in eStudio's workspace.
Access the project from the Java perspective in eStudio.
- By default, the generated component will have a swing based CPS.
To generate an SWT/JFace based CPS, create a new class ConfigLauncher.java in the imported Java project as shown below:
- Provide the following details in the New Java Class wizard:
Name: Name of the class
Superclass: The class that can be inherited by other classes
Add a no-args constructor for the ConfigLauncher.java class as shown in the sample code below.
- Before registering the component, the launcher class needs to be changed from the default Property Sheet to the newly created ConfigLauncher. Replace com.fiorano.esb.service.cps.SampleComponentPropertySheet with the qualified name of the ConfigLauncher class (here com.fiorano.esb.service.cps.ConfigLauncher) in the following locations:
- The value of the field execution > cps > launcher in the resources/ServiceDescriptor.xml file
- The value of cpsClass in the deploy target in the Common.xml file
- Modify the classpath target in common.xml file as shown below.
Register the component by running
ant registerin the component directory and open the CPS from eStudio.