0 Replies Latest reply on Jan 25, 2006 6:02 AM by pvishnu

    Newbie question regarding entity beans with JBOSS

    pvishnu

      Hi,

      I have created an CMP entity bean with default database connection(hypersonic) and insert the data using that bean into database.

      Later i have changed the database from default to mySql datasource by editing the mysql-ds.xml file in the \deployer dierctory. Problem is that when i started to re-inserting the values entered previously into dafault database and insertion is failing with an error say..

      javax.ejb.DuplicateKeyException: Entity with primary key 11 already exists

      I wonder that is that JBoss will connect mySQL and default database simult, eventhough we haven't specified default datasource name in jbosscmp-jdbc.xml ? Or its feature of EJB ? How i can overcome this problem ?

      Thanks and Regards,
      pv