0 Replies Latest reply on Feb 27, 2003 10:25 AM by Sebastiaan Kortleven

    MSSQL connection

    Sebastiaan Kortleven Newbie

      I'm trying to deploy my first EJB that uses a database.
      I've created a Datasource, but the EJB keeps using the default hypersonic DB (table is created, so there's nothing wrong with my EJB)... what am I doing wrong?

      Thx

      Sebastiaan

      mssql-service.xml (part)

      <depends optional-attribute-name="ManagedConnectionFactoryName">
      <!--embedded mbean-->


      jdbc/Onuris



      <config-property name="ConnectionURL" type="java.lang.String">jdbc:microsoft:sqlserver://onuris:1433;DatabaseName=DistAppsAlpha</config-property>
      <config-property name="DriverClass" type="java.lang.String">com.microsoft.jdbc.sqlserver.SQLServerDriver</config-property>
      <!--set these only if you want only default logins, not through JAAS-->
      <config-property name="UserName" type="java.lang.String">ict4g1_4</config-property>
      <config-property name="Password" type="java.lang.String">ict4g1_4</config-property>



      <!--Below here are advanced properties -->
      <!--hack-->
      <depends optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,name=JBoss LocalTransaction JDBC Wrapper




      ejb-jar.xml


      <ejb-name>ReturnOfBoonEJB</ejb-name>
      ReturnOfBoonHome
      ReturnOfBoon
      <local-home>LocalReturnOfBoonHome</local-home>
      LocalReturnOfBoon
      <ejb-class>ReturnOfBoonBean</ejb-class>
      <persistence-type>Container</persistence-type>
      <prim-key-class>java.lang.String</prim-key-class>
      True
      <cmp-version>2.x</cmp-version>
      <abstract-schema-name>ReturnBeanName</abstract-schema-name>
      <cmp-field>
      <field-name>kleur</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>naam</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>smaak</field-name>
      </cmp-field>
      <primkey-field>naam</primkey-field>
      <resource-ref>

      <res-ref-name>Onuris</res-ref-name>
      <res-type>javax.sql.DataSource</res-type>
      <res-auth>Container</res-auth>
      <res-sharing-scope>Shareable</res-sharing-scope>
      </resource-ref>



      jbosscmp-jdbc.xml

      <jbosscmp-jdbc>

      Onuris
      <datasource-mapping>MS SQLSERVER2000</datasource-mapping>


      <enterprise-beans>


      <ejb-name>ReturnOfBoon</ejb-name>
      <create-table>true</create-table>
      <remove-table>true</remove-table>
      <read-only>false</read-only>
      <table-name>BoonTabel</table-name>

      <cmp-field>
      <field-name>kleur</field-name>
      <column-name>kleur</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>naam</field-name>
      <column-name>naam</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>smaak</field-name>
      <column-name>smaak</column-name>
      </cmp-field>


      </enterprise-beans>
      <dependent-value-classes>
      </dependent-value-classes>
      </jbosscmp-jdbc>