I am having issue with this, as i get into some exception, and i will called log4j to log the error. But all of them are rolled back. Any idea? or any alternative ways to do this?
Thanks.
Your log database and transactional database are the same? That's not a pattern I'd recommend.
Sounds like the log4j logging is using the same data source and transaction as your business logic. Try setting up a separate data source for the log4j database appender - that way it can't participate in any transaction for the rest of the system.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.