1 package com.dotmarketing.threads; 2 3 import com.dotmarketing.db.DbConnectionFactory; 4 import com.dotmarketing.db.DotHibernate; 5 import com.dotmarketing.portlets.indexation.factory.IndexationFactory; 6 import com.dotmarketing.util.Logger; 7 8 public class ContentIndexationThread implements Runnable { 9 10 public ContentIndexationThread() { 11 } 12 13 public void run() 14 { 15 try 16 { 17 IndexationFactory.reIndex(); 18 } 19 catch (Exception e) 20 { 21 Logger.error(this, "Error ocurred trying to review contents.", e); 22 } 23 finally 24 { 25 DotHibernate.closeSession(); 26 DbConnectionFactory.closeConnection(); 27 } 28 } 29 30 35 public void destroy() 36 { 37 38 } 39 } 40 | Popular Tags |