Dear Aspose Support Team,
I have the following scenario, can you please suggest how to implement this in ASPOSE.
We have a source workbook with some data and has around 10 worksheets in it.
In our java program, we have created 10 threads and each thread will work on the same work book instance as shown below. Here each thread will work on only one sheet of the workbook. But our understanding is that even thought it is sheet as it is part of the workbook, meaning we are sharing the workbook with these 10 threads.
//load workbook from class path
Workbook wrkbook = new Workbook();
//passin the wrkbook to each thread and get the same instance updated.
ThreadCalalbe1 t1 = new ThredCallable1();
ThreadCalalbe2 t2 = new ThredCallable2();
ThreadCalalbe3 t3 = new ThredCallable3();
ThreadCalalbe4 t4 = new ThredCallable4();
---- till 10 threads.
and add these 10 threads to a set.
and then we are invoking all the thread as follows.
execService.invokeAll(callableSet); // all thread started parallely
Question here is;
since the workbook is shared among the threads, we will be experiencing the concurrent exception because two threads will try to update the same work book at the same time. we need to know how to make this workbook sharable and will not cause Concurrent Exception when used in java multithreaded environment.