Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Senior Coder
    Join Date
    Dec 2005
    Location
    Slovenia
    Posts
    1,994
    Thanks
    120
    Thanked 76 Times in 76 Posts

    java cached table

    how to do this, is there any suitable object ? Obvious reason - not to bugger databse all the time ,anyway the data in question are static, at least for one day.

    1. get data from database to some cached object in servlet
    2. perform sql on that object
    3. serve that back to client

  • #2
    Senior Coder shyam's Avatar
    Join Date
    Jul 2005
    Posts
    1,563
    Thanks
    2
    Thanked 163 Times in 160 Posts
    Quote Originally Posted by BubikolRamios View Post
    how to do this, is there any suitable object ? Obvious reason - not to bugger databse all the time ,anyway the data in question are static, at least for one day.

    1. get data from database to some cached object in servlet
    2. perform sql on that object
    3. serve that back to client
    yes. there are but what do u mean by 'perform sql on that object' sql runs only on the database...

    some general pointers...

    if the information is like user roles/privileges etc. you can store it in the session object which will be available for the user session

    if the information is more global across users you can use the servlet-context object
    You never have to change anything you got up in the middle of the night to write. -- Saul Bellow

  • #3
    Senior Coder
    Join Date
    Dec 2005
    Location
    Slovenia
    Posts
    1,994
    Thanks
    120
    Thanked 76 Times in 76 Posts
    I mean , in vs net c# , you have:

    Code:
      DataTable dt  ......
      DataRow[] foundRows = dt.Select("Id= '" + Id + "'")
    and it gets desired rows from client dataset.

    something similar in java ?


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •