src/com/shrewdify/diaroser/impl/PeerImpl.java
@Override
		public void run() {
			//System.out.println("not cmg");
			while(true){
				
				boolean loc=false;
				String sessionData=null;
				try{
					if(faultHandlerQueue.size()>Constants.ZERO){
						loc=faultHandlerQueue.getLock();
						if(loc)
							sessionData=faultHandlerQueue.remove();
					}
				}
				catch(Exception e){}
				finally{
					if(loc)
						faultHandlerQueue.lock.unlock();
				}
				if(sessionData!=null){
					try{
						db.setSeesionData(sessionData.split("~")[0], sessionData.split("~")[1]);
					}catch(SQLException e){}
					delay(1);
				}
			}
		}
/**
		 * It starts a thread which continuously checks for the queue size, 
		 * if queue contains some requests of Session data  it tries to acquire lock on it removes 
		 * the requests from queue and release the lock and request db handler to write to database..
		 *  
		 */
It starts a thread which continuously checks for the queue size,
if queue contains some requests of Session data  it tries to acquire lock on it removes
the requests from queue and release the lock and request db handler to write to database
It starts a thread which continuously checks for the queue size if queue contains some requests of Session data it tries to acquire lock on it removes the requests from queue and release the lock and request db handler to write to database
@Override
		public void run() {
			while(true){
				boolean loc=false;
				String sessionData=null;
				try{
					if(faultHandlerQueue.size()>Constants.ZERO){
						loc=faultHandlerQueue.getLock();
						if(loc)
							sessionData=faultHandlerQueue.remove();
					}
				}
				catch(Exception e){}
				finally{
					if(loc)
						faultHandlerQueue.lock.unlock();
				}
				if(sessionData!=null){
					try{
						db.setSeesionData(sessionData.split("~")[0], sessionData.split("~")[1]);
					}catch(SQLException e){}
					delay(1);
				}
			}
		}
@ Override public void run ( ) { while ( true ) { boolean loc = false ; String sessionData = null ; try { if ( faultHandlerQueue . size ( ) > Constants . ZERO ) { loc = faultHandlerQueue . getLock ( ) ; if ( loc ) sessionData = faultHandlerQueue . remove ( ) ; } } catch ( Exception e ) { } finally { if ( loc ) faultHandlerQueue . lock . unlock ( ) ; } if ( sessionData != null ) { try { db . setSeesionData ( sessionData . split ( "~" ) [ 0 ] , sessionData . split ( "~" ) [ 1 ] ) ; } catch ( SQLException e ) { } delay ( 1 ) ; } } }
It starts a thread which continuously checks for the queue size,
 if queue contains some requests of Session data  it tries to acquire lock on it removes
 the requests from queue and release the lock and request db handler to write to database..
It starts a thread which continuously checks for the queue size if queue contains some requests of Session data it tries to acquire lock on it removes the requests from queue and release the lock and request db handler to write to database ..
//System.out.println("not cmg");