File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes EJB programming restrictions - Question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "EJB programming restrictions - Question" Watch "EJB programming restrictions - Question" New topic
Author

EJB programming restrictions - Question

sanker san
Ranch Hand

Joined: Dec 17, 2004
Posts: 56
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?
Ashwin
Greenhorn

Joined: Dec 19, 2004
Posts: 3
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.
Valentin Crettaz
Gold Digger
Sheriff

Joined: Aug 26, 2001
Posts: 7610
Sanker,

you can search this forum by typing in the keywords "define" and "package" and you'll get plenty of answers


SCJP 5, SCJD, SCBCD, SCWCD, SCDJWS, IBM XML
[Blog] [Blogroll] [My Reviews] My Linked In
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: EJB programming restrictions - Question