• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Bear Bibeault
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • salvin francis
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Frits Walraven
Bartenders:
  • Jj Roberts
  • Carey Brown
  • Scott Selikoff

2) JPilot Mock Exam Question - Help Needed!

 
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When programming business methods, which technique should be avoided to ensure bean portability across all EJB 2.0 containers? Answer One.

A. Using the java.net.Socket class.
B. Using inner classes.
C. Using the 'final' modifier for fields.
D. Passing 'this' as an argument.

Tool Anser is : D
This is EJB program restriction.
According to the Qesttion it should be A is the correct answer.


Could some one can conform on the same?

Thanks,
Seenu
 
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We can use java.net.Socket for being a network client but we cannot use java.net.ServerSocket to listen for connections as a server.

Hence Option D is the only correct answer.

Refer to EJB Specification section 24.1.2 page 494-495


� An enterprise bean must not attempt to listen on a socket, accept connections on a socket, or
use a socket for multicast.

The EJB architecture allows an enterprise bean instance to be a network socket client, but it does not
allow it to be a network server. Allowing the instance to become a network server would conflict with
the basic function of the enterprise bean-- to serve the EJB clients.

 
Who knew that furniture could be so violent? Put this tiny ad out there to see what happens:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic