TIBCO BW provides options of utilizing code written in java to develop integration solutions by making use of Java Palette activities. However, the question rises that when and why TIBCO BW Java Palette activities should be used on top of the standard Palette activities provided by TIBCO BW?
When Java Palette activities to be used?
Though the above question has no definite or specific answers; I am going to talk about some generic situations where you may need to opt for utilizing Java Palette activities while working on your TIBCO BW Projects.
-
For Augmenting TIBCOW BW Capabilities
TIBCO BW is quite rich in providing a large number of activities and resources grouped in different palettes which are used to design and develop processes for fulfilling different business needs. However, there can be the cases where the available palette activities are not sufficient enough to get certain problem solved. That’s one situation where you look into the possibility of coding your desired methods in java and then incorporate the java code in your TIBCO BW project.
For example; if you need to do some 2-D or 3-D image processing; that’s not something readily available in any TIBCO BW palette. To achieve this; you can write Java Code where you can utilize the libraries for photo editing and then incorporate those classes in your project.
Another example scenario is dealing with PDF documents. TIBCO does provide a plugin for PDF handling; but if your company doesn’t have a license available for the plugin; you can write Java classes for PDF creation and then make use of those in TIBCO BW projects.
The above two are just example scenarios and there can be dozens of other scenarios where you may feel it necessary to augment TIBCO BW functionalities with custom Java codes.
-
For re-use of Existing/Legacy Java Code
For a standardized and a more robust and efficient solution design; It is important to design and develop the solution components by utilizing the palettes available in TIBCO BW and also do the same while translating/migrating solutions from legacy to TIBCO; however there can be scenarios where you feel it hard or time consuming to translate all the available functionalities into TIBCO processes. E.g. if you have some java classes already developed using Java standard code to do certain data processing; you may think of just re-using those by incorporating in your TIBCO BW projects by using Java Palette.
-
For Introducing Custom Process Starter
TIBCO BW provides different types of process starters to interface with a variety of external systems and applications for HTTP, JMS, RV, Timer, adapter etc. based communication. However; thanks to the flexible design of TIBCO BW; you can design your custom process starters as well by writing it in java and then use “Java Event Source” activity.
Key Considerations While Using Custom Java Code in TIBCO BW Projects
As we have discussed above the flexibility and richness of TIBCO BW in terms of its capability to get Java code incorporated; It is important to keep in mind some of the key points while deciding to use external java code in TIBCO BW projects.
- Performance should always be considered first when importing external jars or when writing custom Java code for BW solutions. While writing java code; developer has full control on the code and the performance of the code will primarily depend on the algorithmic efficiency that he or she incorporated in his code. The functionalities provided in different standard palette activities of TIBCO are generally much efficient and robust. When going for a custom java code option; you should first try to think of all the options of achieving your solution needs with the standard palette activities and opt for writing Java code only when no other option is available. For example; consider XML processing. TIBCO BW XML palette has Render and Parse XML activities which are quite efficient to handle large XML files. Writing custom Java Code for XML handling won’t make much sense here unless you have some solid reasons to do so.
- Java version mismatch issues are quite a common pain felt by those coding with Java language. If you opt for writing external java code and club that in TIBCO projects; this thing should also be kept in mind. Java code compiled in a higher Java version won’t run if your TIBCO installation is using a lower java version. Also; you may expect some different or incorrect behaviour of your java code when deployed in different environments running different java versions.
- Another important consideration is the logging. If you put most of your logic in Java Classes and then incorporate the jar in your TIBCO solution; you should first plan and decide how the logs written from TIBCO solution and the logs written from inside your java code are going to correlate. You should also well plan regarding exception handling in your java code.
- If you are a good java programmer and can do the magic with Java programming; it might not be true for everyone in your organization or for those who will be replacing your role once you move on in your career. If TIBCO solutions in an organization are widely dispersed between standard TIBCO code and custom Java code; it may create a real mess for the developers in future for making any changes or bug fixes.
Hi Ajmal,
In Key Considerations in the 3rd point u mentioned about logging . can u please explain how can we achieve the logging of java code in tibco log.
I have used log4j mechanism in java code ,it is working ok there but when i am using the same method in java activity in TIBCO BW i am not getting the logs (either in console or in log file which i have mentioned in log4j.properties file specific to my java code which is working fine outside TIBCO environment).
Thanks