• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

two questions regarding SCBCD test

 
Nitin Mehhta
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have two questions.
1) Can a method be a part of the exclude-list as well as be present in one of the method-permission tags. More relavantly..what will happen if we say
<exclude-list><method>*</exclude-list></method> and then we specificly assign a method to a role using a method-permission tag....what will be the output.

2) I read somewhere that if a CMT stateful session bean implements SessionSynchronizer interface then the only allowed trans-attributes are "Mandatory" "Required" and "RequiresNew". Is this true. I know it makes sense to have a transaction in such a case but...is this restriction true....purely from the point of view of the exams. :-)

Thanks in advance
 
Nicholas Cheung
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

1) Can a method be a part of the exclude-list as well as be present in one of the method-permission tags. More relavantly..what will happen if we say
<exclude-list><method>*</exclude-list></method> and then we specificly assign a method to a role using a method-permission tag....what will be the output.

The exclude list should override other settings.


2) I read somewhere that if a CMT stateful session bean implements SessionSynchronizer interface then the only allowed trans-attributes are "Mandatory" "Required" and "RequiresNew". Is this true. I know it makes sense to have a transaction in such a case but...is this restriction true....purely from the point of view of the exams. :-)

YES. If the CMT SFSB implements SessionSynchronize interface, it MUST have a transaction because the three methods defined inside the interface aims to give you some *chances* to control your transaction, or synchronized the state. Thus, if there is NO transaction involved, it makes no sense for implementing such interfaces.

Nick
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic