This content has been marked as final.
Show 3 replies
-
1. Re: Configuring EJB
peterj Nov 20, 2006 11:35 AM (in response to fullcircle)You could place a properties file in the same directory as the EJB class file and access it using this.class().getResourceAsStream(prop-file-name).
You could place a properties file in server/default/data and access it as follows:
String datadir = System.getProperties("jboss.server.data.dir");
File f = new File(datadir + "/" + prop-file-name); -
2. Re: Configuring EJB
fullcircle Nov 21, 2006 4:11 AM (in response to fullcircle)Thanks - searched for ages for that kind of a gem!
-
3. Re: Configuring EJB
weston.price Nov 21, 2006 3:01 PM (in response to fullcircle)Also, you have the ENC (JNDI) to play with as well. Environment entries can be set in your ejb-jar.xml descriptor (or injected with EJB3). I often find this 'cleaner' than using a properties file as the EJB contains all the necessary information needed to deploy and run. However, neither approach is better than the other.