The J2EE tutorial says, "Session beans need the attributes defined for business methods, but do not allow them for the create methods. Entity beans require transaction attributes for the business, create, remove, and finder methods. Message-driven beans require transaction attributes (either Required or NotSupported) for the onMessage method."
But I don't get any error if I don't specify any transaction attributes. Can somebody explain why? May be there is a default transaction attribute?
The specs don't provide any default transaction attribute - so developers are expected to provide one. The individual vendors usually provide a default (which varies, eg Weblogic might default to Supports while another vendor might set Required)- so if you don't provide a transaction attribute yourself, your code might not be portable between containers wrt transaction.