Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • 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
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!