I'm reminded of a story/joke I once heard from Ajahn Brahm. I don't know if he mentions this in his books or if he repeats this at dhamma talks. I heard it at a public talk some years ago. Anyway, it goes something like this:
There was a businessman who was, as businessmen are wont to to be, greedy and calculative in his ways. He also happened to be Buddhist. Knowing that Buddhism advices against greed, craving, attachment, etc, he was afraid that his livelihood, which invariably encouraged such unwholesome states, would prevent him from gaining a favourable rebirth. But he wasn't the sort to renounce his way of life, nor was he the sort to devote time to a serious practice of the dhamma. 'How can I afford the time? I have a business to run. Mouths to feed.' he'd say. Yet, he couldn't ignore the teachings of karma and rebirth he had learned as a child. So he decided to speak to the local Bhante.
'Bhante, how can I ensure a favourable rebirth?'
'It is very easy. One must seek refuge in the Buddha, Dhamma, and Sangha', the Bhante replied. 'If one has full confidence in the Three Jewels, then at the moment of death, one's mind is assured in the Three Jewels. One will not be in a state of fear or agitation. Resting tranquil in the Three Jewels one will pass into a favourable realm.'
'That's easy', thought the businessman. But he immediately realised the difficulty of remembering the Three Jewels at the time of death. 'How might I always keep the Three Jewels in my mind', he wondered. Then, he realised that he could name his sons Buddha, Dhamma, and Sangha. That way, he will be able to remember the Three Jewels. When his sons are by his deathbed he would be able to recall the Three Jewels.
And so, the businessman went about his usual ways. His business grew and towards the end of his life, he had three factories which were overseen by his sons, Buddha, Dhamma, and Sangha. To be sure that he accrued good merits, he would always make huge donations to the local monastery and indeed he always made sure that everyone knew of his generosity towards the local sangha.
The day eventually came when the businessman laid in his bed, weakened by sickness, soon to breathe his last breath. And as he had imagined, his three sons were there.
'Ah...good, good', he thought to himself. 'I've had a good life. The family business is bigger than what my father bequeathed me. I have donated huge sums of money to the local sangha. I must have accrued enough merits. I can go in peace'. Remembering the advice of the Bhante he spoke to years ago, he gazed upon his sons, and uttered in turn, 'Buddha... Dhamma.... Sangha'. But upon uttering those three words, a thought arose in his mind and he exclaimed, 'If all three of you are here, who the hell is looking after the factories.' And of course at the moment, he died.