"dbudworth" wrote : we found that the TransactionAttribute annotation gets 
ignored when calling other methods in from a session bean.
  | 
  | ie:
  | 
  |   | public void doSomething() {  // this is the method called from the 
client
  |   |     doSomethingInNewTx();
  |   | }
  |   | 
  |   | @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)
  |   | public void doSomethingInNewTx(){
  |   |  ...
  |   | }
  |   | 
  |   | 
  | 
  | But calling doSomethingInNewTx() from the client would actually create the 
tx.  (guess you have to be going through the proxy to get the annotation to do 
it's thing)
  | 
  | We ended up turning on full blown LoadTimeWeaving AOP and using @Tx for 
this situation.
  | 

This is the expected behavior and what is required by the specification.  If 
you make a this pointer method call, it is a regular Java invocation.  You can 
get an "EJB this pointer" through SessionContext method getBusinessObject (or 
whatever the name is, i forget).

Bill

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

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


_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to