roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snoopd...@apache.org
Subject svn commit: r1663146 - in /roller/trunk/app/src/main/java/org/apache/roller/weblogger: business/WeblogEntryManager.java business/jpa/JPAWeblogEntryManagerImpl.java ui/struts2/editor/EntryEdit.java
Date Sun, 01 Mar 2015 18:42:49 GMT
Author: snoopdave
Date: Sun Mar  1 18:42:48 2015
New Revision: 1663146

URL: http://svn.apache.org/r1663146
Log:
For for ROL-2063 NextLink appears in latest entry of permalink (using alternative patch provided
by Kohei

Modified:
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/WeblogEntryManager.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAWeblogEntryManagerImpl.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/EntryEdit.java

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/WeblogEntryManager.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/WeblogEntryManager.java?rev=1663146&r1=1663145&r2=1663146&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/WeblogEntryManager.java
(original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/WeblogEntryManager.java
Sun Mar  1 18:42:48 2015
@@ -397,6 +397,11 @@ public interface WeblogEntryManager {
      * Get weblog entry count 
      */    
     long getEntryCount(Weblog websiteData) throws WebloggerException;
+
+    /**
+     * Evict an entry from cache
+     */
+    void evict(WeblogEntry entry) throws WebloggerException;
     
 }
 

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAWeblogEntryManagerImpl.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAWeblogEntryManagerImpl.java?rev=1663146&r1=1663145&r2=1663146&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAWeblogEntryManagerImpl.java
(original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAWeblogEntryManagerImpl.java
Sun Mar  1 18:42:48 2015
@@ -1349,7 +1349,15 @@ public class JPAWeblogEntryManagerImpl i
         q.setParameter(2, website);
         return q.getResultList().get(0);
     }
-    
+
+    /**
+     * @inheritDoc
+     */
+    @Override
+    public void evict(WeblogEntry entry) throws WebloggerException {
+        strategy.getEntityManager(false).getEntityManagerFactory().getCache().evict(WeblogEntry.class,
entry.getId());
+    }
+
     /**
      * Appends given expression to given whereClause. If whereClause already
      * has other conditions, an " AND " is also appended before appending

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/EntryEdit.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/EntryEdit.java?rev=1663146&r1=1663145&r2=1663146&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/EntryEdit.java
(original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/EntryEdit.java
Sun Mar  1 18:42:48 2015
@@ -264,6 +264,10 @@ public final class EntryEdit extends UIA
                 weblogEntryManager.saveWeblogEntry(weblogEntry);
                 WebloggerFactory.getWeblogger().flush();
 
+                // necessary to work around timestamp resolution issue in some databases
+                // see also https://issues.apache.org/jira/browse/ROL-2063
+                weblogEntryManager.evict(weblogEntry);
+
                 // notify search of the new entry
                 if (weblogEntry.isPublished()) {
                     indexMgr.addEntryReIndexOperation(entry);



Mime
View raw message