I am currently investigating the possibility of CICS v2.2 as an EJB deployment environment. We have the need to have COBOL applications invoke CICS EJBs. Is it possible to code CICS Java transactions that can then invoke CICS EJBs over IIOP thereby gaining a bridge between COBOL and Java?
Well good for you. It's always nice for us in development to hear that our latest technology is being used as intended! Information about this topic is contained in several CICS Redbooks.
The latest COBOL (Enterprise COBOL) cannot issue EJB calls and neither can any of the older COBOLs. You are quite correct that the only way for a COBOL program to issue EJB activity is to write a Java class (one that starts with a main() method) and define this as an RDO program. You then XC LINK to this program to do the EJB activity.
This program is essentially a wrapper for an EJB call. You pass in a Commarea containing the input parms and then return the results in that same Commarea.
CICS' EJB/Java support contains an ORB so you don't actually need to worry about using IIOP going outside of the CICS region to get the EJB running inside a JVM within the same CICS region. You will essentially be running with two transactions, one for the COBOL and XC linked to the Java wrapper and the other for the JVM which will be servicing the EJB activity. Thus, you will not fall into the restriction that you can only have one JVM per CICS transaction.
You should consider where the transactional boundary is to be placed so that the UnitOfWork behavior is as expected (which in turn depends on the relevant settings in the DJAR file). In other words, you will probably want to run the EJB activity in the same UoW as that being used by the calling COBOL program.
CICS Technical Strategist -- CICS expert at Search390.com
Editor's note: Do you agree with this expert's response? If you have more to share, post it in one of our .VO7aaqqaAFk.0@/search390>discussion forums.
Dig Deeper on IBM system z and mainframe systems
Related Q&A from Robert Crawford
For better mainframe capacity planning, how do I convert CPU hours to MIPS? And is there a way to calculate the relationship between MIPS and MSUs? Continue Reading
I have two years of experience in mainframe technology, currently working as a mainframe developer. I want to change to Java technology. Continue Reading
I want to replicate DB2 from the mainframe to an AIX box since it's cheaper and the copy can be used for testing. Is this possible? Continue Reading
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.