This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes Property file in EJB: previously called Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Property file in EJB: previously called "Thread in Stateless Session Bean"" Watch "Property file in EJB: previously called "Thread in Stateless Session Bean"" New topic
Author

Property file in EJB: previously called "Thread in Stateless Session Bean"

Jes Sie
Ranch Hand

Joined: Jul 24, 2001
Posts: 188
This spins off from this thread,
Thread in Session Bean
I have a need to access property files from a Stateless Session Bean. What are the best practices to do this. Approaches that I can think of are: -
1. ResourceBundle theResource = ResourceBundle.getBundle("myPropertyFile");
2. JNDI
3. Any other suggestions?
If so, what are the tradeoffs for each of these approaches in terms of performance & scalability?


Thank you.<br /> <br />- Jess Sie<br /> <a href="mailto:jess@see-consulting.com" rel="nofollow">jess@see-consulting.com</a>
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15960
    
  19

A resource is a better bet for storing "large" numbers of objects and/or larger sized objects, since it's strictly file I/O.
My mind is out to lunch on whether JNDI is ALWAYS going to be associated with a network server at the moment, but everything I can think of at the moment looks that way. Given a choice between file I/O and network I/O, use the file unless there's a compelling reason not to - for example sharing frequently-modified data in a cluster. (Then again, THAT's a good use for an EJB itself!).


Customer surveys are for companies who didn't pay proper attention to begin with.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Property file in EJB: previously called "Thread in Stateless Session Bean"
 
Similar Threads
Spring and DAO Dependency Injection
EJB pooling vs servlet pooling
get a reference to EJBObject in stateless session bean
HF questions and others - round 1
EJB Endpoint or JSE + EJB EndPoint