named packages


EJB design: named packages

  1. named packages (3 messages)

    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.

    Threaded Messages (3)

  2. named packages[ Go to top ]


      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 are part of packages.

  3. inner classes[ Go to top ]

    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.

  4. 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, byte[], int, int)

    for API documentation.

    - Gene Florintsev