From: Steve M. <st...@tr...> - 2001-05-08 20:48:50
|
The <trans-attribute> tag must be set to Required, RequiresNew, or Mandatory or JBoss won't persist your beans. Other application servers (Weblogic, for example) have different behavior; the EJB 1.1 spec isn't trmendously clear how this should be handled. Change the transaction attribute + things should work fine. Steve -----Original Message----- From: jbo...@li... [mailto:jbo...@li...]On Behalf Of Phil Cornelius Sent: Tuesday, May 08, 2001 3:11 PM To: jbo...@li... Subject: Re: [JBoss-user] CMP persistance after shutdown My <trans-attribute> tag is currently set to NotSupported in the container transactions section of my deployment descriptor. I imported my beans from visualage 3.5 which is not ejb 1.1 compliant.. I have met most of the requirements except returning the 'remote interface' from the bean's create methods; I still have them as void.. do you reckon that has anything to do with it? They still deploy OK. My J2EE app runs fine but it looks like the beans are only created in the jboss cache/memory and not ever written to the db. Another problem I am seeing is the 'INSERTING AN ALREADY EXISTING BEAN error. I have a CMP Entity ejb with a custom find method, findNewest. I have defined the finder helper in the jaws.xml as per TFM.. something like; <query>key =3D (select max(key) from transaction) </... i.e. find the = next highest transaction number. Then I have some logic that creates a new transaction and some associated order lines say. Works great on any other appserver.. works first time around on jboss.. but because the transactionBean data is not written back to the db, when I create the next tranactionBean the findNewest method returns the wrong key.. i.e. it returns the key of the previous succeeded transaction.. hense the INSERT AN...BEAN error... Note if I wait 5 mins (or whatever) I can create the next transactionBean successfully.. but the beans still never get written to the db. Excuse the long post Phil |