People who live longest tend to be those who look on the bright side of life, research has shown.
Scientists in the United States who studied 243 centenarians found that, far from being mean-spirited and world-weary, most were cheerful, outgoing and sociable.
The positive personality traits may in part be genetically based, the researchers believe.
The study was part of the Longevity Genes Project investigating more than 500 Ashkenazi Jews over the age of 95, and 700 of their offspring.
Ashkenazi Jews, from eastern Europe, are good candidates for gene studies because they are genetically similar.
Lead scientist Nir Barzilai, director of the Albert Einstein College of Medicine's Institute for Aging Research in New York, said: "When I started working with centenarians, I thought we'd find that they survived so long in part because they were mean and ornery. But when we assessed the personalities of these 243 centenarians, we found qualities that clearly reflect a positive attitude towards life.
"Most were outgoing, optimistic and easygoing. They considered laughter an important part of life and had a large social network. They expressed emotions openly rather than bottling them up."
Tests showed that the study group, who had an average age of 97.6 and were three-quarters women, had lower "neurotic personality" scores than a representative sample of the general population. They also had higher scores for being conscientious.
The findings were published in the latest online edition of the journal Aging.
Dr Barzilai said the findings "suggest that centenarians share particular personality traits and that genetically based aspects of personality may play an important role in achieving both good health and exceptional longevity".
Previous research on longevity has focused on physiological traits such as naturally high levels of high density lipoprotein (HDL) or "good" cholesterol.