My company recently purchased your HXTT DBF driver. We are attempting to implement record locking through JPA and EntityManagers using:
Through some testing I was able to determine that this works locally, with two separate threads, but when I asked my coworker to try to edit on his machine, with the records locked on mine, he was able to save just fine. Is there anyway to be able to get this to work with multiple users over the intranet?
Also, is there a way to implement a lock timeout? I'm able to set a EntityManager property which allows for a timeout in case a record is locked when it tries to save. After the specified time out it reattempts the save. This property is set in the persistence.xml using
Both of these issues work fine using SQL Server but not with FoxPro.
Thanks in advance,
>Is there anyway to be able to get this to work with multiple users over the intranet?
You need to set lockType=FOXPRO connection property.
>Also, is there a way to implement a lock timeout?
You can use lockTimeout connection property.
You can find connection properties at here
The issue with this solution is that JPA/EntityManager does not rely on a Connection object.
I can set properties for the EntityManager using the persistence.xml file, would setting the locktype there work, or does it need the connection object?
At least, you can add connection proerties in your jdbc url:
For instance jdbc:dbf:/yourpath?lockType=FOXPRO;lockTimeout=10000