What you are reffering to is called a mu'tah marriage. It is a temporary marriage of convinience. However, this type of marriage was declared haram/unlawful by the Rasulullah (saw). It is no longer allowed. In the unfortunate event that he should be without his wife for an unreasonable amount of time, he may be able to take another wife depending on the surrounding circumstances. If it's way too long he may consider divorcing his wife so that she will be released from him. Like in the case of extended incarcerations. If a husband will be locked up for let's say the next 15 years the wife is not obliged to stay married to him. The reason is that by default he is not seeing to the fulfillment of her rights to be taken care of etc, regardless of the fact that it's beyond his control.
All this will be highly circumstantial though, and each individual case would have to be considered. The mu'tah marriage is forbidden in all cases though. There is no circumstance to my knowledge that allows it.