Skip to content

getContainer method relies on presence of a file rather than using the provided API #15

@stuartpullinger

Description

@stuartpullinger

The ContainerGetter.getContainer method returns an enum of either JBoss, Glassfish or UNKNOWN. It does this by checking for the presence of a particular file at a relative path. This file doesn't exist when running Payara inside the standard Payara docker image so the method returns UNKNOWN whereas it is expected to return Glassfish.

Checking for the presence of the file is clearly unreliable so perhaps we could get the container information from an api such as the getServerInfo call eg.

c.getServerInfo().toLowerCase().contains("glassfish") || c.getServerInfo().toLowerCase().contains("payara");

where c is a ServletContext. (Copied from here)

What does @ajkyffin think of this solution?

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions