0 Replies Latest reply on Nov 18, 2011 10:15 AM by pradeep kumar

    Multiple persistance unit, copying database1 tables into database2

    pradeep kumar Newbie

      I have a problem, any please suggest.


      i am configuring two dataSources and two persistence units and two orm.xml files
      every thing is perfect. The problem is first database tables is copying into second database.
      i dont why this is happen.


      My entity's is in jar files
      -----------------------------
      m-entity1.jar -----------in this entity's configured in orm1.xml
      m-entity2.jar -----------in this entity's configures in orm2.xml


      This is orm1.xml
      ----------------


          <?xml version="1.0" encoding="UTF-8"?>
          <entity-mappings xmlns="http://java.sun.com/xml/ns/persistence/orm"
                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                   xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm 
                  http://java.sun.com/xml/ns/persistence/orm_1_0.xsd"
                   version="1.0">
          
          <entity name="accounts" class="com.manam.mobee.Accounts" />
          
          </entity-mappings>




      This is orm2.xml
      -----------------


          <?xml version="1.0" encoding="UTF-8"?>
          <entity-mappings xmlns="http://java.sun.com/xml/ns/persistence/orm"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm http://java.sun.com
              /xml/ns/persistence/orm_1_0.xsd"
           version="1.0">
          
          <entity name="agent" class="com.manam.mobee.Agent" />
          
          </entity-mappings>




      Actually the accounts table is not in orm2.xml.


      when i run the jboss server the accounts table is creating in second database, but agent table is not creating in first database that is fine.


      please can any one sortout this issue, and thanks in advance. and thanks for your time.