Preheat the oven to 375 degrees F.
In a gallon stock pot, heat 2 tablespoons olive oil. When the oil is hot, add the garlic, onions, carrots, celery, leeks, and pepper. Saute for 2 minutes. Season with salt and pepper. Add the ham hocks and saute for 1 minute. Add the beans, rosemary, thyme sprigs, and bay leaves. Stir in the chicken stock and bring up to a boil. Reduce to a simmer and cook for about 2 hours or until the beans are tender.
Remove the ham hocks, thyme sprigs, and bay leaves. Using a hand held-blender, puree half of the bean mixture. Pick the meat from the ham hock and return the meat to the bean mixture. Season the beans with salt and pepper.
In a saute pan, heat the remaining olive oil. Add the crushed garlic cloves and chopped thyme and simmer for 1 minute to infuse the oil. Remove the pan from the heat and discard the garlic cloves. Stir half of the olive oil mixture into the bean mixture.
Line a fireproof tureen with the toasted bread slices. Sprinkle the bread with half of the cheese. Ladle the bean mixture over the toasted bread. Cover the bean mixture with the onion slices, the remaining infused olive oil and cheese. Place the tureen in the oven and cook for 30 minutes. Remove from the oven and serve. Garnish with chopped parsley.