Hello All,

First of all Thanks for your responses. 
I would also like to say sorry since it looks like the question was not
very clear from my side. Most of the people has answered very lightly
with one line.BTW, I am not a newcomer to this technology and working
from more 3 years. So my question has a really a trivial one.
BTW, I have got so many responses from so many people and I replied
personally to most of them..since they have answered personally.
Here I am giving brief summary of them (I have drawn some time from
tight schedule...i should...so that we can help each other).
Here we go one more time :

What I want (this time it looks more improved from my side :)?
-->
We have created only server side application in our product i.e. we have
created only EJBs.
The client is going to interact with this server side application
through proxy. Proxy will interanally make a JNDI call to proper server
side objects. We provide API(proxy) for communicationg with server side
components.

CLIENTS:  Client can be a web based i.e. browswer or it can be
standalone Java application...in broad sense client can be any one. We
don't have to worry since it is always using proxy API.

What is the problem?
We want to keep track of all the users logged in the system...keeping
track on server side.
So we want something(some object) which can be accessed by any EJBs in
any cluster. It is same like ServletContext object in Servlet. We want
some object which is available on application level.

What we want to achieve?
We want to keep track of all the users logged in. So whenever the user
logs in, we will make this entry in Application wise object. So for each
new request, we will check, by using this object, whether user has
logged in or not. So basically we want to keep all users in one
place..we want to keep session ID of all the users in one place.

There should be only one instance of this object across the application.
It should work in cluster enviornment.

What suggestion I got and my view on the same?
1. Use Statefuls session bean --> Can't serve my purpose. StatefulSB is
reserved by a client and it is not Application level.

2. Use Singletone object --> Will not going to work in cluster
enviornment.

3. Use JNDI object (This solution looks feasible for me :) Thanks to
Ashu for the same.)
        1. Create your own object with the data that you want to share
across the users. 
        2. Register this object in the JNDI tree of the application
server.
        3. By registering the object, your data will be available across
the cluster.
        4. Lookup for the object whenever you application needs the
data.
        5. Just think of the object as one whose reference is shared
across the application server. You will need to make it
thread-safe.

Waiting for all REPLIES.

Thanks and Regards,
Saidas Kottawar

-----Original Message-----
From: Aashish Kaushik [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 10, 2003 9:21 AM
To: [EMAIL PROTECTED]
Subject: Re: Mainitaining Session in Application Server


Hi ,
This will not work for a clustered Environment.
 
Regards,
Aashish

        -----Original Message----- 
        From: A mailing list for Enterprise JavaBeans development on
behalf of Saravana 
        Sent: Tue 09/12/2003 17:41 
        To: [EMAIL PROTECTED] 
        Cc: 
        Subject: Re: Mainitaining Session in Application Server
        
        
         
        Create a Singleton Class and store the clients data in a hashmap
which will be available to all the ejb components.
         
         

                ----- Original Message ----- 
                From: [EMAIL PROTECTED] 
                To: [EMAIL PROTECTED] 
                Sent: Tuesday, December 09, 2003 4:16 PM
                Subject: RE: Mainitaining Session in Application Server

                Hey Saravan,
                You exactly pointed out what i am looking for.
                 
                
                I agree with your suggesion. That is the one of the
solution. But the scenario is like this, everytime the user makes the
request we check wheter the user is valid or not. For each request we
check the session exist for this user or not. If we put this information
in DB, then it will make a huge impact on performance since database
operation is very costly. What do you think?

                        -----Original Message-----
                        From: Saravana
[mailto:[EMAIL PROTECTED] 
                        Sent: Tuesday, December 09, 2003 4:16 PM
                        To: Saidas Kottawar
                        Subject: Re: Mainitaining Session in Application
Server
                        
                        
                         
                        As per my knowledge, the spec does not support
that. 
                        You are looking for something which is
equivalent to ServletContext in WebContainer.
                        I think if u create a UID in database with a key
and value and store the 
                        client's state information and use it as
required. Hopefully this may serve ur purpose.
                         

                                ----- Original Message ----- 
                                From: [EMAIL PROTECTED] 
                                To: [EMAIL PROTECTED] 
                                Sent: Tuesday, December 09, 2003 3:35 PM
                                Subject: RE: Mainitaining Session in
Application Server

                                Hey Saravana,
                                 
                                Thanks for Reply. There is one catch, as
per my knowledge the Stateful bean is for each client specific. It does
not share information for multiple clients (EJB clients). I want a
single place where i can put the information about session for all users
and then i can check whether the user has proper session created or not.
                                i want One bean for Multiple users for
storing the shared information and that work in cluster.
                                - Saidas

                                        -----Original Message-----
                                        From: Saravana
[mailto:[EMAIL PROTECTED] 
                                        Sent: Tuesday, December 09, 2003
3:30 PM
                                        To: Saidas Kottawar
                                        Subject: Re: Mainitaining
Session in Application Server
                                        
                                        
                                        Ur problem can be solved with
stateful session bean.  

                                        ----- Original Message ----- 
                                        From: Saidas Kottawar
<mailto:[EMAIL PROTECTED]>  
                                        To: [EMAIL PROTECTED] 
                                        Sent: Tuesday, December 09, 2003
2:41 PM
                                        Subject: Mainitaining Session in
Application Server


                                        Hi All, 

                                        I have one scenarion. Will
apreciate if you can give some valuable information. 
                                        We are currently working on J2EE
application and we ar only dealing with Server side components. 
                                        I want to maintain the session
information in EJBS, how can I do that i.e. I want to provide the same
functionality as HttpSession provides in Servlet.

                                        I would also like to know how it
is going to work in cluster enviorment. 

                                        Thanks in advance. 

                                        Regards, 
                                        Saidas Kottawar 

                                        
                                        
                                        MASTEK
                                        "Making a valuable difference"
                                        Mastek in NASSCOM's 'India Top
20' Software Service Exporters List.
                                        In the US, we're called MAJESCO
                                        
        
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                        Opinions expressed in this
e-mail are those of the individual and not that of Mastek Limited,
unless specifically indicated to that effect. Mastek Limited does not
accept any responsibility or liability for it. This e-mail and
attachments (if any) transmitted with it are confidential and/or
privileged and solely for the use of the intended person or entity to
which it is addressed. Any review, re-transmission, dissemination or
other use of or taking of any action in reliance upon this information
by persons or entities other than the intended recipient is prohibited.
This e-mail and its attachments have been scanned for the presence of
computer viruses. It is the responsibility of the recipient to run the
virus check on e-mails and attachments before opening them. If you have
received this e-mail in error, kindly delete this e-mail from all
computers.
        
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        
========================================================================
=== To unsubscribe, send email to [EMAIL PROTECTED] and include in
the body of the message "signoff EJB-INTEREST". For general help, send
email to [EMAIL PROTECTED] and include in the body of the message
"help". 

                                        

========================================================================
=== To unsubscribe, send email to [EMAIL PROTECTED] and include in
the body of the message "signoff EJB-INTEREST". For general help, send
email to [EMAIL PROTECTED] and include in the body of the message
"help". 

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to