Hi, noone responded to my transaction problem, so don't mind, that i try to repost it... Regards, Jens -----Urspr�ngliche Nachricht----- Von: Jens Stutte [mailto:[EMAIL PROTECTED]] Gesendet am: Mittwoch, 14. Juni 2000 15:55 An: Orion-Interest Betreff: Accessing transaction in entity bean Hi, i have a question, if it is possible to bypass the spec's limitation on transactions in entity beans. I'd like to get the current transaction in an entity beans business method, in order to register a Synchronization object, which will be called at the end of the transaction. Doing the following in a beans method does not throw any exceptions - but it does neither do the desired effect, as if the getTransaction call would create a new Transaction object rather than retrieving the actual associated one. Is there another jndi name for orion's container managed transaction manager? If so, is this defined by the spec or is it proprietary? Or does anybody know a completely different method to achieve the desired? ... try { Context initial = new InitialContext(); TransactionManager tm = (TransactionManager)initial.lookup("java:comp/UserTransaction"); Transaction t = tm.getTransaction(); t.registerSynchronization(new TestSync()); } catch (Exception e) {System.err.println("JNDI call failed.");} ... public class TestSync implements Synchronization { public void beforeCompletion() { System.err.println("TestSync: Before Completition"); } public void afterCompletion(int status) { System.err.println("TestSync: After Completition, status is "+status); } } Regards, Jens Stutte ____________________________________________ [EMAIL PROTECTED], http://www.netmedia.de NetMedia GmbH Neugrabenweg 5-7 66123 Saarbruecken Germany fon: +49 (0) 681 - 3 79 88 - 0 fax: +49 (0) 681 -�3 79 88 - 99
