• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

More questions

 
Joe Nguyen
Ranch Hand
Posts: 161
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which of the following is true concerning the use of UserTransaction?
a) Stateless Session beans must start and end a UserTransaction within one method, since they service multiple clients.

b) Stateful Session beans must start and end a UserTransaction within one method, since they service multiple clients.

c) A UserTransaction for stateless Session beans can span methods, since they service only one client.

d) A UserTransaction for stateful Session beans can span methods, since they service only one client.
I pick a & d. But c also looks attractive
Multiple Select - Please select all of the correct answers (this question has 2 correct choices).

A developer is using a DBConnectionPool to work with a database. While running, a DBException is thrown. What are possible causes?


a) The pool has reached its maximum number of connections and cannot create more.

b) No maximum was specified for the pool

c) The pool needs to be reinitialized

d) The pool was not initialized

Single Select - Please select the best answer (one and only one choice must be selected
I pick d
In deployment descriptors, security roles and method permissions:





a) can be shared across EJBs.

b) can utilize wildcard characters to authorize multiple methods at one time.

c) can be defined during deployment.

d) are mapped to actual user groups during deployment.

I pick a, b, c

Multiple Select - Please select all of the correct answers (this question has 3 correct choices).

public synchronized void fixMe()
{
Sysmtem.out.println("EJB prohibits the use of synchronized keyword");
}
a) The method will run
b) Run time error after ejbCreate()
c) compile time error for remote interface
d) Run time error when the method is executed
e) compile time error for bean implementation class
I pick c but e seems to be the correct answer to.
 
scott irwin
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'll take a stab at this.....
UserTransaction question) This is bean managed transactions, so a and d are correct. C is the inverse of a and the last part is dead wrong "since they service only one client".
DBConnection question) I take this to be a DataSource question. The specification does not specify (that I could find) what behavior occurs other than what should be provided (connections). The answer would then be vendor specific. But I would guess D due to some initialization error or deployment config error.
Deployment Descriptor) B and C are correct. The rest of the answers are fuzzy as the question states (roles and method). Security Roles are mapped by the deployer to principals or groups of principals in the operating environment. Method permissions are not. So D is somewhat right. Security Roles are scoped to every bean in the Jar file, but what if the bean is in a different jar? Can't share. Method permissions aren't shared across beans. So A is part correct, within a jar file. I think D is more correct than A.
Synchronized question) I'd have to fire up VAJ and that takes too long.
Scott
 
scott irwin
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Since I had to fire up Visual Age and WebSphere 3.5.2 today, I tested the synchronized question. Visual Age doesn't care. In fact, neither does WebSphere. My synchronized bean (session and entity) ran fine. I guess this question can only be asked of an EJB 1.1 COMPLIENT container. Wish I had one.
Scott
 
Joe Nguyen
Ranch Hand
Posts: 161
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Scott
I did test in VAJ 3.5. Compiler does not complain when I use synchronized keyword. However, it does complain when I add to the remote interface. Since vaj compiler may behave differently as compare to Sun j2ee compiler, I don't know the correct answer.
 
Joe Nguyen
Ranch Hand
Posts: 161
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I mean... "when I use synchronized keyword in the bean class." I think we should not focus on this question since it doesn't cover in the exam objectives.
Thanks
Joey
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic