Soak dried beans for about 8 hours, then pour into colander, rinse, and let drain. (I think the best way to cook beans is to soak them all day while you’re at work, then cook at night.)
For canned beans, drain them into a colander placed in the sink and rinse well with cold water (until you don’t see any more foam.)
In heavy soup pot, heat olive oil, saute onion and celery 3-4 minutes, until starting to soften, then add thyme and saute 1-2 minutes more. Add beans and 2 quarts water (for dried beans) or 6 cups water (for canned beans).
Cook dried beans at a low simmer until they are starting to soften, adding a little more water occasionally if needed. (This could take an hour or more, depending on how fresh the beans are.)
Cook canned beans about 20 minutes at a low simmer.
When beans feel like they are about ¾ soft (when you bite down on one) add ham flavor base (affiliate link) if using, finely chopped cabbage, and finely diced ham.
Cook about 30 minutes more (or maybe a little longer for canned beans), until beans are very soft, soup broth is very flavorful, and most of the cabbage has disintegrated into the soup.
Season to taste with fresh ground black pepper and serve hot.
