eclipse-ee4j / glassfish

Eclipse GlassFish
https://eclipse-ee4j.github.io/glassfish/
379 stars 144 forks source link

Embedded glassfish JAR doesn't contain JARS/RARS to support JMS #24842

Open Blavo opened 6 months ago

Blavo commented 6 months ago

Embedded Glassfish JAR doesn't contain the JARs / RARs to support JMS. On attempted use embedded glassfish excepts saying unable to create an active RAR with a cause of ClassNotFoundException naming com.sun.messaging.jms.ra.ResourceAdapter. In standard glassfish this class is in a JAR inside the imqjmsra.rar in the MQ directory. The (contents of) this RAR are not present in the 7.0.12 embedded glassfish JAR.

If, as I understand, the glassfish admin facility uses JMS then this takes out that facility as well.

Environment Details

Glassfish 7.0.12

java version "17.0.7" 2023-04-18 LTS Java(TM) SE Runtime Environment (build 17.0.7+8-LTS-224) Java HotSpot(TM) 64-Bit Server VM (build 17.0.7+8-LTS-224, mixed mode, sharing)

Mac OS 12.4 (Monterey)

Database not relevant


Problem Description

As above.

Reliably reproducible

StackTrace.txt

Steps to reproduce

  1. Start an instance of glassfish embedded
  2. Note the JMS service port in the domain.xml in the following line:
  3. In a browser enter http://localhost:nnnn where nnnn is the noted port number; this will trigger JMS (it seems to use lazy initialisation)
  4. Glassfish will except as above

Impact of Issue

I don't use JMS so this doesn't affect me directly. But I believe the glassfish admin facility uses JMS; the admin facility does not work for me against an embedded glassfish and this is probably the cause.

dmatej commented 6 months ago

That is quite good question, because embedded glassfish is quite specific. Years ago it was stripped from GF3. Naturally I don't think embedded glassfish should contain IMQ broker+JMS server, but throwing CNF exceptions is quite ugly. So it should support it OR it should nicely tell the user that JMS is not supported, but then we should document an example how to work with an external JMS with Embedded GlassFish.

That is quite a lot of work, I think ...