Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Transaction attributes

 
Sven Thor
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It says in the EJB spec (about CMT) that for entity beans and session beans there are certain methods that must be assigned transaction attributes. However, the <assembly-descriptor> part of ejb-jar.xml is optional. And the appserver I am using does not complain or give a warning when I deploy a set of beans without the <assembly-descriptor> part.

How does the container know which transaction-attributes to use? Does it use default configuration or no transactions at all ?

Br,
Sven
 
sawan parihar
Ranch Hand
Posts: 250
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
The application server will use the default transaction attribute. In case of weblogic it will use supports as the default transaction attribute if the trans attribute is not specified. Also it will give a warning message that no transaction attribute is specified . Which application server you are using?. Have you check the logs that there is no warning.

It may be the reason that some application servers expect the transaction attributes to be specified but all the intelligent and good app servers will use a default transaction attribute.

Hope it helps.
 
Sven Thor
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks.

I am using JBoss. I am not able to find any info in the log files.

ST
 
sawan parihar
Ranch Hand
Posts: 250
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Not sure but you can have a look and see if this info helps.

http://wiki.jboss.org/wiki/Wiki.jsp?page=AOPTransactionDemarcation
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic