EJB programming & troubleshooting: how can i locate the properties files within a ejb container?
when i develop servlet+javabean structure application,in order to imploement decoupling,i would like to write the config information in the properties files(key-value pair),in servlet,i use "getResourceAsStream(String relativePath)" method to retrieve the configuration information from the properties files(i even write the SQL clause in the files),it alwsys works well.
- Posted by: zhebin cong
- Posted on: September 27 2002 07:47 EDT
now,i want to implement such function within the ejb container,that is to read a properties file from session bean,but i don't know how can i locate the file within the ejb container by using relative path,i wonder if there is the same method within ejb container as "getResourceAsStream(.......)" method within servlet container?
thanks for any helps!
the code snippet is appreciated!
- how can i locate the properties files within a ejb container? by J2EE DISCUSSION ANIL LINGUTLA on September 27 2002 16:59 EDT
property files can be load by ejb container/ servlet container by using java ResourceBundle class. also u can load the properties file by the servlet container by writing a class(xyzloadingmanager) to load the properties file and the loading can be in the init method of the controller servlet. hope this help or else mail me at anillingutla at yahoo dot com so that we can discuss more about this.