Main   Products   Offshore Outsourcing   Customers   Partners   ContactUs  
JDBC Databases
  HXTT Access v7.1
  HXTT Cobol v5.0
  HXTT DBF v7.1
 
  Buy Now
  Support
  Download
  Document
  FAQ
  HXTT Excel v6.1
  HXTT Paradox v7.1
  HXTT PDF v2.0
  HXTT Text(CSV) v7.1
  HXTT Word v1.1
  HXTT XML v4.0
Offshore Outsourcing
Free Resources
  Firewall Tunneling
  Search Indexing Robot
  Conditional Compilation
  Password Recovery for MS Access
  Password Recovery for Corel Paradox
  Checksum Tool for MD5
  Character Set Converter
  Pyramid - Poker of ZYH
   
   
   
Heng Xing Tian Tai Lab of Xi'an City (abbr, HXTT)

HXTT DBF
Record locking using EntityManager and JPA 2.0
Aaron
2013-03-11 09:53:01.0
My company recently purchased your HXTT DBF driver. We are attempting to implement record locking through JPA and EntityManagers using:

em.lock(entity, LockModeType.PESSIMISTIC_WRITE);

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,
Aaron
Re:Record locking using EntityManager and JPA 2.0
HXTT Support
2013-03-11 16:15:14.0
>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
Re:Re:Record locking using EntityManager and JPA 2.0
Aaron
2013-03-18 06:00:51.0
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?
Re:Re:Re:Record locking using EntityManager and JPA 2.0
HXTT Support
2013-03-18 06:11:17.0
At least, you can add connection proerties in your jdbc url:
For instance jdbc:dbf:/yourpath?lockType=FOXPRO;lockTimeout=10000

Search Key   Search by Last 50 Questions




Google
 

Email: webmaster@hxtt.com
Copyright © 2003-2019 Heng Xing Tian Tai Lab of Xi'an City. | All Rights Reserved. | Privacy | Legal | Sitemap