• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Thread priority issues

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi...

I have a problem with threads. We have a web application that has its own logging object(for logging onto a log file or to console).And if I start another threads (for eg: to constantly write incoming messages onto a file etc), for some reason, the logger is not logging messages anymore either on to the console or to the log file, but the code is getting executed.We have tomcat and weblogic running on different environments for the web application.

What could be the possible reasons for such issues. Iam not sure if the new threads are getting more priority than the original application process threads. Can anyone give any ideas for resolving this issue?

Thanks
Swapna
 
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You have not specified what kind of logging utility u r using. Is that Log4J?
Logging utilities will be designed in such a way to leverage performance benefits in web applciations. When you actually log a message using log utility's method, the method jsut takes the message and hand that over to it's internal threads and your method call(thread of execution) returns simply from that method without getting involved in doing the IO.

Your doubt may be correct : Application threads are having higher priority over Logging threads. More over just cross check your configuration settings of Logging. Logging utilities can filter log messages based on the severity and the settings defined in configuration.
 
Swapna Matetu
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Bhanu,
we are using Log4j. I checked to make sure that the new threads do not have any synchronized methods. I will check log cofiguration too.If i comment out the code that starts new threads, the application is functioning normally. But starting new threads is imperative.

Is there a way to debug such thread issues?

Thanks
Swapna.
 
Does this tiny ad smell okay to you?
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic