Announcement Announcement Module
Collapse
No announcement yet.
Caching with Spring JDBC? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    Originally posted by al0 View Post
    Generally speaking, such mix is very dangerous. Hibernate makes a lot of assumptions about how it manipulates objects in database and cache, and if your code not competely adhere with these rules then Hibernate can quite easily go weird (especially, when we speak about caching). So, IMHO, you have to take "all-or-nothing" decision.
    With the fact that we are deploying this system into production sometimes in december, I don't think switching to hibernate (replacing existing JDBC code) is viable. I will see what can work better in this situation. Do you know what assumptions hibernate makes, which you are referring to?

    Comment


    • #17
      Originally posted by javaxmlsoapdev View Post
      With the fact that we are deploying this system into production sometimes in december, I don't think switching to hibernate (replacing existing JDBC code) is viable. I will see what can work better in this situation. Do you know what assumptions hibernate makes, which you are referring to?
      I'm not sure that I know them all. And they may vary from version to version (as they are implementation details and not the part of the public contract).

      In your circumstances I would not dare to involve Hibernate at all and will or integrate the some existing cache with your DAO code, or make simple one-off solution that just covers your immediate needs (stepping on thin ice of wild-guessing, I may estimate minimalist solution in half-a-day).

      Regards,
      Oleksandr

      Comment


      • #18
        Originally posted by al0 View Post
        I'm not sure that I know them all. And they may vary from version to version (as they are implementation details and not the part of the public contract).

        In your circumstances I would not dare to involve Hibernate at all and will or integrate the some existing cache with your DAO code, or make simple one-off solution that just covers your immediate needs (stepping on thin ice of wild-guessing, I may estimate minimalist solution in half-a-day).

        Regards,
        Oleksandr
        I have basic caching (read only) in place (using EHCache) and now going to work on updating cache when data is inserted/modified/deleted. Instead of altering table to have version/timestamp information, I am thinking to use Observer pattern and update cache whenver there is an insert/update/delete calls. Does anyone see any issue with this approach?

        thanks,

        Comment


        • #19
          Originally posted by javaxmlsoapdev View Post
          I have basic caching (read only) in place (using EHCache) and now going to work on updating cache when data is inserted/modified/deleted. Instead of altering table to have version/timestamp information, I am thinking to use Observer pattern and update cache whenver there is an insert/update/delete calls. Does anyone see any issue with this approach?

          thanks,
          No issues as soon as you are able to catch all DML calls. But if for example you would have several copies of your applications running in parallel then problems will wrrive.

          Comment

          Working...
          X