Hi, i have a DB helper class which all the EJBs are using. Now for initializing the DB Helper class, i am using a prperty file (for example to read the Data source JNDI name). Can someone tell me where should i put the .propeteis file so that it would be visible to the DB Helper class? DB helper class is packaged in the ejb jar along with other EJB classes. the property file is also required for Log4J initialization.
Thanks in advance
One of the options is to pass the path of properties file to JVM ,
thus you can construct the file path at run time.
Use resource bundles to look up the property file for yourself. If you are writing EJB code then you should be using the Deployment descriptor to provide this information to the bean. Please look at the resource mappings in the deployment descriptors.
Hope this helps.