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.
-
named packages (3 messages)
- Posted by: Mark Grand
- Posted on: May 23 2000 17:47 EDT
Threaded Messages (3)
- named packages by Floyd Marinescu on May 24 2000 20:06 EDT
- inner classes by Michael Bushe on June 12 2000 10:21 EDT
- named packages - defineClass () by Gene Florintsev on June 23 2000 11:38 EDT
-
named packages[ Go to top ]
- Posted by: Floyd Marinescu
- Posted on: May 24 2000 20:06 EDT
- in response to Mark Grand
Mark,
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.
Floyd -
inner classes[ Go to top ]
- Posted by: Michael Bushe
- Posted on: June 12 2000 10:21 EDT
- in response to Floyd Marinescu
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.
Michael -
named packages - defineClass ()[ Go to top ]
- Posted by: Gene Florintsev
- Posted on: June 23 2000 11:38 EDT
- in response to Floyd Marinescu
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.
See http://java.sun.com/products/jdk/1.2/docs/api/java/lang/ClassLoader.html#defineClass(java.lang.String, byte[], int, int)
for API documentation.
- Gene Florintsev http://www.florintsev.com