Mark Taylor wrote:
> Alasdair Allan wrote:
> > Dave Berry wrote:
> > > Alasdair Allan wrote:
> > > > JNIEXPORT jint JNICALL
> > > > Java_uk_ac_starlink_kappa_KAPPA_jnidisplay(
> > > > JNIEnv *env, jobject obj, jobject pl, jobject tmsg ) {
> > > >
> > > > int status;
> > > >
> > > > status = 0;
> > > >
> > > > DEB("Activating SUBPAR\n");
> > > > subpar_activ( env, obj, pl, tmsg, &status );
> > > >
> > > > ndfBegin();
> > > >
> > > > DEB("Calling adamtest\n");
> > > > F77_CALL(display)( INTEGER_ARG(&status) );
> > >
> > > OK. So he's gone one layer further down to the atask subroutines. So
> > > the only public contract which this depends on is the name of the
> > > applications (e.g. "display"). Seems reasonable.
> >
> > I think it's a reasonable approach, although someone with more JNI
> > experience (Mark!) might disagree!? Looking at the hand written bits
> > and pieces it looks moderately easy to write some perl (or something)
> > to autogenerate JNI wrappers for each task at this level which is what
> > I was mostly concered about.
>
> That sounds all right to me. I was perhaps being a bit paranoid about
> public APIs - if libkappa is not installed then mucking about with it
> _can't_possibly_ break any non-KAPPA components. If it's installed on
> the understanding that only the A-task routines will be called then in
> practice modifying it won't break non-KAPPA components - fair enough.
> Most likely I've been living in Javaland too long and got used to the
> secure feeling that JVM-enforced private/package-private access
> restrictions give you.
I think you're right and the way to do this is to generate the JNI wrapper
shared library during the KAPP build. I've temporarily changed hats for
the day as I've got some web service stuff to do for eSTAR, but I'll get
back onto this tommorrow. However I still have to write a FROG poster (and
get it printed) for ADASS, so I can't see myself spending any time on this
past the end of this week. Realistically I'm beginningt o wonder whether
this is going to be doable in that sort of time scale. Ho hum...
Al.
|