Index: trunk/Monitoring/smon/local_repo.py
===================================================================
--- trunk/Monitoring/smon/local_repo.py	(revision 871)
+++ trunk/Monitoring/smon/local_repo.py	(revision 875)
@@ -26,5 +26,8 @@
 		raise Exception()
 
-	_conn=sqlite3.connect(":memory:",timeout)
+	db_file="/home/jripsl/supervisor/local_db/local_repo.db"
+	#db_file=":memory:"
+
+	_conn=sqlite3.connect(db_file,timeout)
 
 	create_tables()
@@ -40,17 +43,36 @@
 	_conn=None
 
+def commit():
+	"""
+	public method
+
+	not used for now
+	"""
+	_conn.commit()
+	
+def rollback():
+	_conn.rollback()
+
 def create_tables():
 
-	_conn.execute("create table simulation (id INTEGER PRIMARY KEY, name TEXT)")
-	_conn.execute("create unique index idx_simulation on simulation (name)")
+	_conn.execute("create table if not exists simulation (id INTEGER PRIMARY KEY, name TEXT, status TEXT)")
+	_conn.execute("create unique index if not exists idx_simulation_1 on simulation (name)")
 
-	_conn.execute("create table message (id INTEGER PRIMARY KEY, simulation_id TEXT)") # TODO: check how to use INT datatype for simulation_id column
+	_conn.execute("create table if not exists message (id INTEGER PRIMARY KEY, simulation_id TEXT)") # TODO: check how to use INT datatype for simulation_id column
+
+def cleanup():
+	_conn.execute("delete from simulation")
+	_conn.execute("delete from message")
+	_conn.commit()
 
 def populate_tables_with_sample():
 
-	rows = [('SIMU-001',),
-			('SIMU-002',),
-			('SIMU-003',),]
-	_conn.executemany('INSERT INTO simulation (name) VALUES (?)', rows)
+	rows = [('SIMU-001','running'),
+			('SIMU-002','running'),
+			('SIMU-003','running'),]
+
+	_conn.executemany('INSERT INTO simulation (name,status) VALUES (?,?)', rows)
+
+	_conn.commit()
 
 def retrieve_simulations():
@@ -58,9 +80,9 @@
 	c=_conn.cursor()
 
-	c.execute("select name,id from simulation")
+	c.execute("select name,id,status from simulation")
 
 	rs=c.fetchone()
 	while rs is not None:
-		li.append(types.Simulation(name=rs[0],id=rs[1]))
+		li.append(types.Simulation(name=rs[0],id=rs[1],status=rs[2]))
 		rs=c.fetchone()
 
@@ -70,5 +92,5 @@
 	c=_conn.cursor()
 
-	c.execute("select name,id from simulation where name = ?",(name,))
+	c.execute("select name,id,status from simulation where name = ?",(name,))
 
 	rs=c.fetchone()
@@ -77,14 +99,20 @@
 		raise Exception()
 
-	return types.Simulation(id=rs[1])
+	return types.Simulation(name=rs[0],id=rs[1],status=rs[2])
     
 def delete_simulation(simulation):
 	_conn.execute("delete from simulation where name = ?",(simulation.name,))
 
+	_conn.commit()
+
 def create_simulation(simulation):
-	_conn.execute("insert into simulation (name) values (?)",(simulation.name,))
+	_conn.execute("insert into simulation (name,status) values (?,?)",(simulation.name,simulation.status))
+
+	_conn.commit()
     
 def update_simulation_status(simulation):
 	_conn.execute("update simulation set status=? where name = ?",(simulation.status,simulation.name))
+
+	_conn.commit()
 
 def retrieve_messages(simulation):
@@ -105,6 +133,10 @@
 	_conn.execute("delete from message where simulation_id = ?",(simulation.id,))
 
+	_conn.commit()
+
 def create_message(message):
 	_conn.execute("insert into message (simulation_id) values (?)",(message.simuid,))
+
+	_conn.commit()
 
 def retrieve_last_message(simulation):
Index: trunk/Monitoring/smon/repo_io.py
===================================================================
--- trunk/Monitoring/smon/repo_io.py	(revision 871)
+++ trunk/Monitoring/smon/repo_io.py	(revision 875)
@@ -87,4 +87,8 @@
 
 def test():
+	"""
+	not used
+	"""
+
 	repo.create_message("test2", 2, "bla2")
 	commit()
@@ -95,4 +99,14 @@
 	repo.create_message("test3", 3, "bla3")
 	rollback()
+
+def cleanup():
+	if mode==CSTE_MODE_LOCAL_REPO:
+		repo.cleanup()
+	elif mode==CSTE_MODE_REMOTE_REPO:
+		raise Exception("ERR707")
+	elif mode==CSTE_MODE_REMOTE_REPO_STUB:
+		pass
+	else:
+		raise Exception("ERR007 - incorrect mode")
 
 def commit():
Index: trunk/Monitoring/smon/types.py
===================================================================
--- trunk/Monitoring/smon/types.py	(revision 871)
+++ trunk/Monitoring/smon/types.py	(revision 875)
@@ -48,4 +48,5 @@
 
 class Message():
+	file=None
 
 	def __init__(self,JSON_KW):
