EJB programming & troubleshooting: weblogic 5.01 and EJB 1.1

  1. weblogic 5.01 and EJB 1.1 (1 messages)

    I am getting java.lang.RuntimeException: javax.ejb.EJBContext.getEnvironment is deprecated in EJB 1.1
    does any one have an idea of how to replace the method for EJB 1.1?
    please, give me a code example.

  2. weblogic 5.01 and EJB 1.1[ Go to top ]

    Inside your bean you would simple do this to lookup the "tradeLimit" property.
    More details in chapter 14, 1.1 EJB spec


    try {

         InitialContext ic = new InitialContext();

         Integer tl = (Integer) ic.lookup("java:/comp/env/tradeLimit");

         tradeLimit = tl.intValue();

       } catch (NamingException ne) {

         throw new CreateException("Failed to find environment value "+ne);