Results 1 to 5 of 5
  1. #1
    nanaji is offline Member
    Join Date
    May 2008
    Posts
    31
    Rep Power
    0

    Default persistent collection

    Hi

    Hibernate query will return the List Collection Object.

    but list is not persistent object right. For ex: if the list is having 200000 records, then server will have heap size problems . Can we replace this List also with persistent collection object?

    How to solve this problem in efficient way.

  2. #2
    kellaw is offline Member
    Join Date
    Oct 2008
    Posts
    24
    Rep Power
    0

    Default

    save them into a file and extract as you need it. that way you can avoid the heap size problem

  3. #3
    georgemc is offline Senior Member
    Join Date
    Sep 2008
    Posts
    135
    Rep Power
    0

    Default

    Quote Originally Posted by nanaji View Post
    Hi

    Hibernate query will return the List Collection Object.

    but list is not persistent object right. For ex: if the list is having 200000 records, then server will have heap size problems . Can we replace this List also with persistent collection object?

    How to solve this problem in efficient way.
    List isn't an object at all, it's an interface. Implementations of it may well be persistent. You can use Hibernate's lazy-loading to mitigate these size problems. You don't have to do anything in code to take advantage of it, Hibernate manages it for you. See the Hibernate docs, or a good Hibernate book, for details on how to configure lazy-loading

  4. #4
    georgemc is offline Senior Member
    Join Date
    Sep 2008
    Posts
    135
    Rep Power
    0

    Default

    Quote Originally Posted by kellaw View Post
    save them into a file and extract as you need it. that way you can avoid the heap size problem
    What's the point of pulling objects out of a database and sticking them straight back onto disk again??

  5. #5
    kellaw is offline Member
    Join Date
    Oct 2008
    Posts
    24
    Rep Power
    0

    Default

    use it and then modify then store it back rather than having the whole chunk of data out on your memory heap. take out record by record as you need them

Similar Threads

  1. how to creat collection
    By STILET in forum Advanced Java
    Replies: 2
    Last Post: 07-29-2008, 07:17 AM
  2. How to use Collection in Spring
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 03-29-2008, 12:45 PM
  3. Replies: 0
    Last Post: 11-30-2007, 11:55 PM
  4. Garbase Collection
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 11-30-2007, 09:37 AM

Posting Permissions

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