Again, you only need one thread. Not one for serial, one for database, one for something else. One in general, it's not java.