facebook

[Closed]Calling EJB-Method from WebModule

💡
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 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #242340 Reply

    Hi,
    I’m new at myEclispe and J2EE. Here is my problem:
    I created a simple Enterprise Application Project with an EJB and WEB-Project using JSF. The EJB contains only a class that validates an user login. I developed a TestClient within the EJB and everthing works fine. Now I’m going to call this validateClass from my WEB Module. The result is an Error message from the AppServer (JBoss 4.0): “… ValidateLoginHome not bound…”. I see that in my web.xml should be an entry for the JNDI name, but there are only some entries for JSF as shown below.

    So, what can I do to solve this problem and what is the best practise to solve such problems.

    Best wishes from Cologne
    Michael

    <?xml version=”1.0″ encoding=”UTF-8″?>
    <web-app xmlns=”http://java.sun.com/xml/ns/j2ee&#8221; xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance&#8221; version=”2.4″ xsi:schemaLocation=”http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd”&gt;
    <context-param>
    <param-name>javax.faces.CONFIG_FILES</param-name>
    <param-value>/WEB-INF/faces-config.xml</param-value>
    </context-param>
    <servlet>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>0</load-on-startup>
    </servlet>
    <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>*.faces</url-pattern>
    </servlet-mapping>
    </web-app>

    #242397

    Riyad Kalla
    Member

    Michael,
    Just like you said you will need to manually add a jndi reference in your web.xml file so it can find the EJB in the application server while running. MyEclipse doesn’t do this automagically at the moment.

    Also where is Cologne?

    #242426

    hi, thanks for your quick response. i just updated the web.xml as you described and everthing works fine 🙂 never heard about eau de cologne ??? 🙂

    #242429

    Riyad Kalla
    Member
    #242513

    yes it is 🙂

Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: [Closed]Calling EJB-Method from WebModule

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