1 Reply Latest reply on Jan 24, 2003 8:46 PM by mspeck

    JBOSS CMP Entity Bean: Actually persisting the data to Oracl

    mspeck

      Using JBOSS 3.0.0 & Oracle 8.1 and the following configurations. I can get the bean, call create(), have the code in the bean execute, have postCreate() execute, but the data doesn't show up in Oracle.

      What am I missing?

      standardjbosscmp-jdbc.xml

      <jbosscmp-jdbc>


      java:/DefaultDS
      <datasource-mapping>Oracle8</datasource-mapping>

      <create-table>false</create-table>
      <remove-table>false</remove-table>
      <read-only>false</read-only>
      <time-out>300</time-out>
      <pk-constraint>true</pk-constraint>
      <fk-constraint>false</fk-constraint>
      <row-locking>false</row-locking>
      <preferred-relation-mapping>foreign-key</preferred-relation-mapping>
      <read-ahead>
      on-load
      <page-size>1000</page-size>
      <eager-load-group>*</eager-load-group>
      </read-ahead>
      <list-cache-max>1000</list-cache-max>


      ....

      standardjaws.xml



      java:/DefaultDS
      <type-mapping>Oracle8</type-mapping>
      false

      <default-entity>
      <create-table>false</create-table>
      <remove-table>false</remove-table>
      <tuned-updates>true</tuned-updates>
      <read-only>false</read-only>
      <time-out>300</time-out>
      <row-locking>false</row-locking>
      <read-ahead>false</read-ahead>
      </default-entity>

      ....

      oracle-service.xml

      <application-policy name="OracleDbRealm">

      <login-module code="org.jboss.resource.security.ConfiguredIdentityLoginModule" flag="required">
      <module-option name="principal">System</module-option>
      <module-option name="userName">System</module-option>
      <module-option name="password">Manager</module-option>
      <module-option name="managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=OracleDS</module-option>
      </login-module>

      </application-policy>

      <!--uncomment out this line if you are using the OracleDbRealm above -->

      OracleDbRealm

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

      java:/DefaultDS


      <config-property name="ConnectionURL" type="java.lang.String">
      jdbc:oracle:thin:@Pamina:1521:kava
      </config-property>
      <config-property name="DriverClass" type="java.lang.String">
      oracle.jdbc.driver.OracleDriver
      </config-property>
      <!--set these only if you want only default logins, not through JAAS
      <config-property name="userName" type="java.lang.String"/>
      <config-property name="password" type="java.lang.String"/> -->


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





      ....

      login-config.xml

      <application-policy name="OracleDbRealm">

      <login-module code="org.jboss.resource.security.ConfiguredIdentityLoginModule" flag="required">
      <module-option name="principal">System</module-option>
      <module-option name="userName">System</module-option>
      <module-option name="password">Manager</module-option>
      <module-option name="managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=OracleDS</module-option>
      </login-module>

      </application-policy>