BlueGrey
calm
Elegant
Català-Valencià – Catalan
中文 – Chinese (Simplified)
中文 – Chinese (Traditional)
Česky – Czech
Dansk – Danish
Nederlands – Dutch
English – English
Suomi – Finnish
Français – French
Deutsch – German
עברית – Hebrew
हिंदी – Hindi
Magyar – Hungarian
Bahasa Indonesia – Indonesian
Italiano – Italian
日本語 – Japanese
한국어 – Korean
Македонски – Macedonian
मराठी – Marathi
Norsk – Norwegian
Polski – Polish
Português – Portuguese
Português – Portuguese (Brazil)
Русский – Russian
Slovenčina – Slovak
Slovenščina – Slovenian
Español – Spanish
Svenska – Swedish
Türkçe – Turkish
Українська – Ukrainian
Oëzbekcha – Uzbek
Subversion Repositories
SmartDukaan
(root)
/
trunk
/
profitmandi-dao
/
src
/
main
/
java
/
com
/
spice
/
profitmandi
/
dao
/
entity
/
mail
/
MailOutbox.java
– Rev 37361
Rev
Show changed files
|
Details
|
Compare with Previous
|
Blame
|
RSS feed
Filtering Options
From rev
To rev
Max revs
Search history for
Show All
Rev
Age
Author
Path
Log message
Diff
37361
48 d 2 h
amit
/trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/
Mail outbox: one transaction per mail, retry once more, stable Message-ID
processPendingMails ran the whole batch in a single REQUIRES_NEW transaction, so a
crash mid-batch rolled back the status of every mail already delivered in that cycle
and the next run re-sent them.
- Split into selectPendingIds (read-only) plus sendOne per mail, each REQUIRES_NEW via
a @Lazy self-reference so the proxy actually applies. Outcome is committed as soon
as it is known; a crash now loses at most the mail in flight.
- MailOutbox.selectPending retries FAILED rows once more (retryCount < 2).
- Stable per-row Message-ID so a retry arrives as the same message and the receiving
server can collapse it instead of showing a duplicate.
36250
177 d 15 h
amit
/trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/
Sender-type-aware mail cleanup: 6 months for SendGrid/Relay, 1 month for Google SMTP
35956
213 d 10 h
amit
/trunk/profitmandi-dao/src/main/
Mail outbox pattern: persist mail in transaction, send async after commit. Fixes lock contention between /cancelOrder and /om/addBillingDetailsForGrouppedOrders caused by SMTP calls inside transactions holding DB locks.