users@glassfish.java.net

Re: BULK INSERTS EJB3

From: <glassfish_at_javadesktop.org>
Date: Tue, 04 Nov 2008 06:55:17 PST

With EJB3 and CMT, there is no way to change the transaction. You can only cause a rollback, that's all. But you can mark one bean to use BMT by annotating the class with

@TransactionManagement(TransactionManagementType.BEAN)

then let a field be injected with

    @Resource
    private EJBContext ctx;

The context gives you a UserTransaction on which you can do begin/commit/rollback.
[Message sent by forum member 'kurti' (kurti)]

http://forums.java.net/jive/thread.jspa?messageID=314777