-
1. Re: properties from a file
tperrigo May 5, 2004 9:04 AM (in response to jan_marien)If these are properties you need to access within an EJB, consider using environment entries in the bean's deployment descriptor. For example, to create an integer property called "foo" with the value of 28 add the following to the ejb-jar.xml file:
<env-entry>
<env-entry-name>foo</env-entry-name>
<env-entry-type>java.lang.Integer</env-entry-type>
<env-entry-value>28</env-entry-value>
</env-entry>
Hope this helps
Tim -
2. Re: properties from a file
pjrichter May 5, 2004 11:19 AM (in response to jan_marien)How are these entries accessed? Also, what if the same entry also needs to be accessed by a jsp?
-
3. Re: properties from a file
raja05 May 5, 2004 12:22 PM (in response to jan_marien)Create a Singleton that would be kicked off from a load-on-startup servlet. This wud read a proprties using getResource() and store it as a singleton or jndi if clustered. Once u have it, u can access from ejb, jsp, whatever.
Ofcourse, this is just one way, there are multitude of patterns available to solve this