Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8086745
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T18:32:50+00:00 2026-06-05T18:32:50+00:00

Can different EJBs deployed on the same container and works synchronously write their application

  • 0

Can different EJBs deployed on the same container and works synchronously
write their application logs on the same .log file without any risk,
on the condition that they all use the same log4j.xml and the same FileAppender.

I confirmed it works out on my desktop,
but what if these EJBs are under high-loader operation?
Should I concern about file locking or delay issue?

Sincerely,

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T18:32:51+00:00Added an answer on June 5, 2026 at 6:32 pm

    Yes, multiple EJBs in the same application server instance can write to the same appender. They are part of one JVM, and log4j is thread safe.

    It’s true that under high load you will experience delays; but that’s what log levels are for. Log as few statements as possible on important levels, be verbose on debug levels.

    Sharing the same file appender is possible (most of the time it appears to be working), but dangerous, especially with rolling policies set. You risk losing your logs this way, log4j has not been designed for this.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to write an application which has 2 EJBs. This application can run
Can two different iPhone applications share the same settings? I'm releasing two iPhone products,
I'm trying to write a script that can control different windows from different programs
Wondering if I can use different Subversion clients on the same working files or
Some Windows programs can use different icons for different files with the same extension.
Each user of our application can have different format for Date and Time. I
In our application user can create different lists (like sharepoint) for example a user
A container div.example can have different 1st-level child elements ( section , div ,
I have a property that can accept different formats as values: format1 - 2
Is there a resource that i can find different variations of searching, sorting and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.