To cluster session EJBs, is global JNDI registration required? - Weblogic

This is a discussion on To cluster session EJBs, is global JNDI registration required? - Weblogic ; From: "Bryan Dixon" Sender: "Bryan Dixon" Reply-To: "Bryan Dixon" Subject: To cluster session EJBs, is global JNDI registration required? Newsgroups: weblogic.developer.interest.clustering X-User-Info: 198.70.146.244 NNTP-Posting-Host: 198.70.146.244 X-Original-NNTP-Posting-Host: 198.70.146.244 Message-ID: Date: 23 Jul 2003 12:26:52 -0700 X-Trace: newsgroups.bea.com 1058988412 198.70.146.244 (23 Jul ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: To cluster session EJBs, is global JNDI registration required?

  1. To cluster session EJBs, is global JNDI registration required?

    From: "Bryan Dixon"
    Sender: "Bryan Dixon"
    Reply-To: "Bryan Dixon"
    Subject: To cluster session EJBs, is global JNDI registration required?
    Newsgroups: weblogic.developer.interest.clustering
    X-User-Info: 198.70.146.244
    NNTP-Posting-Host: 198.70.146.244
    X-Original-NNTP-Posting-Host: 198.70.146.244
    Message-ID: <3f1ee17c@newsgroups.bea.com>
    Date: 23 Jul 2003 12:26:52 -0700
    X-Trace: newsgroups.bea.com 1058988412 198.70.146.244 (23 Jul 2003 12:26:52 -0700)
    X-Original-Trace: 23 Jul 2003 12:26:52 -0700, 198.70.146.244
    Organization: BEA NEWS SITE
    Lines: 49
    XPident: Unknown
    Path: newsgroups.bea.com!not-for-mail
    Xref: newsgroups.bea.com weblogic.developer.interest.clustering:9482


    We are using WebLogic 7 SP2.

    We currently have all of our session EJBs defined with a JNDI name in the weblogic-ejb-jar.xml
    file. Furthermore, we cache Handles to our stateful EJBs in the HttpSession after
    a session first uses a stateful EJB.

    I'm trying to change our EJB deployment to not have the global JNDI bindings and
    just use application scoped EJBs (define a ejb-ref in the web.xml file for each
    EJB). When I made this change, I'm getting a RemoteException that states we just
    have a JNDI name to use Handles (see part of stack trace at end of this posting).

    I have a couple questions about this:
    1) We will eventually have a clustered production environment. Must we do the
    JNDI registration in the weblogic-ejb-jar.xml to allow the EJBs to participate
    in a clustered EJB environment?
    2) If the answer to question 1 is no, then how can I fix this exception?

    Thanks,
    Bryan


    stack trace
    -------------

    com.mezzia.planner.exception.MezziaRuntimeExceptio n: Handled by AbstractBean.
    Original exception was: java.rmi.RemoteException. Wrapped Exception: java.rmi.RemoteException:
    Error: To support the use of Handles and HomeHandles, an EJB must be deployed
    with a JNDI name. This EJB, com.mezzia.planner.admin.AdminManager(Application:
    mezziaApp1, EJBComponent: AdminManagerEjb), was deployed without a JNDI name specified.
    To specify a JNDI name for this EJB, please add a jndi-name element to the weblogic-ejb-jar.xml
    deployment descriptor for this EJB. (Wrapped Exception-->java.rmi.RemoteException:
    Error: To support the use of Handles and HomeHandles, an EJB must be deployed
    with a JNDI name. This EJB, com.mezzia.planner.admin.AdminManager(Application:
    mezziaApp1, EJBComponent: AdminManagerEjb), was deployed without a JNDI name specified.
    To specify a JNDI name for this EJB, please add a jndi-name element to the weblogic-ejb-jar.xml
    deployment descriptor for this EJB.<-- Wrapped Exception)Stack Trace:java.rmi.RemoteException:
    Error: To support the use of Handles and HomeHandles, an EJB must be deployed
    with a JNDI name. This EJB, com.mezzia.planner.admin.AdminManager(Application:
    mezziaApp1, EJBComponent: AdminManagerEjb), was deployed without a JNDI name specified.
    To specify a JNDI name for this EJB, please add a jndi-name element to the weblogic-ejb-jar.xml
    deployment descriptor for this EJB.
    at weblogic.ejb20.internal.BaseEJBHome.getHomeHandle( BaseEJBHome.java:147)
    at weblogic.ejb20.internal.HandleImpl.(HandleImpl.jav a:150)
    at weblogic.ejb20.internal.StatefulEJBObject.getHandl e(StatefulEJBObject.java:37)
    at com.mezzia.planner.core.SessionController.getAdmin Manager(SessionController.java:180)
    at com.mezzia.planner.admin.AdminManagerWeb.getAdminM anager(AdminManagerWeb.java:51)
    at com.mezzia.planner.admin.AdminManagerWeb.getPerson (AdminManagerWeb.java:1148)


  2. Re: To cluster session EJBs, is global JNDI registration required?

    From: "Bryan Dixon"
    Sender: "Bryan Dixon"
    Reply-To: "Bryan Dixon"
    Subject: Re: To cluster session EJBs, is global JNDI registration required?
    Newsgroups: weblogic.developer.interest.clustering
    X-User-Info: 198.70.146.244
    References: <3f1ee17c@newsgroups.bea.com> <3f1f043a$1@newsgroups.bea.com>
    NNTP-Posting-Host: 198.70.146.244
    X-Original-NNTP-Posting-Host: 198.70.146.244
    Message-ID: <3f1fd76a$1@newsgroups.bea.com>
    Date: 24 Jul 2003 05:56:10 -0700
    X-Trace: newsgroups.bea.com 1059051370 198.70.146.244 (24 Jul 2003 05:56:10 -0700)
    X-Original-Trace: 24 Jul 2003 05:56:10 -0700, 198.70.146.244
    Organization: BEA NEWS SITE
    Lines: 89
    XPident: Unknown
    Path: newsgroups.bea.com!not-for-mail
    Xref: newsgroups.bea.com weblogic.developer.interest.clustering:9484


    We are currently not clustered. I just want to make sure I don't do something
    that prevents us from clustering in the future.

    Currently the only clients of our EJBs is our web application which is packaged
    with our EJBs in a single ear file. So it is all internal application (ear) access
    to our EJBs.

    Bryan


    Prasad Peddada wrote:
    >Bryan Dixon wrote:
    >> We are using WebLogic 7 SP2.
    >>
    >> We currently have all of our session EJBs defined with a JNDI name

    >in the weblogic-ejb-jar.xml
    >> file. Furthermore, we cache Handles to our stateful EJBs in the HttpSession

    >after
    >> a session first uses a stateful EJB.
    >>
    >> I'm trying to change our EJB deployment to not have the global JNDI

    >bindings and
    >> just use application scoped EJBs (define a ejb-ref in the web.xml file

    >for each
    >> EJB). When I made this change, I'm getting a RemoteException that

    >states we just
    >> have a JNDI name to use Handles (see part of stack trace at end of

    >this posting).
    >>
    >> I have a couple questions about this:
    >> 1) We will eventually have a clustered production environment. Must

    >we do the
    >> JNDI registration in the weblogic-ejb-jar.xml to allow the EJBs to

    >participate
    >> in a clustered EJB environment?
    >> 2) If the answer to question 1 is no, then how can I fix this exception?
    >>
    >> Thanks,
    >> Bryan
    >>
    >>
    >> stack trace
    >> -------------
    >>
    >> com.mezzia.planner.exception.MezziaRuntimeExceptio n: Handled by AbstractBean.
    >> Original exception was: java.rmi.RemoteException. Wrapped Exception:

    >java.rmi.RemoteException:
    >> Error: To support the use of Handles and HomeHandles, an EJB must be

    >deployed
    >> with a JNDI name. This EJB, com.mezzia.planner.admin.AdminManager(Application:
    >> mezziaApp1, EJBComponent: AdminManagerEjb), was deployed without a

    >JNDI name specified.
    >> To specify a JNDI name for this EJB, please add a jndi-name element

    >to the weblogic-ejb-jar.xml
    >> deployment descriptor for this EJB. (Wrapped Exception-->java.rmi.RemoteException:
    >> Error: To support the use of Handles and HomeHandles, an EJB must be

    >deployed
    >> with a JNDI name. This EJB, com.mezzia.planner.admin.AdminManager(Application:
    >> mezziaApp1, EJBComponent: AdminManagerEjb), was deployed without a

    >JNDI name specified.
    >> To specify a JNDI name for this EJB, please add a jndi-name element

    >to the weblogic-ejb-jar.xml
    >> deployment descriptor for this EJB.<-- Wrapped Exception)Stack Trace:java.rmi.RemoteException:
    >> Error: To support the use of Handles and HomeHandles, an EJB must be

    >deployed
    >> with a JNDI name. This EJB, com.mezzia.planner.admin.AdminManager(Application:
    >> mezziaApp1, EJBComponent: AdminManagerEjb), was deployed without a

    >JNDI name specified.
    >> To specify a JNDI name for this EJB, please add a jndi-name element

    >to the weblogic-ejb-jar.xml
    >> deployment descriptor for this EJB.
    >> at weblogic.ejb20.internal.BaseEJBHome.getHomeHandle( BaseEJBHome.java:147)
    >> at weblogic.ejb20.internal.HandleImpl.(HandleImpl.jav a:150)
    >> at weblogic.ejb20.internal.StatefulEJBObject.getHandl e(StatefulEJBObject.java:37)
    >> at com.mezzia.planner.core.SessionController.getAdmin Manager(SessionController.java:180)
    >> at com.mezzia.planner.admin.AdminManagerWeb.getAdminM anager(AdminManagerWeb.java:51)
    >> at com.mezzia.planner.admin.AdminManagerWeb.getPerson (AdminManagerWeb.java:1148)
    >>

    >
    >How does your cluster architecture look like? If you have single tier,
    >
    >then you can do without exposing ejbs in global jndi tree.
    >
    >Cheers,
    >
    >-- Prasad
    >



  3. Re: To cluster session EJBs, is global JNDI registration required?

    Bryan Dixon wrote:
    > We are currently not clustered. I just want to make sure I don't do something
    > that prevents us from clustering in the future.
    >
    > Currently the only clients of our EJBs is our web application which is packaged
    > with our EJBs in a single ear file. So it is all internal application (ear) access
    > to our EJBs.
    >
    > Bryan
    >
    >
    > Prasad Peddada wrote:
    >
    >>Bryan Dixon wrote:
    >>
    >>>We are using WebLogic 7 SP2.
    >>>
    >>>We currently have all of our session EJBs defined with a JNDI name

    >>
    >>in the weblogic-ejb-jar.xml
    >>
    >>>file. Furthermore, we cache Handles to our stateful EJBs in the HttpSession

    >>
    >>after
    >>
    >>>a session first uses a stateful EJB.
    >>>
    >>>I'm trying to change our EJB deployment to not have the global JNDI

    >>
    >>bindings and
    >>
    >>>just use application scoped EJBs (define a ejb-ref in the web.xml file

    >>
    >>for each
    >>
    >>>EJB). When I made this change, I'm getting a RemoteException that

    >>
    >>states we just
    >>
    >>>have a JNDI name to use Handles (see part of stack trace at end of

    >>
    >>this posting).
    >>
    >>>I have a couple questions about this:
    >>>1) We will eventually have a clustered production environment. Must

    >>
    >>we do the
    >>
    >>>JNDI registration in the weblogic-ejb-jar.xml to allow the EJBs to

    >>
    >>participate
    >>
    >>>in a clustered EJB environment?
    >>>2) If the answer to question 1 is no, then how can I fix this exception?
    >>>
    >>>Thanks,
    >>>Bryan
    >>>
    >>>
    >>>stack trace
    >>>-------------
    >>>
    >>>com.mezzia.planner.exception.MezziaRuntimeExceptio n: Handled by AbstractBean.
    >>> Original exception was: java.rmi.RemoteException. Wrapped Exception:

    >>
    >>java.rmi.RemoteException:
    >>
    >>>Error: To support the use of Handles and HomeHandles, an EJB must be

    >>
    >>deployed
    >>
    >>>with a JNDI name. This EJB, com.mezzia.planner.admin.AdminManager(Application:
    >>>mezziaApp1, EJBComponent: AdminManagerEjb), was deployed without a

    >>
    >>JNDI name specified.
    >>
    >>>To specify a JNDI name for this EJB, please add a jndi-name element

    >>
    >>to the weblogic-ejb-jar.xml
    >>
    >>>deployment descriptor for this EJB. (Wrapped Exception-->java.rmi.RemoteException:
    >>>Error: To support the use of Handles and HomeHandles, an EJB must be

    >>
    >>deployed
    >>
    >>>with a JNDI name. This EJB, com.mezzia.planner.admin.AdminManager(Application:
    >>>mezziaApp1, EJBComponent: AdminManagerEjb), was deployed without a

    >>
    >>JNDI name specified.
    >>
    >>>To specify a JNDI name for this EJB, please add a jndi-name element

    >>
    >>to the weblogic-ejb-jar.xml
    >>
    >>>deployment descriptor for this EJB.<-- Wrapped Exception)Stack Trace:java.rmi.RemoteException:
    >>>Error: To support the use of Handles and HomeHandles, an EJB must be

    >>
    >>deployed
    >>
    >>>with a JNDI name. This EJB, com.mezzia.planner.admin.AdminManager(Application:
    >>>mezziaApp1, EJBComponent: AdminManagerEjb), was deployed without a

    >>
    >>JNDI name specified.
    >>
    >>>To specify a JNDI name for this EJB, please add a jndi-name element

    >>
    >>to the weblogic-ejb-jar.xml
    >>
    >>>deployment descriptor for this EJB.
    >>> at weblogic.ejb20.internal.BaseEJBHome.getHomeHandle( BaseEJBHome.java:147)
    >>> at weblogic.ejb20.internal.HandleImpl.(HandleImpl.jav a:150)
    >>> at weblogic.ejb20.internal.StatefulEJBObject.getHandl e(StatefulEJBObject.java:37)
    >>> at com.mezzia.planner.core.SessionController.getAdmin Manager(SessionController.java:180)
    >>> at com.mezzia.planner.admin.AdminManagerWeb.getAdminM anager(AdminManagerWeb.java:51)
    >>> at com.mezzia.planner.admin.AdminManagerWeb.getPerson (AdminManagerWeb.java:1148)
    >>>

    >>
    >>How does your cluster architecture look like? If you have single tier,
    >>
    >>then you can do without exposing ejbs in global jndi tree.
    >>
    >>Cheers,
    >>
    >>-- Prasad
    >>

    >
    >


    Bryan,

    You can store the stub in the HTTPSession instead of storing the
    handles. Unfortunately handles have to rely on JNDI name. We could in
    theory make it work with app scoped JNDI name, but it makes to difficult
    to debug when customers run into problems.

    Out of curiosity why are you using HTTPSession and SFSB? Why not just go
    with HTTPSession

    Cheers,

    -- Prasad


+ Reply to Thread