Author: rvesse
Date: Tue Jul 22 10:34:38 2014
New Revision: 1612535
URL: http://svn.apache.org/r1612535
Log:
Issue a warning when unable to obtain a PID when trying to obtain the lock
(JENA-648)
Modified:
jena/trunk/jena-tdb/src/main/java/com/hp/hpl/jena/tdb/base/file/LocationLock.java
Modified:
jena/trunk/jena-tdb/src/main/java/com/hp/hpl/jena/tdb/base/file/LocationLock.java
URL:
http://svn.apache.org/viewvc/jena/trunk/jena-tdb/src/main/java/com/hp/hpl/jena/tdb/base/file/LocationLock.java?rev=1612535&r1=1612534&r2=1612535&view=diff
==============================================================================
---
jena/trunk/jena-tdb/src/main/java/com/hp/hpl/jena/tdb/base/file/LocationLock.java
(original)
+++
jena/trunk/jena-tdb/src/main/java/com/hp/hpl/jena/tdb/base/file/LocationLock.java
Tue Jul 22 10:34:38 2014
@@ -27,6 +27,7 @@ import org.apache.jena.atlas.io.IO;
import com.hp.hpl.jena.tdb.TDBException;
import com.hp.hpl.jena.tdb.sys.ProcessUtils;
+import com.hp.hpl.jena.tdb.sys.SystemTDB;
/**
* Represents a lock on a TDB location
@@ -163,6 +164,7 @@ public class LocationLock {
if (pid == NO_OWNER) {
// In the case where we cannot obtain our PID then we cannot
// obtain a lock
+ SystemTDB.errlog.warn("Location " +
location.getDirectoryPath() + " cannot be locked as unable to obtain PID of
current process, if another JVM accessed this location while this process is
accessing it then data corruption may occur");
return;
}