Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ejb-dev] Please give feedback on this EJB test challenge for Jakarta EE 8...



On Thu, Jun 1, 2023 at 12:47 PM Scott Marlow <smarlow@xxxxxxxxxx> wrote:

Hi,

Should the https://github.com/jakartaee/platform-tck/issues/1176 challenge be accepted? 

The reporter is using the EAR classloader to load EJB jars if I am following the description correctly.  They are running into problems when trying to invoke the EJB from a war due to the EJB jar + WAR both containing the (SecTest) application interface for the remote EJB. 

The test source is https://github.com/jakartaee/platform-tck/tree/8.0.2/src/com/sun/ts/tests/servlet/ee/spec/security/runAs

Some Platform SPEC links that may help the discussion are below.  

Note that [1] mentions that the context class loaders may be different for each module in an application.  Also note that [2] mentions that jars in the ear/lib folder (or specified library-directory) must be shared by all components.  [2] doesn't say anything about EJB/WAR modules being shared but do remember the use of "may" in [1].

Are there any links in the Core EJB spec that should also be referred to when considering the TCK challenge?

Scott


"
Libraries that dynamically load classes must consider the class loading environment of a Jakarta EE application. Libraries will often be loaded by a class loader that is a parent class loader of the class loader that is used to load application classes and thus will not have direct visibility to classes of the application modules. A library that only needs to dynamically load classes provided by the library itself can safely use the Class method forName . However, libraries that need to dynamically load classes that have been provided as a part of the application need to use the context class loader to load the classes. Note that the context class loader may be different in each module of an application.


"
All files in this directory (but not subdirectories) with a .jar extension must be made available to all components packaged in the EAR file, including application clients. These libraries may reference other libraries, either bundled with the application or installed separately, using any of the techniques described herein.
"
 


Thanks,
Scott


Back to the top