Hi you use tomee 1.5.2? maybe check against 1.6.0 first then the code is exactly the same so the issue should be in the way you get the stateful proxy. Romain Manni-Bucau Twitter: @rmannibucau Blog: http://rmannibucau.wordpress.com/ LinkedIn: http://fr.linkedin.com/in/rmannibucau Github: https://github.com/rmannibucau
2014-02-14 11:27 GMT+01:00 Olivier Paquet <[email protected]>: > Hi, > > No the EJB has no scope. > > Code snippet: > > @Stateful > @TransactionManagement(TransactionManagementType.BEAN) > public class DatabaseTransactionService{ > > I added: @StatefulTimeout(value=1, unit=TimeUnit.MINUTES) in order to check > that there is no timeout > and used the following dependency for the embedded openejb with the same > version as used in tomee 1.5.2: > > <dependency> > <groupId>org.apache.openejb</groupId> > <artifactId>openejb-server</artifactId> > <version>4.5.2</version> > <scope>test</scope> > </dependency> > > > The first JUnit test where I invoked the @Remove method logged nothing so > just the @PreDestroy has been invoked 1 time. > > And second test without invoking the @Remove method, I got following > message: > > Information - Removing the timed-out stateful session bean instance > 6388149bdf940114:4467a80a:1442fca856e:-7fff > > And @PreDestroy has been invoked only one time, so as expected. > > So there it worked fine with the embedded openejb container. > > > Any idea why it does not work correctly within TomEE? > > Regards, > > > > -- > View this message in context: > http://openejb.979440.n4.nabble.com/Stateful-EJB-not-removed-after-Remove-annontation-tp4667763p4667815.html > Sent from the OpenEJB User mailing list archive at Nabble.com.
