Heat the oil in a heavy stock pot over medium- high heat.
Add the onion, garlic, and shallots, and quickly saute until golden brown, stirring continuously.
Add the bay leaf, thyme, and rosemary, and saute for 1 minute.
Add the beans, wine, and Madeira, stirring well.
Add the stock, stirring to incorporate the ingredients, and bring to a boil.
Reduce the heat, cover, and simmer for 45 minutes, stirring occasionally.
(The longer the beans cook the more they will fall apart and thicken the soup. If a smoother, creamier consistency is desired, remove the pot from the stove and puree the soup in the pot with a hand blender. If the soup appears too thick, dilute it with st) Remove the pot from the heat and adjust the seasonings to taste.
Ladle the soup into cups and sprinkle each with a tablespoon of the cheese.