• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Tim Cooke
  • paul wheaton
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Piet Souris
  • Himai Minh
Bartenders:

mock questions

 
Ranch Hand
Posts: 222
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Q1. Which two must a bean provider supply for each enterprise bean in the deployment descriptor?
A. Security roles
B. JNDI name of the enterprise bean
C. enterprise bean type: session, entity or message-driven
D. Value of transaction attribute for home and component interface methods.
E. Fully qualified name of the class that implements the enterprise bean's business methods.

Correct answers given are C & E. Why not B?


Q2. What can the bean provider do if the onMessage method encounters application exception (Choose two).
A. Add application exception to method's throws clause.
B. handle exception in method; do not throw the exception
C. wrap and rethrow exception as EJBException
D. wrap and rethrow exception as RemoteException

Question asks for two answers, but I think only one option B is valid.


Q3. Which describes an action that is most appropriate for an Application Assembler to perform?
A. link an enterprise bean reference to a target enterprise bean.
B. bind resource environment reference to actual resource
C. bind resource manager connection factory reference to actual resource factory
D. bind UserTransaction interface to enterprise beans that can use that interface


Q4. Given following code for EB:
public interface ABCHome extends EJBHome {
//some code
public float livingIndex(String state, float salary) throws RemoteException;
//more code
}
Which stmt is true?
A. The livingIndex method is illegal.
B. The livingIndex method is EJB 2.0 compliant.
 
Ranch Hand
Posts: 146
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Q1. JNDI name is given by the deployer not the bean provider.

Q2.Option C is also correct
 
Ankit Doshi
Ranch Hand
Posts: 222
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Q2.Option C is also correct



What is the point of throwing the EJBException to the container?
 
Ranch Hand
Posts: 211
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Q1. Which two must a bean provider supply for each enterprise bean in the deployment descriptor?
A. Security roles No.Job of Assembler/DeployerB. JNDI name of the enterprise bean No.Given by deployerC. enterprise bean type: session, entity or message-driven Yes.A must to ensure target compatibility laterD. Value of transaction attribute for home and component interface methods. May be, based on EJB Specs..he does.E. Fully qualified name of the class that implements the enterprise bean's business methods. Yes, is a better option than D
Correct answers given are C & E. Why not B?

When you get such options, always pick primary roles first.If you have two options and you get two primary role based answers.Home Run.Otherwise D could be an answer as well.Hope you get the idea.

Q2. What can the bean provider do if the onMessage method encounters application exception (Choose two).
A. Add application exception to method's throws clause.
B. handle exception in method; do not throw the exception Yes
C. wrap and rethrow exception as EJBException Yes
D. wrap and rethrow exception as RemoteException

Question asks for two answers, but I think only one option B is valid.

Thrown an EJB Exception, since its a system Exception.Let the bean die. Why do you care? I may not necessarily throw the Exception back to the client if i throw an EJB Exception from my bean
But remember if there was one option i would go only for B.


Q3. Which describes an action that is most appropriate for an Application Assembler to perform?
A. link an enterprise bean reference to a target enterprise bean. Yes
B. bind resource environment reference to actual resource No.Deployer work C. bind resource manager connection factory reference to actual resource factory Again, Deployer work
D. bind UserTransaction interface to enterprise beans that can use that interface No. Server does this while bootstrap

Q4. Given following code for EB:
public interface ABCHome extends EJBHome {
//some code
public float livingIndex(String state, float salary) throws RemoteException;
//more code
}
Which stmt is true?
A. The livingIndex method is illegal.
B. The livingIndex method is EJB 2.0 compliant. Its perfectly legal, i think. All your attributes are serialable.So no marshalling issues identified.
[ April 26, 2006: Message edited by: Rahul Mishra ]
 
Balaji Anand
Ranch Hand
Posts: 146
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If the Message Acknowledgement is tied to the method completion throwing a runtime exception results in the message going back to the queue.
 
No holds barred. And no bars holed. Except this tiny ad:
The Low Tech Laboratory Movie Kickstarter is LIVE NOW!
https://www.kickstarter.com/projects/paulwheaton/low-tech
reply
    Bookmark Topic Watch Topic
  • New Topic