KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > dotmarketing > threads > ContentIndexationThread


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 JavaDoc {
9
10     public ContentIndexationThread() {
11     }
12
13     public void run()
14     {
15         try
16         {
17             IndexationFactory.reIndex();
18         }
19         catch (Exception JavaDoc 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     /*
31      * (non-Javadoc)
32      *
33      * @see java.lang.Thread#destroy()
34      */

35     public void destroy()
36     {
37         
38     }
39 }
40
Popular Tags