Announcement Announcement Module
No announcement yet.
@Async and heaving DB based Logging Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • @Async and heaving DB based Logging

    Our Spring and JSP based portlet web application performs heavy logging for audinting purpose. It logs access to all views and action (button/link click). There could be 200-300 concurent users of application. Logs are written to database.

    To optimize the performance, we want to make logging activity Async and using separate connection pool.

    Initially we thought of using ActiveMQ for this however it seems overkill for only logging purpose. I think @Async can serve our purpose. Our logging calls needs to be void but on failure these can write to file system instead of DB.

    Could someone share experience of using @Async in above scenario? Do you see any potential issue with above apparoach?

    Thanks for your time.

  • #2
    If your app crashes you loose your audit trail... @Async is in memory a JMS queue is persistent and thus safer to use, if your application crashes it still is there and will be processed after the app comes up again.


    • #3
      Thanks for clearing things. I will prefer the proper JMS queue solution. However method to add item in queue itself can be @Async.