Re: Running Java bridge in Envi + IDL mode [message #79915 is a reply to message #79908] |
Mon, 16 April 2012 05:41   |
Matej Perše
Messages: 5 Registered: April 2012
|
Junior Member |
|
|
On Apr 15, 3:12 am, jimmyleependle...@gmail.com wrote:
> On Friday, April 13, 2012 4:50:42 AM UTC-6, Matej Perše wrote:
>> Hi all,
>
>> I have a couple of questions regarding Java bridge:
>
>> First: I was able to run all my scripts successfully in standard IDL
>> server mode, however now the guys I work with have added some parts of
>> the code that also needs ENVI.
>> I was wondering if any of you has any experience with running the Java/
>> IDL bridge in ENVI + IDL mode. Is it even possible to do it?
>
>> Second: I have tried to run two separate asynchronous java threads
>> which call 2 different IDL functions. However when I check the
>> resources the code is always executed in sequence - i.e. one of the
>> processes always waits for the second one to finish. I have also
>> checked the processes in the Task Manager and it appears that only one
>> idl_opserver process is created for both threads. Is there any way/
>> flag to tell the IDL to start two separate idl_opserver processes
>> which would run in parallel?
>
>> Thanks for the answers,
>> Matej
>
> Good news and bad news. You shouldn't have any problem calling into ENVI functionality via a Java bridge, as long as you have an ENVI license and your !path is set appropriately.
>
> Now for the (sort of) bad news. IDL is not thread safe. If you're calling into a single IDL process from multiple external processes, you should strongly consider a MUTEX pattern on the Java side to prevent potential conflicts.
>
> Jim P
Thanks for the replay Jim. I have the ENVI license. Could you
elaborate a bit more on the "path is set appropriately" (sorry, but I
have only basic IDL knowledge and cannot find anything about the topic
on the net). Where should I set the path - in IDl? My current path in
IDL shows the IDL_default path + my local dirs. If I start the IDL +
ENVI console the paths are the same.
As for the multiple threads, we can go with a single thread. It is
just that we could manage the resources better if it would be
possible.
Thanks again,
Matej
|
|
|