Skip to main content

UTILIZE CUSTOM JAVA CLASSES IN OIC INTEGRATIONS (WITHOUT OCI FUNCTIONS)

 At times we get presented with technical requirements in OIC integration that will require the use of custom developed Java classes (maybe from legacy systems, third party collaborators, cryptography needs, etc.). As easy and straight-forward the requirement sounds, its implementation may not be so, most of the times. The usually suggested way is to compile the Java classes in OCI and create functions. However, what if I tell you that there is another easier way to achieve the requirement?

There is and it assumes that there is an Oracle database in picture (preferably an ATP).

1. Enable Java in your Oracle database, after which, you may have to bounce the database once.

2. Import your Java classes using the CREATE JAVA statement. More details on this statement can be known here. Please note that if a class references another class objects, then the class being referenced has to be imported first before proceeding to import the other.

3. Once you have imported and successfully compiled the necessary Java classes, you will have to wrap the Java classes using PLSQL functions. Please take note that when you create wrappers, you will have to mention the formal data type of its arguments – like java.lang.String for a string type.

4. Utilize these wrappers by creating another wrapper procedure/function – but this time, using the PLSQL datatypes. These procedures and functions can be invoked from OIC integrations, indirectly utilizing the custom Java classes.

Voila!

Comments

Popular posts from this blog

MY CAREER GAMBLE WITH A MID-SIZED IT SERVICES FIRM

  Not so long ago, I was working at my first job as an Associate Software Engineer is a reasonably sized IT services organization, large enough to be called one of country’s largest. I was proud, happy, surrounded by good friends, most of them who had joined their first jobs just like me. It felt like a college away from college – there was all the inside jokes, the late night shenanigans, the drinking, the partying, the dancing and what not! I was happy that I had found my crowd and that I was at a place that was mine. I felt comfortable and settling down. On the works side, though I struggled at first to come to terms with who an ERP consultant was and what he does – mostly due to my ignorance or lack of awareness, I quickly grasped the concepts and mostly understood the way things worked for an ERP consultant and became genuinely interested in the line of work. I was rising through the ranks, not if we are equating ranks to the likes of designations and promotions, but if we a...