> The user does not need to know what the result of the web services
> call is (essentially, I am duplicating data over to another system).
> So what I need to do is do an update locally, spawn the process to do
> the remote update and return to the user (as the spawned process is
> doing it's thing).

Ok. Now I get it.

> I thought you only needed to call Inline::Java::reconnect_JVM if the
> fork() occurred in the block where your Inline Java code existed.

And that's what happening in your case :)...

> -------------
> sub gradebook_update_student_value{
...
>      use Inline (
>              Java => 'STUDY',
>             SHARED_JVM => 1,
>              STUDY => [
>              'com.iparadigms.webct.webServiceClient.GradeBook',
> 'java.util.HashMap'],
>              DIRECTORY => '/tmp/',
>      ) ;
> 

Your problem is that you load Inline::Java with "use", which is a
compile time directive.
This means that all the Inline::Java init stuff is going on when the
script is compiled, not run. Therefore you are connecting and using
the JVM in the parent process as well.

Try this instead (I can't test it right now, but I think that's the
correct syntax):

     require Inline ;
     Inline->bind (
             Java => 'STUDY',
            SHARED_JVM => 1,
             STUDY => [
             'com.iparadigms.webct.webServiceClient.GradeBook',
'java.util.HashMap'],
             DIRECTORY => '/tmp/',
     ) ;


This should give you the same result, except that in that case the
parent process will
never load Inline or Inline::Java (which is really what you seem to
want). Or leave it like it is but use Inline::Java::reconnect_JVM
after you fork and it should ok as well.

Patrick

-- 
=====================
Patrick LeBoutillier
Laval, Québec, Canada

Reply via email to