users@glassfish.java.net

Re: Change from JEE 5 to earlier J2EE 1.4 in a web app with an EJB jar

From: <glassfish_at_javadesktop.org>
Date: Mon, 29 Dec 2008 01:03:08 PST

Hi,

I have decided to start again, but now I have problems to set the JNDI for my EJBs. In fact, I cannot deploy the web app on Glassfish v2.

This is my case. I am using three stateful session been to communicate with its respective entity bean. And the communication between then stateful session bean and the web war file is using javabeans. All is ok except the relation of the entity beans with the session bean in the ejb-jar.xml definition that is as followes,

<session>
      <ejb-name>AccountControllerEJB</ejb-name>
      <home>com.sun.ebank.ejb.account.AccountControllerHome</home>
      <remote>com.sun.ebank.ejb.account.AccountController</remote>
      <ejb-class>com.sun.ebank.ejb.account.AccountControllerBean</ejb-class>
      <session-type>Stateful</session-type>
      <transaction-type>Bean</transaction-type>
      <ejb-local-ref>
              <ejb-ref-name>AccountHome</ejb-ref-name>
              <ejb-ref-type>Entity</ejb-ref-type>
              <local-home>com.sun.ebank.ejb.account.AccountHome</local-home>
              <local>com.sun.ebank.ejb.account.Account</local>
              <ejb-link>GFDukesBank-ejb.jar#AccountControllerEJB</ejb-link>
      </ejb-local-ref>
    </session>
    <session>
      <ejb-name>CustomerControllerEJB</ejb-name>
      <home>com.sun.ebank.ejb.customer.CustomerControllerHome</home>
      <remote>com.sun.ebank.ejb.customer.CustomerController</remote>
      <ejb-class>com.sun.ebank.ejb.customer.CustomerControllerBean</ejb-class>
      <session-type>Stateful</session-type>
      <transaction-type>Bean</transaction-type>
      <ejb-local-ref>
              <ejb-ref-name>CustomerHome</ejb-ref-name>
              <ejb-ref-type>Entity</ejb-ref-type>
              <local-home>com.sun.ebank.ejb.customer.CustomerHome</local-home>
              <local>com.sun.ebank.ejb.customer.Customer</local>
              <ejb-link>GFDukesBank-ejb.jar#CustomerControllerEJB</ejb-link>
      </ejb-local-ref>
    </session>
    <session>
      <ejb-name>TxControllerEJB</ejb-name>
      <home>com.sun.ebank.ejb.tx.TxControllerHome</home>
      <remote>com.sun.ebank.ejb.tx.TxController</remote>
      <ejb-class>com.sun.ebank.ejb.tx.TxControllerBean</ejb-class>
      <session-type>Stateful</session-type>
      <transaction-type>Bean</transaction-type>
      <ejb-local-ref>
              <ejb-ref-name>TxHome</ejb-ref-name>
              <ejb-ref-type>Entity</ejb-ref-type>
              <local-home>com.sun.ebank.ejb.tx.TxHome</local-home>
              <local>com.sun.ebank.ejb.tx.Tx</local>
              <ejb-link>GFDukesBank-ejb.jar#TxControllerEJB</ejb-link>
      </ejb-local-ref>
      <ejb-local-ref>
              <ejb-ref-name>AccountHome</ejb-ref-name>
              <ejb-ref-type>Entity</ejb-ref-type>
              <local-home>com.sun.ebank.ejb.account.AccountHome</local-home>
              <local>com.sun.ebank.ejb.account.Account</local>
              <ejb-link>GFDukesBank-ejb.jar#TxControllerEJB</ejb-link>
      </ejb-local-ref>
    </session>

The builder fail with the <ejb-link> stanza (<ejb-link>GFDukesBank-ejb.jar#AccountControllerEJB</ejb-link>, <ejb-link>GFDukesBank-ejb.jar#CustomerControllerEJB</ejb-link>, <ejb-link>GFDukesBank-ejb.jar#TxControllerEJB</ejb-link>, <ejb-link>GFDukesBank-ejb.jar#TxControllerEJB</ejb-link>).

I am working with J2EE 1.4, Glassfish v2 and MySQL 5.0.

What is happening?

Thanks in advance,
Jose Alvarez de Lara
[Message sent by forum member 'josealvarezdelara' (josealvarezdelara)]

http://forums.java.net/jive/thread.jspa?messageID=323481