Servlets talk HTTP, which means they normally talk to browers.  Since
HTTP is a stateless protocol, sessions are created by sending a session
ID to the browser, either in the form of a cookie or embedded in every
link that the user may click on.

EJB sessions are completely different.  First of all, they talk
RMI(-IIOP), not HTTP.  Once you get an object stub, your connection to
that object remains persistent.

If your clients are browsers, then servlets (or better, JSP pages) make
sense.  If your clients are not browsers, then they don't.  I'm pretty
sure its that simple.

cc

Sriram Krovvidi wrote:
>
> Hi All,
> I have a design issue with to usage of servlets or EJB's.
>
> This is the scenario.
> I have two instances of app servers running say app1 and app2 each connected
> to 2 different
> databases.
>
> when the user logs in initially, (login has separate database and unique for
> both app1 and app2 )
>   1. user is validated
>   2. IP and the port where the app server is running are taken from the dB.
>   3. the his user name is put in a session
>
> Once the user is validated, he is diverted to app1 or app2 depending on the
> IP taken
> during the login.
>
> Can the login be designed with servlets or EJBeans ?
>
> Can somebody provide their thoughts (pro and cons) of using servlets or
> EJB's while designing
> the login ?
>
> If the login is designed using EJB's , can I pass the session from one app
> server instance to
> another app server instance ?
>
> Thank You,
> -Sriram
>
> ===========================================================================
> 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