Hello Bill,

I think that the goal was more to have something like this:

HttpSession session = home.findByPrimaryKey(sessionId);

byte[] state = session.getState ();

        // here Julian do whatever he wants with its state...
        // if he wants, he could convert its state in an Hashtable
        ...
        // and later

session.setState (state);

Cheers,


                                Sacha


> -----Message d'origine-----
> De : [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]De la part de Bill
> Burke
> Envoy� : vendredi, 28 d�cembre 2001 06:38
> � : [EMAIL PROTECTED]
> Objet : [JBoss-dev] can't use EJBs for HttpSessions.
>
>
> I'm not sure you can use an EntityBean or any type of EJB for
> that matter to
> implement HttpSessions.  Maybe I'm getting too religious here (meaning too
> EJB spec oriented), but EJB semantics require that input parameters and
> return parameters be serialized(copied).  Sure, JBoss doesn't do this by
> default, but maybe some users turn off this optimization to be EJB Spec
> compliant.  Why is this a problem?  Consider that HttpSession is
> implemented
> as an EntityBean.
>
> You do:
>
> HttpSession session = home.findByPrimaryKey(sessionId);
> ...
>
> Then in user code:
>
> Object attr = session.getAttribute("some attribute");
>
> attr.setSomeValue("foobar");
>
>
> Now, if HttpSession is implemented as an EntityBean, or SFSB, and
> optimization was turned off, the attribute would not be changed within the
> HttpSession.


_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to