6 Replies Latest reply on Dec 11, 2002 8:28 PM by Gayathri Vidyasankar

    Local Interface question

    stevek Newbie

      I looked at many messages, but still cannot find the answer. I want to use the local interface on a session bean from within a JSP. I did not modify ejb-jar.xml or jboss.xml. I only tried to modify jboss-web.xml and web.xml and here they are:

      web.xml:
      --------
      <ejb-local-ref>
      <ejb-ref-name>ejb/webtest/TestSessionLocal</ejb-ref-name>
      <ejb-ref-type>Session</ejb-ref-type>
      <local-home>test.interfaces.TestSessionLocalHome</local-home>
      test.interfaces.TestSessionLocal
      <ejb-link>ejb/test/TestSessionLocal</ejb-link>
      </ejb-local-ref>

      note: the data within <ejb-link> came from my ejb-jar.xml where the session bean is defined.

      jboss-web.xml :
      ---------------
      <ejb-ref>
      <ejb-ref-name>ejb/webtest/TestSessionLocal</ejb-ref-name>
      <jndi-name>ejb/test/TestSessionLocal</jndi-name>
      </ejb-ref>

      index.jsp:
      ----------
      TestSessionLocalHome localHome = (TestSessionLocalHome) lContext.lookup(
      "java:comp/env/ejb/webtest/TestSessionLocal"


      error when deployed:
      --------------------
      target not found, add valid ejb-link

      NOTES:
      ------

      you may recognize this code since I grabbed it from the template provided by JBOSS. I am just trying to add a local interface to the TestSession bean and use it within index.jsp.

      Thanks