2 Replies Latest reply on Feb 11, 2005 2:35 PM by Joseph Swiderski

    Tomcat & JBoss EJB question

    Joseph Swiderski Newbie

      CAN SOMEBODY TELL ME WHY objRef IS NULL?

      Configuration
      Tomcat 5.0.28 single instance running outside of JBOSS on 8080
      + Web application running on this instance
      + This is the EJB client
      JBoss 4.0.1 running with Tomcat on 9090

      InitialContext ic = new InitialContext();
      Object objRef = ic.lookup("java:comp/env/FirmBean");
      


      ejb-jar.xml
      <?xml version="1.0" encoding="UTF-8" ?>
      <ejb-jar
       xmlns="http://java.sun.com/xml/ns/j2ee"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
       http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd"
       version="2.1">
       <enterprise-beans>
       <session>
       <ejb-name>FirmBean</ejb-name>
       <home>com.q4i.wealth.ejb.FirmHome</home>
       <remote>com.q4i.wealth.ejb.FirmRemote</remote>
       <ejb-class>com.q4i.wealth.ejb.FirmBean</ejb-class>
       <session-type>Stateless</session-type>
       <transaction-type>Container</transaction-type>
       </session>
       </enterprise-beans>
       <assembly-descriptor>
       </assembly-descriptor>
      </ejb-jar>
      


      application.xml
      <?xml version="1.0"?>
      <!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.2//EN" "http://java.sun.com/j2ee/dtds/application_1_2.dtd">
      
      <application>
       <display-name>Wealth_Management_EJB</display-name>
       <module>
       <ejb>wealth-ejb.jar</ejb>
       </module>
      </application>
      


      wealth.xml located in C:\jakarta-tomcat-5.0.28\conf\Catalina\localhost
      <Ejb name="FirmBean"
      type="Session"
      home="com.q4i.wealth.ejb.FirmHome"
      remote="com.q4i.wealth.ejb.FirmRemote"/>
      
      <ResourceParams name="FirmBean">
      <parameter>
      <name>java.naming.factory.initial</name>
      <value>org.jnp.interfaces.NamingContextFactory</value>
      </parameter>
      <parameter>
      <name>java.naming.provider.url</name>
      <value>jnp://localhost:1099</value>
      </parameter>
      <parameter>
      <name>java.naming.factory.url.pkgs</name>
      <value>org.jboss.naming:org.jnp.interfaces</value>
      </parameter>
      </ResourceParams>
      


      web.xml
       <ejb-ref>
       <ejb-ref-name>FirmBean</ejb-ref-name>
       <ejb-ref-type>Session</ejb-ref-type>
       <home>com.q4i.wealth.ejb.FirmHome</home>
       <remote>com.q4i.wealth.ejb.FirmRemote</remote>
       </ejb-ref>