Ans inline:

> Hello everyone
>
> I'm developing standard web application with servlets/JSP and EJBs
> (stateless and stateful).
> I have utility class that creates EJB and store remote interface to client
> session (HttpSession).
> This is sample code:
>
>         Object objref = initialContext.lookup(JNDINames.LOGIN_EJBHOME);
>       LoginHome loginHome = (LoginHome)
> PortableRemoteObject.narrow(objref,LoginHome.class);
>       loginRemote = loginHome.create( (String)
> session.getAttribute(Keys.jmbag)
>                                      , (UserData)
> session.getAttribute(Keys.userData) );
>       session.setAttribute(Keys.LoginRemoteKey,loginRemote);
>
> I'm not sure if this is right way to store references to EJBs (maybe some
> pooling problems etc.?).

Yes , this is the right way. I cannot think of better alternative than this.
How ever you should be prepared to handle the situation in case your
session(http) is destroyed/times out. You  will lose all the work done
through remote handle of session bean.


> Should I store handles or should I do something else?
> Any suggestions or links?
Not needed. It will be more of overhead. reading and writing the handle.

>
> Thanks in advance!
>
> Denis Kranjcec
>
>
===========================================================================
> 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