1 Reply Latest reply on Jul 19, 2006 5:51 AM by VisolveGroup

    ejb in jboss

    seema seema Newbie

      I am new to ejb2 and Jboss I have downloaded the Jboss 4 and created the session stateful bean in day05 folder p

      day05/SignOn.java
      / SignOnHome.java
      /SignOnEJB.java
      / InvalidLoginException.java
      / ejb-jar.xml
      /jboss.xml

      The codes of ejb-jar.xml


      <?xml version="1.0" encoding="UTF-8"?>
      
      <!DOCTYPE ejb-jar
       PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise Javabeans 2.0//EN"
       "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
      <ejb-jar>
       <enterprise-beans>
      <session>
       <ejb-name>SignOnEJB</ejb-name>
       <home>day05.SignOnHome</home>
       <remote>day05.SignOn</remote>
      <ejb-class>day05.SignOnEJB</ejb-class>
      <session-type>Stateless</session-type>
      <transaction-type>Container</transaction-type>
      <env-entry>
       <env-entry-name>student</env-entry-name>
      <env-entry-type>java.lang.String</env-entry-type>
      <env-entry-value>password</env-entry-value>
      </env-entry>
      <env-entry>
       <env-entry-name>student1</env-entry-name>
      <env-entry-type>java.lang.String</env-entry-type>
      <env-entry-value>password1</env-entry-value>
      </env-entry>
      </session>
      
      </enterprise-beans>
      
      </ejb-jar>


      the codes for jboss.xml
      <?xml version="1.0" encoding = UTF-8" ?>
      
      <jboss>
      
       <enterprise-beans>
      <session>
       <ejb-name>SignOnEJB</ejb-name>
       <jndi-name>day05/SignOnHome</jndi-name>
      </session>
      </enterprise-beans>
      
      </jboss>
      


      I dont know how to deploy in jboss Can anybody guide me step by step?



        • 1. Re: ejb in jboss
          VisolveGroup Novice

          Hello,

          Create the jar file with the following structure.

          <package1>/<class files>
          <package2>/<class files>
          ..
          META-INF/ejb-jar.xml
          META-INF/jboss.xml

          In your case the jar file structure,

          day05/SignOn.java
          day05/SignOnHome.java
          day05/SignOnEJB.java
          day05/InvalidLoginException.java
          META-INF/ejb-jar.xml
          META-INF/jboss.xml

          Hope this might solve your problem.