Be vary careful if you are going to use sql to modify entity beans that are in memory! You have to perform those sql changes to the entity object outside of any transaction involving said entity AND you must have an orion-ejb-jar.xml file deployed that specifies in the entity-deployment that the server does not have exclusive write access (exclusive-write-access="false") to the DB. Something like this: <entity-deployment name="ejb/Address" location="ejb/Address" wrapper="AddressHome_EntityHomeWrapper12" exclusive-write-access="false" validity-timeout="300000" max-tx-retries="3" table="order_addresses" isolation="committed" data-source="jdbc/OrderServiceEJB"> Otherwise when you shut down the server ejbStore() will be called and the entity in memory will overwrite any changes made to the DB directly. -Jon -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Sunday, July 15, 2001 8:50 PM To: Orion-Interest Subject: Code on entity bean being looked up from a session bean and transaction rollback Hi everyone, I have a problem with a sequence like this Stateless session bean (bit of sql in a function f1) and calls an entity bean. When the entity bean fails the changes done by sql are not rolled back. (But if sql fails the entity bean changes are rolled back). So I tried another method suggested i.e. the sql was replcaed by entity bean entity1 which was going to call entity22. Suppose entity1 calls entity2 and entity2 fails, then there is a rollback(for both), but when I shut down the server all the changes which were supposed to be rolled back are undone! And another case when something in entity1 fails, the entity2 changes are not rolled back and it looks like I am still back to square one. Any idea if this is an orion bug or something? i would really love to get down to the root of this problem. If I start writing sql code in my session beans instead of using entity beans. Everything works out perfectly well. But I still think that this is not a solution. I still feel that even if I have my sql in the method of one statelesss session bean and one entity update all should be able to work. After all, the same code works in J2EE. I might probably be missing something. Hs anyone got a simple example on having a mix of sql and entity updates in one method of a statelss(or stateful) bean which can do a rollback it the entity fails. Thanks in advance. Kind Regards Aby