JNI code is NOT zIIP-eligible. For significant pathlength or frequent 
calling that probably matters a great deal.

Cheers, Martin

Martin Packer,
zChampion, Principal Systems Investigator,
Worldwide Banking Center of Excellence, IBM

+44-7802-245-584

email: martin_pac...@uk.ibm.com

Twitter / Facebook IDs: MartinPacker
Blog: 
https://www.ibm.com/developerworks/mydeveloperworks/blogs/MartinPacker



From:   Phil Smith <p...@voltage.com>
To:     IBM-MAIN@listserv.ua.edu
Date:   12/06/2014 20:10
Subject:        JNI on z/OS
Sent by:        IBM Mainframe Discussion List <IBM-MAIN@listserv.ua.edu>



This post will reveal (a small fraction of) my vast ignorance, so for 
those who know what JNI is, might be worth reading if just for 
entertainment value.

We have a very simple API that we'd like to enable for use from WAS 
applications on z/OS. Currently we support any standard language that 
calls us with an OS/360-style plist, passing pointers to character strings 
and to fullword lengths of those strings. The API is assembler, and 
doesn't do much: a bit of validation, and then a PC over to a started 
task. Let's pretend it's a REVERSE function, so gets called (from C):
     rc = reverse(string, length);

>From my reading, it appears that JNI is the way to go here. I know that 
JNI is considered A Bad Thing (to quote my manager), but reading 
http://en.wikipedia.org/wiki/Java_Native_Interface#Pitfalls doesn't leave 
me concerned-none of those seem like anything that will affect us.

Some Googling finds Integrating Java with Existing Data and Applications 
on OS/390 (SG24-5142-00), which is from 1998 (!) and Java Stand-alone 
Applications on z/OS Volume II (SG24-7291-00), which is "only" 8 years 
old. But presumably this stuff still applies.

So it all seems pretty straightforward, but if someone had a trivial 
example they could share, that would help.

Questions:

1)      Is it reasonable to expect that a Java program running in batch 
(assuming that's even a possible environment?) could use the same JNI 
shims?

2)      What other pitfalls should we expect?

3)      What questions am I not asking that I should be?

Thanks,

...phsiii

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN



Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 
741598. 
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to