This study is conducted at the inpatient wards of National Cheng Kung University Hospital, a tertiary health care center in Tainan, and Kaohsiung Medical University Hospital in Kaohsiung City, Taiwan. All participants give written informed consent before enrollment. Each enrolled patient receives an 80 mg loading dose of intravenous esomeprazole (Nexium®, AstraZeneca AB, Södertälje, Sweden) immediately after achieving haemostasis by gastroscopy. Patients then receive a 3-day continuous high-dose (8 mg/h) esomeprazole infusion and then receive 40 mg oral esomeprazole twice daily for 11 days and once daily for following 98 days. The total duration of intravenous and oral esomeprazole is 16 weeks. After gastroscopy to confirm enrollment eligibility and ulcer healed, all patients are assessed using the Rockall risk scoring system at the primary endoscopy. Patients with Rockall scores ≥ 6 are randomized into the double-dose (D) group or the single-dose (S) group following simple randomization procedures with a 1:1 allocation ratio according to the result by the investigator who draw an envelope from a large box of sealed envelopes each containing a written code designating the D group or the S group. Patients in the D group and S groups receive 20 mg oral esomeprazole twice daily or once daily for 36 weeks, respectively. The cohort control group includes patients from a previous study who had peptic ulcer bleeding and Rockall scores ≥ 6 but who did not receive esomeprazole or other proton pump inhibitors after 16-week proton pump inhibitor treatment.

One investigator generates the random allocation sequence and enrolls the participants and a different investigator assigns participants to interventions. The endoscopists and staff who check hemoglobin levels, hemodynamic status, melena, hematochezia or the aspirates through a nasogastric tube are blinded to the study group allocation. All enrolled patients are included in the intention-to-treat (ITT) analysis, but patients who are lost to follow-up, discontinued intervention because of adverse events, have a protocol violation or die are excluded from the per-protocol (PP) analysis of the primary endpoint.

The range of co-morbidities evaluated by the Rockall scores include disseminated malignant diseases, liver disease (liver cirrhosis, Child-Pugh A, B, or C), renal disease (end-stage renal disease, chronic kidney disease or acute kidney injury with estimated glomerular filtration rates \<30 ml/min \[a score of 3 for co-morbidity\], or between 30 ml/min and 60 ml/min \[a score of 2 for co-morbidity\]), heart disease (congestive heart failure, New York Heart Association Function I to IV or coronary artery disease). Other serious co-morbidities include lung disease (chronic obstructive pulmonary disease, pulmonary tuberculosis, pneumonia or empyema), rheumatoid arthritis, sepsis, new onset cerebrovascular accident or recent history of any major surgery (on the thorax, abdomen, central nervous system, long bones or spinal bones) requiring general anesthesia within 14 days before bleeding.

The estimated rebleeding rate within 12 months in the cohort control group is about 15% based on the previous study. The investigators want to be able to detect a difference between the cohort control group and the D group, in which the rebleeding rate is proposed to be 2%, equal to patients with H. pylori ulcers after eradication. The ratio of the patient number in each experiment group (the D group and the S group) to the patient number in the control group is 2:5. With a two-side α value of 0.05 and power of 80% (β=0.20), the total number of patients required is 54 in each experiment group and 135 in the control to detect a difference between the two groups. Assuming the rate of loss follow-up is 10%, 60 patients in each experimental group are enrolled. The investigators use a nominal 0.05 rate of the p value. Data related to baseline characteristics and end points are evaluated using the Student t test, Pearson's χ2 test or Fisher's exact test and the Mann-Whitney U test. In the survival analysis, the log-rank test is used to compare the Kaplan-Meier curves among the three study groups. All tests are two-tailed and p values of less than 0.05 indicate significant differences.