facebook

[Closed] ‘ejb/’ added to COMP_NAME but deploys at JNDI root

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

  1. MyEclipse IDE
  2.  > 
  3. Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #254030 Reply

    Lance Drake
    Member

    Hi Eclipse Folks

    Using the JBoss jmxConsole to see what’s going on I see :

    My STATELESS SESSION BEAN reference =

    Global JNDI Namespace

     +- EmployeeTicketsControllerLocal (proxy: $Proxy1186 implements interface com.jcm.tickets.interfaces.EmployeeTicketsControllerLocalHome)
    

    The various ENTITY EJB references for my project are:

     +- ejb (class: org.jnp.interfaces.NamingContext)
      |   +- Trident (proxy: $Proxy1191 implements interface com.jcm.table.trident.interfaces.TridentHome,interface javax.ejb.Handle)
      |   +- EmployeeTicketLocalHome (proxy: $Proxy1183 implements interface com.jcm.tickets.interfaces.EmployeeTicketBeanLocalHome)
      |   +- TridentExceptionsLocalHome (proxy: $Proxy1182 implements interface com.jcm.table.trident.interfaces.TridentExceptionsLocalHome)
      |   +- TridentLocalHome (proxy: $Proxy1181 implements interface com.jcm.table.trident.interfaces.TridentLocalHome)
      |   +- EmployeeTicketBean (proxy: $Proxy1195 implements interface com.jcm.tickets.interfaces.EmployeeTicketBeanHome,interface javax.ejb.Handle)

    The JAVADOC in my source =

    /**
     * 
     * @ejb.bean name="EmployeeTicketsController"
     *           display-name="Name for EmployeeTicketsController"
     *           description="Description for EmployeeTicketsController"
     *           local-jndi-name="EmployeeTicketsControllerLocal"
     *           type="Stateless"
     *           view-type="local"
     */

    HOWEVER… the COMP_NAME created in the ‘Local home interface for EmployeeTicketsController’ file is:

      public static final String COMP_NAME="java:comp/env/ejb/EmployeeTicketsControllerLocal";
      public static final String JNDI_NAME="EmployeeTicketsControllerLocal";
    

    Then the UTIL file calls getLocalHome with these args:

    com.jcm.tickets.interfaces.EmployeeTicketsControllerLocalHome) lookupHome(null, com.jcm.tickets.interfaces.EmployeeTicketsControllerLocalHome.COMP_NAME, com.jcm.tickets.interfaces.EmployeeTicketsControllerLocalHome.class);

    The result is a an error which indicates:

    javax.naming.NameNotFoundException: ejb not bound

    QUESTION: How is it the ‘ejb/’ path element gets added into the mix for the bean – and/or why does the Stateless Session Bean not get deposited into the jndi ‘ejb’ level but rather just sits out at the root level?

    Better yet – what should I be doing differently to get the desired/correct COMP_NAME reference?

    Thank you!

    #254032

    Lance Drake
    Member

    OK – I got it.

    Adding the line

    @ejb.util generate="physical" 

    to the JAVADOC header causes the getLocalHome() call in the UTIL object to be made using the JNDI name versus the COMP_NAME variable.

    OK! onto the NEXT exception!

    Thanks!

    (Here’s hoping this info helps somebody else struggling with the same time-hole of a problem!)

    #254072

    Scott Anderson
    Participant

    Lance,

    Thanks for posting this. The vagaries of XDoclet elude us all at times. Here’s hoping this helps someone else.

Viewing 3 posts - 1 through 3 (of 3 total)
Reply To: [Closed] ‘ejb/’ added to COMP_NAME but deploys at JNDI root

You must be logged in to post in the forum log in