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 8697289
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T01:29:20+00:00 2026-06-13T01:29:20+00:00

In our enterprise application there are Service tier (EJB3.0 including business logic and database

  • 0

In our enterprise application there are Service tier (EJB3.0 including business logic and database access) and Web tier (Servlet/JSP).
Seperated ear and war are deployed in JBoss AS 7 in distributed machines.

Service tier contains both Stateful and Stateless EJB.

We have EJB interceptor for methods invoking. For user that logged in from the Web tier the user info is saved in HttpSession (user validation is simply processed by query his account & password in DB).

Now the performance tuning needs to know which user has called those EJB methods, the user info, date info etc. These will
be extracted and logged or stored in DB for our anylize.

Now my question is:

How to distinguish the caller’s info in EJB tier?

The EJB interceptor can get the EJB method’s parameters and when it’s called. But we don’t know who has called it.

We know it’s ugly to combine EJB tier with Web tier. So we won’t pass HttpSession/HttpRequest to EJB layer even that may help to get what we need from the Session/Request object.

And there are so many EJB methods that we can not pass an TuningInfo(include request info, user info etc) as parameter from web to every EJB method.

Is it possible to get the caller’s info in EJB tier?

Thanks in advance.

  • 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-13T01:29:21+00:00Added an answer on June 13, 2026 at 1:29 am

    If Web layer and EJB layer is on the same JVM, the you can pass the user information via thread local.
    http://javacodesamples.wordpress.com/2012/07/11/understanding-the-concept-behind-threadlocal/

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

Sidebar

Related Questions

I'm currently working on implementing enterprise authentication mechanisms in our Java web-application, including single
I need to chose a web ui framework for our private intranet enterprise application
In our enterprise application we need to attach files to a document. We have
Does Adobe recommend we use Flex or HTML5 for our enterprise application development? In
Our application is a Java-GWT application that uses Guice-Persist and Guice-Servlet extensively. We have
I am working on an enterprise system that will utilise a RESTful web service
I am thinking/evaluating of using RavenDB for the enterprise application our company is planning
Our current enterprise solution is a ASP.NET MVC application driven by the Entity Framework.
At the moment we use glassfish 3.1 as application server for our enterprise application.
The base of our enterprise application is OSGI and we have several Java projects

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.