Hi Narashimham,
If you haven’t see it yet, the Wiki page on transactions will give you
some insight how locking works in BaseX [1]. Do all of your modules
run in the same JVM, and have you ensured that all operations use the
same context? If yes, feel free to send us your sample code that
demonstrates the problem.
Best,
Christian
[1] http://docs.basex.org/wiki/Transaction_Management
___________________________
2013/10/20 EV Narasimham <evnarasimham@gmail.com>:
> _______________________________________________> Hi,
> I have 3 application modules. One module, creates the xml database, the
> second/third module execute queries on the database (no updates are being
> performed on the database).
>
> When the second and the third module try accessing the database, once
> module is able to query the database while the other module ends up with the
> below exception.
>
> org.basex.core.BaseXException: Improper use? Potential bug? Your feedback is
> welcome:
> Contact: basex-talk@mailman.uni-konstanz.de
> Version: BaseX 7.8 beta
> Java: Oracle Corporation, 1.7.0_25
> OS: Linux, amd64
> Stack Trace:
> java.nio.channels.OverlappingFileLockException
> at sun.nio.ch.SharedFileLockTable.checkList(FileLockTable.java:255)
> at sun.nio.ch.SharedFileLockTable.add(FileLockTable.java:152)
> at sun.nio.ch.FileChannelImpl.tryLock(FileChannelImpl.java:1017)
> at org.basex.io.random.TableDiskAccess.lck(TableDiskAccess.java:183)
> at
> org.basex.io.random.TableDiskAccess.sharedLock(TableDiskAccess.java:170)
> at
> org.basex.io.random.TableDiskAccess.<init>(TableDiskAccess.java:83)
> at org.basex.data.DiskData.init(DiskData.java:122)
> at org.basex.data.DiskData.<init>(DiskData.java:92)
> at org.basex.core.cmd.Open.open(Open.java:68)
> at org.basex.core.cmd.Open.run(Open.java:35)
> at org.basex.core.Command.run(Command.java:344)
> at org.basex.core.Command.exec(Command.java:320)
> at org.basex.core.Command.execute(Command.java:77)
> at org.basex.core.Command.execute(Command.java:89)
>
>
> Below are the options being set:
> context.globalopts.set(GlobalOptions.GLOBALLOCK, false) ;
> context.globalopts.set(GlobalOptions.PARALLEL, 1) ; //After referring to
> https://github.com/BaseXdb/basex/issues/574
>
> When the same exercise is being undertaken on a windows machine, the above
> behavior does not occur.
>
> Regards
> Narasimham
>
> BaseX-Talk mailing list
> BaseX-Talk@mailman.uni-konstanz.de
> https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
>