Hi All,
We have a
J2EE based product that has had several production deployments.
I will describe our architecture to give you an idea to provide suggestions :
|------| |------|
|tomcat| - |JBoss |
| JVM | | JVM |
|------| |------|
| |
|----------| |-------------|
| Session | | Application |
| Database | | Database |
|----------| |-------------|
*
Tomcat JVM deployed a MVC web application, that
- creates a Session, when a user is authenticated, and persisted in a separate session database
- A typical session object has the user authentication details,
a.) logged on user,
b.) assigned role,
c.) company name etc.,
*
JBoss serves all remote functional services, used by the tomcat WEB container, via EJB Stateless session services
- Each EJB Stateless service calls several methods and functional services across application tiers
such as
calls calls calls
Stateless Session Bean A => Class A => Class B => DAO =>
JDBC calls to the DB
PROBLEM :
Given this scenario, the problem that i am facing is.
1.) How do i pass, and have access, the session object credential information from Tomcat to EJB container, with out having to pass as a parameter. Because there are hundreds of services that needs to get the signature change, if done the brute force way.
2.) Let's say, we could get the session object credential to the EJB bean in step 1.
How do i pass that information all the way through the method calls, from all the application tiers all the way through EJB to the DAO layer.
I know some people might suggest using
Thread Local variable functionality for the problem 2. But it is not advised or j2ee compliant to use threads and thread local objects in EJB container because the results are not predictable and not guaranteed to work in different J2EE application servers.
Appreciate all the help and suggestions