Caching EJB handles in clustered environments - Weblogic

This is a discussion on Caching EJB handles in clustered environments - Weblogic ; Hi, I have a question about caching EJB handles in clustered environments. As in a cluster, http sessions do get replicated, we are not sure whether we should cache ejb home, ejb remote or the ejb handle in the http ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: Caching EJB handles in clustered environments

  1. Caching EJB handles in clustered environments


    Hi,

    I have a question about caching EJB handles in clustered environments. As in a
    cluster, http sessions do get replicated, we are not sure whether we should cache
    ejb home, ejb remote or the ejb handle in the http session.

    Furthermore it would be interesting to know whether weblogic creates the ejb preferably
    in the same node as the servlet lives? What happens if the load balancer directs
    the next request to a different node of the server, will we reference the previous
    node if we cache the ejb handle?

    Are there differences in this behaviour between stateful or stateless ejbs?

    Thanks

    Juerg

  2. Re: Caching EJB handles in clustered environments

    handles seem right thing to cache. I wouldn't cache ejb home or ejb
    remote...

    "Juerg Staub" wrote in message
    news:403490fd@newsgroups.bea.com...
    >
    > Hi,
    >
    > I have a question about caching EJB handles in clustered environments. As

    in a
    > cluster, http sessions do get replicated, we are not sure whether we

    should cache
    > ejb home, ejb remote or the ejb handle in the http session.
    >
    > Furthermore it would be interesting to know whether weblogic creates the

    ejb preferably
    > in the same node as the servlet lives? What happens if the load balancer

    directs
    > the next request to a different node of the server, will we reference the

    previous
    > node if we cache the ejb handle?
    >
    > Are there differences in this behaviour between stateful or stateless

    ejbs?
    >
    > Thanks
    >
    > Juerg




  3. Re: Caching EJB handles in clustered environments


    Hi

    I am facing problems in clustering of stateful beans. Following id the scenario:

    I have got two managed servers (A and B )and one admin server.

    Letís say my request for a stateful bean goes to server A. I first create an instance
    of stateful bean. I get Handle from remote object and keep the handle in session.
    After this Sever A goes down. Now all the requests are redirected to sever B.
    On server B I fetch Handle from session and the call getEJBObject() method on
    it. I get following error:

    ---Unable to locate EJBHome: BeanHome' on server: 't3://IP: PORT (A). It appears
    as if handle tries to look for the home object on the server A which is down

    Could you please help me out with this?

    "Juerg Staub" wrote:
    >
    >Hi,
    >
    >I have a question about caching EJB handles in clustered environments.
    >As in a
    >cluster, http sessions do get replicated, we are not sure whether we
    >should cache
    >ejb home, ejb remote or the ejb handle in the http session.
    >
    >Furthermore it would be interesting to know whether weblogic creates
    >the ejb preferably
    >in the same node as the servlet lives? What happens if the load balancer
    >directs
    >the next request to a different node of the server, will we reference
    >the previous
    >node if we cache the ejb handle?
    >
    >Are there differences in this behaviour between stateful or stateless
    >ejbs?
    >
    >Thanks
    >
    >Juerg



  4. Re: Caching EJB handles in clustered environments

    Make sure you specify stateful-session-clustering and replication-type in
    weblogic-ejb-jar.xml file...

    "Rajesh Kumar" wrote in message
    news:403f5087$1@newsgroups.bea.com...
    >
    > Hi
    >
    > I am facing problems in clustering of stateful beans. Following id the

    scenario:
    >
    > I have got two managed servers (A and B )and one admin server.
    >
    > Letís say my request for a stateful bean goes to server A. I first create

    an instance
    > of stateful bean. I get Handle from remote object and keep the handle in

    session.
    > After this Sever A goes down. Now all the requests are redirected to

    sever B.
    > On server B I fetch Handle from session and the call getEJBObject() method

    on
    > it. I get following error:
    >
    > ---Unable to locate EJBHome: BeanHome' on server: 't3://IP: PORT (A). It

    appears
    > as if handle tries to look for the home object on the server A which is

    down
    >
    > Could you please help me out with this?
    >
    > "Juerg Staub" wrote:
    > >
    > >Hi,
    > >
    > >I have a question about caching EJB handles in clustered environments.
    > >As in a
    > >cluster, http sessions do get replicated, we are not sure whether we
    > >should cache
    > >ejb home, ejb remote or the ejb handle in the http session.
    > >
    > >Furthermore it would be interesting to know whether weblogic creates
    > >the ejb preferably
    > >in the same node as the servlet lives? What happens if the load balancer
    > >directs
    > >the next request to a different node of the server, will we reference
    > >the previous
    > >node if we cache the ejb handle?
    > >
    > >Are there differences in this behaviour between stateful or stateless
    > >ejbs?
    > >
    > >Thanks
    > >
    > >Juerg

    >




+ Reply to Thread