Hi, Now, instead, I do it in this way: 1. As the primary class object (returned from findbyprimarykey()) in session bean is not null, I used it to retrieve those old data and then used them to set back to the BMP with those setters through the remote interface 2. Then, I use setters again for those newly updated fields 3. When transaction is completed, ejbStore is invoked 4. That works !?
However, I don't think this is the right way to do it. Any hint / idea is highly appreciated. Camus -----Original Message----- From: Camus Chan [mailto:[EMAIL PROTECTED]] Sent: Friday, November 01, 2002 4:59 PM To: '[EMAIL PROTECTED]' Subject: ejbstore in BMP Hi, I have a problem for ejbStore in BMP: A stateless session bean looks up the BMP and calls the findbyprimarykey() through the remote interface. In ejbFindByPrimaryKey(), the setters are called (so that data fields are set to the one retrieved from database). However, in session bean, when call the getter methods through the remote interface, all are null ! And when the transaction is completed, the ejbStore invokes which raises errors as nulls even the primary key class. In my ejbStore, I have: "update user set status = " + this.status + " where id = " + this.id ; *** status and id are private data members in the BMP. Am I do in a proper way ? I mean when I want to update data, I invoke findbyprimarykey() to find the record first, and then invoke the setters method to update to a new value and that's it. Or it should not in this way ? *** I have used commit-option B. Thanks, Camus ------------------------------------------------------- This sf.net email is sponsored by: See the NEW Palm Tungsten T handheld. Power & Color in a compact size! http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
