2 Replies Latest reply on Mar 30, 2002 12:23 PM by jdsys

    EJB unable to find properties file

    jdsys

      I have successfully deployed a Stateless EJB on JBoss. But when I try to access this bean it is unable to locate a property file that I created. Do I have to add this properties file to the JBOSS_CLASSPATH or do I have to do something else so the EJB can see this file?

        • 1. Re: EJB unable to find properties file

          In theory you are not allowed to access any file from
          an ejb.

          In practice you don't have a security manager installed.

          More correctly, you should be using env entries in the
          deployment descriptor for config.

          You haven't said where the property file is,
          try something like

          Thread.currentThread().getContextClassLoader().getResourceAsStream("META-INF/my.properties");

          Regards,
          Adrian

          • 2. Re: EJB unable to find properties file
            jdsys

            Adrian,
            I will try using env entries in the deployment descriptor of my EJB. This seems to be a more standard solution across multiple app. servers. Thank you for your prompt response. :)