2 Replies Latest reply on Jan 14, 2004 8:52 PM by Brian DeCamp

    env-entry-value in jboss.xml

    Brian DeCamp Newbie

      The EJB 2.0 spec Sect 20.2 describes how the bean developer uses the <env-entry/> element in the deployment descriptor to declare and perhaps give default values to environment entries that customize the business logic of the bean. The application assembler is allowed to modify these values, and may set values for environment entries that have not been set by the bean developer. The container provider is responsible for providing a deployment tool that allows the Deployer to set and modify the values of the enterpise bean's environment entries.

      Unless I'm missing something, the dtd for jboss.xml (3.2.1) does not seem to offer any way of overriding the values of environment entries set by the bean developer in ejb-jar.xml.

      Is it true that the only way to modify the environment entry values is to modify the ejb-jar.xml file directly?

        • 1. Re: env-entry-value in jboss.xml
          Juha Lindfors Master

          Yes, why would you need to replicate those values in jboss.xml..?

          • 2. Re: env-entry-value in jboss.xml
            Brian DeCamp Newbie

            It's my understanding that the value in the ejb-jar.xml file is optional (i.e. a default value) that may be changed by the deployer. What I was (incorrectly) assuming was that JBoss established a separation of responsbilities between the bean developer and the assembler/deployer inherent in the different deployment descriptors. For instance, the bean developer creates the ejb-jar.xml file exposing it's configuration properties, and the assembler and/or deployer creates a jboss.xml file for the particular deployment.

            Somewhere in the EJB spec it talks about the possibility that the assembler may not be able to modify the ejb-jar.xml file, although I personally don't have this problem.

            Other tags in JBoss/EJB (e.g. resource-ref) follow this model of declaration in ejb-jar.xml and assignment in jboss.xml out of necessity because the EJB spec does not provide a way for the bean developer to supply a value in ejb-jar.xml. So, I expected the same pattern for env-entry-value, but now I understand.