Announcement Announcement Module
Collapse
No announcement yet.
need help? one databases, cmt,hibernate,spring read-write it Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • need help? one databases, cmt,hibernate,spring read-write it

    my app begun in 2002, it accesses database using cmt, later we found ejb is tedious, and hard to add new function, so we adopt hibernate, spring. Now there are [three ways] to access database( cmt, hibernate, spring(HibernateDaoSupport)), each uses different datasource, every datasource has its own connection pool.

    the databse is oracle 9i.

    [three ways] writes different tables, but can read all tables. Now there is no table that can be written by two of the [three ways].

    But now I hope spring can write all tables, is there any problem ?

    I think it will have problem , but I have no confirmative infomation. Any idea is appreciated, thanks

    Norbert

  • #2
    each uses different datasource...I hope spring can write all tables
    As long as the datasource has permissions to, I don't see why not.

    Comment


    • #3
      Originally posted by katentim
      each uses different datasource...I hope spring can write all tables
      As long as the datasource has permissions to, I don't see why not.
      for example: there is a table the cmt and hibernate all want to add row. And the PK of the table is auto-increment. Supposing the current pk of the table is 2000, then the cmt and hibernate hold the current Pk. for example ,1, cmt add a row, the pk of the table is 2001, later hibernate want to add a row, but but hibernate know the pk is 2000, when hibernate add a new row, hibernate think the pk of new row is 2001, this is a confict.

      I think the root of problem is that cmt , hibernate, spring have their own cache. thank.

      "As long as the datasource has permissions to, " I dont think it has business with datasource

      Comment


      • #4
        cmt , hibernate, spring have their own cache
        Do you mean CMT, or CMP? CMP may have it's own cache. Hibernate does, so this is an issue. Spring will use the underlying persistence managers cache.

        I dont think it has business with datasource
        I thought you were looking at consolidating to a single datasource, with Hibernate and Spring managed transactions. I wouldn't mix CMP and Hibernate access with caching to the same table.

        Comment

        Working...
        X