In a large saucepan, over medium heat, add the oil. When the oil is hot, add the onions, celery and carrots. Season with salt and pepper. Saute for 4 minutes. Add the garlic, bay leaves and thyme. Saute for 1 minute. Add the ham hocks and stock. Bring the liquid to a boil, reduce heat to medium low and cook, covered for about an hour, or until ham hocks are tender. Add the lentils and continue to cook 25 to 30 minutes or until lentils are tender. Remove from heat and stir in the parsley. Reseason with salt and pepper if needed. Remove ham hocks and remove the meat. Add the ham back into the soup. Serve with a hearty crusty bread.