[jboss-user] [EJB 3.0] - need help for Transaction Attribute Types

grdzeli_kaci do-not-reply at jboss.com
Mon Aug 13 08:28:00 EDT 2007


good day,
i need something like that :

  | @Stateful
  | @Remote(TestFasade.class)
  | public class TestFasadeBean implements TestFasade {
  | 
  | 	@PersistenceContext(unitName = "Oracle")
  | 	private EntityManager oracleManager;
  | 
  | 	@TransactionAttribute(??????????????)
  | 	public void create(Test test) {
  | 		try {
  | 			System.out.println("start persist");
  | 			oracleManager.persist(test);
  | 			System.out.println("end persist");
  | 		} catch (Exception e) {
  | 			e.printStackTrace();
  | 		}
  | 	}
  | 	@TransactionAttribute(??????????????)
  | 	public void comit() {
  | 		try {
  | 			System.out.println("start comit");
  | 			oracleManager.flush();
  | 			System.out.println("end comit");
  | 		} catch (Exception e) {
  | 			e.printStackTrace();
  | 		}
  | 	}
  | }
  | 
i want that first method "create" must not be flushed into database before i call commit.
is it possible, and i don't want class variable initialization.
is it possible by transaction  types or something like that ?


any idea will be appreciated.



_______________________
Regards
Paata,

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4073522#4073522

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4073522



More information about the jboss-user mailing list