I guess what I"m really saying is that you have to be careful if you're implementing the HttpSession in terms of EJBs.
Bill > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]]On Behalf Of Bill > Burke > Sent: Friday, December 28, 2001 3:24 PM > To: Sacha Labourey; [EMAIL PROTECTED] > Subject: RE: [JBoss-dev] can't use EJBs for HttpSessions. > > > Sure you can store the HttpSession state in an EJB(Entity or > SFSB), but the > HttpSession object cannot be an EJB. > > > -----Original Message----- > > From: Sacha Labourey [mailto:[EMAIL PROTECTED]] > > Sent: Friday, December 28, 2001 4:36 AM > > To: Bill Burke; [EMAIL PROTECTED] > > Subject: RE: [JBoss-dev] can't use EJBs for HttpSessions. > > > > > > 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 > _______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
