Forums Register Login

EJB and file read/write

+Pie Number of slices to send: Send
I have the following method in my EJB
method1(){
...
myFileReader.readFile("file Name");
}
In the above code, instead of reading the file in EJB (Which shouldn't be done as the container doesnt guarantee proper behaviour), the operation is delegated to "myFileReader" class readFile() method.
1. Does the container gurantee a proper behaviour in this case since iam not reading any file in EJB ? if yes, i feel iam reading the file indirectly.
2. If i want to read some file in an EJB, whats the best solution ?
+Pie Number of slices to send: Send
this is an interesting question.
i wonder if the class is executed in the container environment or not.
sorry i can't help, but i will follow this topic.
+Pie Number of slices to send: Send
Hi,
Since there is no mention about the contents/size of the file to be read, for a moderate file size with approx. 1000 lines of name/value pairs,
I 'd read the file when the server starts up, cache it and use it in EJb or elsewhere.

Suresh Selvaraj
SCJP2
+Pie Number of slices to send: Send
Hi,
What if the file to be read/written is dependent on the user session which is stored as stateful session bean ?
Hari
[ April 24, 2003: Message edited by: Hari babu ]
A feeble attempt to tell you about our stuff that makes us money
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 867 times.
Similar Threads
Reading a file
Doubt about Container Services
Want Help Reagarding Reading Text
Access to resource manager in CMTSFB
ejb3 or ejb2?
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 05:55:23.