• 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 ...
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

a mock question

Ranch Hand
Posts: 154
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
13. Given the following onMessage() method of a message-driven bean (Assume that all necessary imports have been made, that Bean is the component interface type of a stateless session bean and BeanHome is its home interface):
public void onMessage(javax.jms.Message msg) {
Context initCtx = new InitialContext();
Object result = initCtx.lookup("java:comp/env/ejb/Bean");
BeanHome beanHome = (BeanHome) PortableRemoteObject.narrow(result,
//do something with beanHome.
Select all the correct statements:
A. The code will not compile. The onMessage() method if a message-driven bean may throw any application exception.
B. The code compiles fines.
C. The code should be enclosed in a try-catch block.
D. The onMessage() method declaration does not satisfy the requirements of the EJB 2.0 specification.
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic