1 Reply Latest reply on Feb 20, 2005 9:32 AM by Joachim Van der Auwera

    Cannot create index using jbossxmp-jdbc.xml

    Eitan Gur Newbie

      I'm trying desperately to create an index using the jbosscmp-jdbc.xml

      The file looks like this

      <?xml version="1.0" encoding="UTF-8"?>
      
      <jbosscmp-jdbc>
       <defaults>
       <datasource>java:/MASDS</datasource>
       <datasource-mapping>mySQL</datasource-mapping>
       <create-table>true</create-table>
       <remove-table>false</remove-table>
       <!--<alter-table>true</alter-table>-->
       <fk-constraint>true</fk-constraint>
       <relation-mapping-style>foreign-key</relation-mapping-style>
       <post-table-create>
       <sql-statement>
       ALTER TABLE %%t TYPE=INNODB default charset=UTF8;
       </sql-statement>
       </post-table-create>
      
      
       </defaults>
      
       <enterprise-beans>
       <entity>
       <ejb-name>AlbumElement</ejb-name>
       <table-name>AlbumElement</table-name>
       <cmp-field>
       <field-name>name</field-name>
       <column-name>name</column-name>
       <dbindex/>
       </cmp-field>
       </entity>
       </enterprise-beans>
      
      
      </jbosscmp-jdbc>
      


      And the corresponding part from ejb-jar.xml is
      <entity>
       <display-name>AlbumElement</display-name>
       <ejb-name>AlbumElement</ejb-name>
       <local-home>messaging_as.domain.AlbumElementHome</local-home>
       <local>messaging_as.domain.AlbumElement</local>
       <ejb-class>messaging_as.domain.AlbumElementBean</ejb-class>
       <persistence-type>Container</persistence-type>
       <prim-key-class>java.lang.Integer</prim-key-class>
       <reentrant>False</reentrant>
       <cmp-version>2.x</cmp-version>
       <abstract-schema-name>AlbumElement</abstract-schema-name>
       <cmp-field>
       <field-name>name</field-name>
       </cmp-field>
      
       ...and more fields here...
       </entity>
      


      However, when I redeploy - nothing happens. No index is created...