• 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
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

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
 
Sasparilla and fresh horses for all my men! You will see to it, won't you tiny ad?
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic