A longtime oceanfront hotel in Ocean City is preparing to close its doors, marking the end of an era for a property that has welcomed generations of visitors.