I sent to DEV because there was a code question at the bottom.

I am mainly interested to know how to take something that
is stored in the browsers i.e a number and translate that into
a handle for a particular bean.

I was hoping that someone would have intaminate knowledge of
the Handle object and maybe provide some quidence as to
how you could serialize it to a cookie value.

Additionally, I am looking to see if there is anyway to have control
over the Handle. (i.e. If I code a mechanism to distribute my stateful
session bean across all my servers then I want them to have
the same handles.

d.

Tom Cook wrote:

> Please don't cc this sort of question to both lists - I leave it to your
> discretion as to which list future posts belong to, but it seems like a
> user question to me.
>
> The normal way would be to start an HTTP session in the servlet and that
> takes care of the session ID stuff for you.  Obviously your clustering
> isn't going to handle this, so your options go something like this:
>
>  * You could implement an RMI server which maps IDs to stateful session
> beans.
>  * You could set up one EJB server to just serve up these references.
>
> Either way, your clustering solution ought to take care of this and
> distribute sessions across the tomcat instances.
>
> Tom
>
> On Mon, 5 Mar 2001, Doug Ferguson wrote:
>
> > Hi,
> >
> > I am currently working on a project and I have one Stateful session bean
> > that contains login information,
> > so that I can query this object for my JAAS login and I also use this
> > object to cache information for a
> > particular session. I would like to store a session cookie in the users
> > browser and use this ID to lookup
> > the stateful session bean, however, I am not sure how I will map this ID
> > to a Handle object. If anyone
> > has done this or has ideas, they would be appreciated.
> >
> > One thing that slightly complicates things is that we are implementing a
> > round robin load balancing pool
> > on the apache/tomcat servers and we are also doing the same on the jBoss
> > servers. We only have one
> > bean that is Stateful and we plan on implementing some sort of
> > "make-shift clustering" So that when we
> > create a bean the bean is distrubuted across all the instances of jBoss.
> > Any ideas, here would be useful.
> >
> >
> > Also,
> >
> > From the StatefulHandleImpl.java what is the utility of the method
> > pointer to
> > an interface?
> > *******************************************************************
> >      static Method getEJBObjectMethod;
> >
> >     static {
> >         try {
> >
> >             getEJBObjectMethod =
> > Class.forName("javax.ejb.Handle").getMethod("getEJBObject", new
> > Class[0]);
> >         }
> >         catch (Exception e) {
> >             e.printStackTrace();
> >         }
> >     }
> >
> >
> >
>
> --
> "If you mess with something for long enough it will break." - Schmidt
>
> --
> --------------------------------------------------------------
> To subscribe:        [EMAIL PROTECTED]
> To unsubscribe:      [EMAIL PROTECTED]



--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]

Reply via email to