Results 1 to 4 of 4

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

  1. #1

    Default 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. #2
    Join Date
    Aug 2004
    Location
    Melbourne, Australia
    Posts
    1,104

    Default

    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.

  3. #3

    Default

    Quote 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

  4. #4
    Join Date
    Aug 2004
    Location
    Melbourne, Australia
    Posts
    1,104

    Default

    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.

Similar Threads

  1. Order of Bean definitions matters?
    By cfuser in forum Container
    Replies: 2
    Last Post: Oct 21st, 2005, 10:29 AM
  2. Spring container fails with no exception
    By naor in forum Container
    Replies: 9
    Last Post: Oct 1st, 2005, 03:39 PM
  3. EHCaching Hibernate
    By dencamel in forum Data
    Replies: 3
    Last Post: Sep 6th, 2005, 09:03 PM
  4. Stack Overflow
    By rayho222 in forum Container
    Replies: 6
    Last Post: May 17th, 2005, 03:42 AM
  5. Read / Write Beans
    By narsis1313 in forum Container
    Replies: 6
    Last Post: Dec 14th, 2004, 05:29 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
  •