• 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
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

EJB programming restrictions - Question

 
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I would like to seek explanation for the answer of the following
question(taken from ejbcertificate.com)

Identify correct programming restrictions that a Bean provider must
follow to ensure that the enterprise bean is portable and can be
deployed in any compliant EJB 2.0 Container. [Check all correct
answers]


1. The enterprise bean cannot define read and write to static fields.
2. The enterprise bean cannot make use of the Java Swing API.
3. The enterprise bean cannot make use of interfaces to define
business methods.
4. The enterprise bean cannot make use of the Sun JavaMail API.
5. The enterprise bean must not attempt to define a class in a
package.

The answers are 1,2 & 5. Can anybody pls explain what does option 5
mean and how can it be an answer?
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
According to the Spec:
"The EJB must not attempt to define a class in the package".

This fucntionality is usually reserved for the container and allowing the EJB to do it would create a security hole.
 
Author & Gold Digger
Posts: 7617
6
IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sanker,

you can search this forum by typing in the keywords "define" and "package" and you'll get plenty of answers
 
We cannot change unless we survive, but we will not survive unless we change. Evolving tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic