I hope that you may be able to clear up a rather cryptic statement in the EJB specification. On page 278, in section 18.1.2 regarding programming restriction for bean providers it says
• The enterprise bean must not attempt to define a class in a package.
Does that mean that bean classes must not be part of named packages? We want to be as compliant with the spec as possible, but this seems unclear.
Thank you for your help.
This is indeed a strange restriction. I am sure that it doesn't mean that your beans cannot be part of named packages. Every EJB tutorial out there has beans as part of packages, and all the EJB's used to create TheServerSide.com are part of packages.
I understood that line to mean public static classes were not allowed. I think this is the only way to for a bean to (publicly) define a class in the package.
What is meant here is probably that an EJB must not call ClassLoader.defineClass () - at least that is how I understand it. This is consistent with the prohibition from creating or obtaining class loaders.
, byte, int, int)
for API documentation.
- Gene Florintsev http://www.florintsev.com