Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

getting IllegalStateException on IInteropManager

Hi,

I'm invoking a method through IInteropManager, which checks for the presence of sync rule. I used the method findSyncRulesByExternalTypeNameAndProjectArea() on IInteropManager...I'm getting IllegalStateException on its call.

(The reason is because of a check in ThreadCheck class' checkLongOpsAllowed() method).

Although it works fine, and returns the array of sync rule handle correctly, so that I can check for the presence of sync rule, it does log the above mentioned exception on the console.

I checked with jazz.net forum (https://jazz.net/forums/viewtopic.php?t=649&sid=df6d35b5d3505e01ae822b4b62810756), applied the suggested solution of creating a separate job and calling such methods from within the scheduled job, but the problem with this approach is that the new job created is scheduled alongwith the synchronizer, thus we do not get its result while synchronizer is running.

Have gone through following jazz links:
https://jazz.net/forums/viewtopic.php?t=1339
https://jazz.net/forums/viewtopic.php?t=2297
https://jazz.net/forums/viewtopic.php?t=649

Also, tried to creating a separate thread and calling the method, it too didn't work.

Any pointers?

0 votes


Accepted answer

Permanent link
You can just call the Job.join() method to wait for the job to finish. In other words, doing


Job job = new Job(name) {...};
job.schedule();
job.join();


will run the code in the job in a non-UI thread, but block until it completes. You can arrange for the return value of the method you want to call to be passed back as an attribute of the Job object you create.
Atul Kumar selected this answer as the correct answer

1 vote


One other answer

Permanent link
thanks a lot John, it works!

You can just call the Job.join() method to wait for the job to finish. In other words, doing


Job job = new Job(name) {...};
job.schedule();
job.join();


will run the code in the job in a non-UI thread, but block until it completes. You can arrange for the return value of the method you want to call to be passed back as an attribute of the Job object you create.

0 votes

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,951

Question asked: Jul 14 '11, 8:42 a.m.

Question was seen: 5,016 times

Last updated: Jul 14 '11, 8:42 a.m.

Confirmation Cancel Confirm