Results 1 to 3 of 3

Thread: @Async and heaving DB based Logging

  1. #1

    Default @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. #2
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,630

    Default

    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.
    Marten Deinum
    Java Consultant / Pragmatist / Open Source Enthousiast / Author


    Pro Spring MVC: With Web Flow
    Conspect

    Have you read the reference guide.
    Use the [ code ] tags, young padawan

  3. #3

    Default

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

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •