IBM Sterling B2B Integrator provides out-of-box service and adapters to cater most of B2B business needs, but sometimes it may happen that business requirements could not be achieved using out-of-box services and there arises a need to develop custom services.
Thanks to Kishore, Senior Solution Architect, to help us understand alternative way to develop custom service using Apache Maven. You can find link to that article at the end.
In scenarios where update to custom service is required, whether it can be the case while developing it or to cater change in customer's requirement or it can be a case where custom service code needs to re-compile with lower or higher version of java, you should delete existing custom service from SI before deploying the updated one.
Please find following steps to delete custom service -
SI Dashboard cleanup -
Delete all instances of custom service from SI dashboard -
Development --> Services --> Configuration
File System Cleanup -
1. Remove entries of custom service from - install_dir\properties\dynamicclasspath.cfg and dynamicclasspath.cfg.in
2. Delete - install_dir\properties\lang\en\ Custom_Service_Name _en.properties
3. Delete - install_dir\properties\services\ Custom_Service_Name.xml
4. Delete - install_dir\installed_data\ Custom_Service directory
5. Delete - install_dir\jar\ Custom_Service directory
6. If any file/directory apart from ones mentioned above is present in install_dir, you should grep it with Custom_Service_Name and delete that object too.
Database Cleanup -
Execute following query in SQL manager -
select * from service_def where def_lookup_name like '%com.ibm.custom%'
(Highlighted text is package name under which custom service class resides, use appropriate string as per your implementation)
Note down the "DEF_ID" pertaining to custom service from result of the above query.
Provide this “DEF_ID” in following queries -
select * from service_def_guid where current_id = DEF_ID
select * from service_def_parms where def_id = DEF_ID
If above queries yield any result then it means there are some instances of custom service in DB, you should delete these instances too.
- delete from service_def_guid where current_id = DEF_ID
- delete from service_def_parms where def_id = DEF_ID
- delete from service_def where def_id = DEF_ID
This completes deletion of custom service from SI.
Link to develop custom service using Maven –
Note : It is always better to take backup of the objects before deleting them.