Codice completo


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE jbosscmp-jdbc PUBLIC "-//JBoss//DTD JBOSSCMP-JDBC 3.2//EN" "http://www.jboss.org/j2ee/dtd/jbosscmp-jdbc_3_2.dtd">

<jbosscmp-jdbc>
  <defaults>
    <datasource>java:/CMPDatabaseDS</datasource>
    <datasource-mapping>mySQL</datasource-mapping>
    <create-table>false</create-table>
    <alter-table>false</alter-table>
    <remove-table>false</remove-table>
    <preferred-relation-mapping>foreign-key</preferred-relation-mapping>
  </defaults>
  <enterprise-beans>
    <entity>
      <ejb-name>User</ejb-name>
      <table-name>duser</table-name>
      <cmp-field>
        <field-name>login</field-name>
        <read-only>false</read-only>
        <column-name>login</column-name>
        <jdbc-type>VARCHAR</jdbc-type>
        <sql-type>VARCHAR(16)</sql-type>
      </cmp-field>
      <cmp-field>
        <field-name>nome</field-name>
        <read-only>false</read-only>
        <column-name>nome</column-name>
        <jdbc-type>VARCHAR</jdbc-type>
        <sql-type>VARCHAR(255)</sql-type>
      </cmp-field>
      <cmp-field>
        <field-name>cognome</field-name>
        <read-only>false</read-only>
        <column-name>cognome</column-name>
        <jdbc-type>VARCHAR</jdbc-type>
        <sql-type>VARCHAR(255)</sql-type>
      </cmp-field>
      <cmp-field>
        <field-name>email</field-name>
        <read-only>false</read-only>
        <column-name>email</column-name>
        <jdbc-type>VARCHAR</jdbc-type>
        <sql-type>VARCHAR(255)</sql-type>
      </cmp-field>
      <cmp-field>
        <field-name>telefono</field-name>
        <read-only>false</read-only>
        <column-name>telefono</column-name>
        <jdbc-type>VARCHAR</jdbc-type>
        <sql-type>VARCHAR(255)</sql-type>
      </cmp-field>
    </entity>
  </enterprise-beans>
</jbosscmp-jdbc>