No, keep those and change the NotSupported to Requires. 'NotSupported' 
is not valid for entity beans. There's been another thread on that topic 
recently.

John Moore wrote:

> 
> Get rid of the <assembly-descriptor></assembly-descriptor> around the 
> <container-transaction>. 
> 
> -----Original Message-----
> From: Andy Glover [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, March 06, 2001 10:26 AM
> To: [EMAIL PROTECTED]
> Subject: [jBoss-User] trouble persisting data in DB2 using CMP
> 
> 
> Hello,
>    I'm having troubles persisting data from simple CMP entity beans into
> DB2. I can find data already existing from a manual insert into DB2,
> however, using a simple client app that creates entity beans, that data is
> never persisted. When I attempt to do a findbyPrimaryKey on data created 
> via
> the client app, I don't find any errors in any log, the container simply
> states it can't find an object with PK@<my primary key> in the datastore.
> The objects are correctly created as I can manipulate the data; however,
> this data is never persisted.
> Thanks for any pointers on this matter!
> 
> I am including my ejb-jar.xml, jboss.xml, and jaws.xml.
> 
> ---- ejb-jar.xml ---------------
> 
> <enterprise-beans>
>     <entity>
>       <ejb-name>WORDBean</ejb-name>
>       <home>com.aglover.word.WORDHome</home>
>       <remote>com.aglover.word.WORD</remote>
>       <ejb-class>com.aglover.word.WORDBean</ejb-class>
>       <persistence-type>Container</persistence-type>
>       <prim-key-class>com.aglover.word.WORDPK</prim-key-class>
>       <reentrant>False</reentrant>
>       <cmp-field><field-name>WORD_UID</field-name></cmp-field>
>       <cmp-field><field-name>WORD</field-name></cmp-field>
>       <cmp-field><field-name>PART_OF_SPEECH</field-name></cmp-field>
>          <resource-ref>
>         <res-ref-name>DB2</res-ref-name>
>         <res-type>javax.sql.DataSource</res-type>
>         <res-auth>Container</res-auth>
>        </resource-ref>
>         </entity>
>         </enterprise-beans>
>   <assembly-descriptor>
>     <container-transaction>
>       <method>
>         <ejb-name>WORDBean</ejb-name>
>         <method-intf>Remote</method-intf>
>         <method-name>*</method-name></method>
>       <method>
>         <ejb-name>WORDBean</ejb-name>
>         <method-intf>Home</method-intf>
>         <method-name>*</method-name></method>
>      
> <trans-attribute>NotSupported</trans-attribute></container-transaction>
>     <container-transaction>
>       <method>
>         <ejb-name>WORDBean</ejb-name>
>         <method-name>*</method-name></method>
>      
> 
><trans-attribute>RequiresNew</trans-attribute></container-transaction></assembly-descriptor></ejb-jar>
> 
> 
> 
> 
> ----jboss.xml----------
> <jboss>
>          <call-logging>true</call-logging>
>     <enterprise-beans>
>      <entity>
>      <ejb-name>WORDBean</ejb-name>
>      <jndi-name>WORDBean</jndi-name>
>      <configuration-name>Standard CMP EntityBean</configuration-name>
>     </entity>
>         </enterprise-beans>
>    </jboss>
> 
> 
> -------------jaws.xml ------------
> 
> <jaws>
> 
>         <datasource>java:/DB2</datasource>
>     <type-mapping>DB2</type-mapping>
> 
>     <default-entity>
>        <create-table>true</create-table>
>        <remove-table>false</remove-table>
>        <tuned-updates>false</tuned-updates>
>        <read-only>false</read-only>
>        <time-out>300</time-out>
>     </default-entity>
> 
>         <enterprise-beans>
>                 <entity>
>                  <ejb-name>WORDBean</ejb-name>
>                  <table-name>WORD</table-name>
>                 <remove-table>false</remove-table>
>                 <cmp-field><field-name>WORD_UID</field-name>
>                 <column-name>WORD_UID</column-name>
>                   <sql-type>INTEGER</sql-type>
>                 </cmp-field>
>                  <cmp-field>
>                 <field-name>WORD</field-name>
>                 <column-name>WORD</column-name>
>                 <sql-type>VARCHAR</sql-type>
>                 </cmp-field>
>                  <cmp-field>
>                 <field-name>PART_OF_SPEECH</field-name>
>                 <column-name>PART_OF_SPEECH</column-name>
>                 <sql-type>VARCHAR</sql-type>
>                 </cmp-field>
>                 </entity>
>                  </enterprise-beans>
> 
> </jaws>
> 
> _________________________________________________________________
> Get your FREE download of MSN Explorer at http://explorer.msn.com
> 
> 
> 
> -- 
> --------------------------------------------------------------
> To subscribe:        [EMAIL PROTECTED]
> To unsubscribe:      [EMAIL PROTECTED]




--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]

Reply via email to