EJB enviromental variables


EJB programming & troubleshooting: EJB enviromental variables

  1. EJB enviromental variables (1 messages)

    What is the purpose of creating env variables for a session bean.

    How does one configure these variables on the application server

    Threaded Messages (1)

  2. EJB enviromental variables[ Go to top ]

    Your question is not clear! developers assume a lot.
    So assuming that your question is on <env-entry>,
    They are used to configure certain reference values for the session bean. They are set through ejb-jar.xml entry and can be read using a JNDI look up
    consider example ejb-jar.xml fragment
         <!-- Access in code using JNDI lookup("java:/comp/env/get_assumption_sql") -->
         <description>This env entry is for ... </description>

    Now if your session bean want to get this SQL, you simply do a look up as: