2 Replies Latest reply on May 17, 2012 11:02 PM by herbet99

    binding a bean in jboss 6 (migrating from jboss 4)

    herbet99

      I used a bean in jboss 4 that was in it's own jar. This jar was deployed in WEB-INF subdirectory. With jboss 6, it is not binding the bean. I've tried putting the jar in several different directories without success. Below is the ejb descriptor. Any suggestions would be appreciated.

       

      <?xml version="1.0" encoding="UTF-8"?>
      <ejb-jar xmlns="http://java.sun.com/xml/ns/j2ee" version="2.1"
          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">

        <display-name>WS Common Service</display-name>
        <enterprise-beans>
          <session>
            <display-name>WsCommonService</display-name>
            <ejb-name>WsCommonService</ejb-name>
            <local>com.rfi.webstore.core.common.ejb.WSCommonService</local>
            <ejb-class>com.rfi.webstore.core.common.ejb.WSCommonServiceBean</ejb-class>
            <session-type>Stateless</session-type>
            <transaction-type>Container</transaction-type>
          </session>
        </enterprise-beans>
      </ejb-jar>

        • 1. Re: binding a bean in jboss 6 (migrating from jboss 4)
          herbet99

          I finally got JBoss 6 to load my bean by using jboss.xml descriptor file instead of ejb-far.xml descriptor file. Althought figuring out what tags were needed in the jboss.xml file was no small task. However, I cannot get the bean to load if it is packaged in the war file. It only works if it's in the deploy directory. I'm guessing there is another, of the endless number, of xml configuration files that need some entry to prompt JBoss to load the bean. I cringe every time I have to migrate to a newer JBoss.. I wish I still was using JBoss 3

          • 2. Re: binding a bean in jboss 6 (migrating from jboss 4)
            herbet99

            Based upon the post from the EJB3 section, I've been able to load a bean deployed in a war. To do so, I had to make sure the web.xml file in the WEB-INF directory of the war used the web-app_3_0.xsd. I can't understand how I missed that.. it's so obvious. No entries needed just the schema declaration is sufficient.

             

            <?xml version="1.0" encoding="UTF-8"?>
            <web-app xmlns="http://java.sun.com/xml/ns/javaee"
                  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                  xsi:schemaLocation="http://java.sun.com/xml/ns/javaee web-app_3_0.xsd"
                  version="3.0">
                
                
            </web-app>