aspose file tools*
The moose likes Java in General and the fly likes Persistence... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Persistence..." Watch "Persistence..." New topic
Author

Persistence...

senthil nathan narayan
Greenhorn

Joined: Oct 21, 2003
Posts: 3
Hi,
I have a screen where i have 2 input fields. One is TextField where user can enter and the second one is DropDown Box.I have a data which comes from database and once i get it, i display it in the dropdown box, so user can select from the DropDown Box.
The thing is the values which i get from database, i should be able to store in a some persistent state.
Advantage is i don't have to query it again and again and also the other application can also access that data without going to database. I don't want to use Session or any server side storage.
Can anyone help me in storing the values in java bean or some toher java object and storing in persistence way.
Thanks,
Senthil
Rodney Woodruff
Ranch Hand

Joined: Dec 04, 2001
Posts: 80
Let me make sure I understand your question:
You need some persistence mechanism but. . .
1. You don't want to store it in the session
2. You don't want to store it on the server
3. You have it in the database but you don't want to keep retrieving it from there.
This seems very limited. However, there are two other possible mechanisms that I can think but of course there are always more . . .
1. Store values in Cookies (bad idea if data is insecure or user doesn't accept cookies)
2. Store the data in an XML file and then use XPath to quickly retrieve necessary values.
These are just ideas. None of which I have really used extensively but, given your stated limitations, they might work for you.


Hope This Helps
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Persistence...