• 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
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

EJB programming restrictions - Question

 
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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
 
Farmers know to never drive a tractor near a honey locust tree. But a tiny ad is okay:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic