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

Reply via email to