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 restriction 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 restriction" Watch "EJB restriction" New topic
Author

EJB restriction

Mamadou Touré
Ranch Hand

Joined: Dec 27, 2007
Posts: 189
Hi,

I read the abou the EJB programming restriction in the spec, and it's said :
"• The enterprise bean must not attempt to define a class in a package."
Does this mean we can't declare the bean class in a package as follow:



SCJP 5 (76%)
SCWCD 5 (86%)
SCBCD 5(70%)
--------------------
"The greatest glory in living lies not in never falling, but in raising every time we fall.".. Nelson Mandela
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14688
    
  16

Check this thread.


[My Blog]
All roads lead to JavaRanch
Mamadou Touré
Ranch Hand

Joined: Dec 27, 2007
Posts: 189
Bonjour Christophe,

I've read the link you suggested me, so does this me the following line should never be included in a bean class

package xyz;
James Joshy
Greenhorn

Joined: Jun 04, 2009
Posts: 6
Mamadou Touré wrote:Bonjour Christophe,

I've read the link you suggested me, so does this me the following line should never be included in a bean class

package xyz;


Hi

Spec is talking about 'RUNTIME' not compile time.


SCJP, SCJD, SCBCD-5
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14688
    
  16

I've read the link you suggested me, so does this me the following line should never be included in a bean class
package xyz;

Putting a bean in a class is allowed. If it were not, that would be a big problem. If you check the link again, you'll see that "The enterprise bean must not attempt to define a class in a package" is about not using java.lang.ClassLoader's defineClass and definePackage methods.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: EJB restriction