1

I have downloaded TomEE plume 8.0.0-M2, TomEE plus 8.0.0-M2, TomEE webprofile 8.0.0-M2, TomEE microprofile 8.0.0-M2 and OpenEJB Standalone 8.0.0-M2 (from http://tomee.apache.org/download-ng.html)

I have installed all those TomEE versions and changed the name of those folders after extracting it but now, I'm not able to check which version I'm using. I have tried using tomee-catalina-8.0.0-M2.jar JAR file but it all looks same.

I just want to differentiate versions mentioned in http://tomee.apache.org/comparison.html

Note: Don't give me answers based on a random jar file present or not present in different versions of TomEE.

Mohit Rathore
  • 428
  • 3
  • 10
  • see the comparison table and look for the presence/absence of specific jars -> eclipselink, mojara, etc – Svetlin Zarev May 20 '19 at 14:28
  • You can detect the specific jar file but there should be some association between them. Right? If not then, how TomEE versions are different? because If I copy one jar file from another folder then TomEE should not be able to detect the correct version. – Mohit Rathore May 21 '19 at 04:30
  • Also, mojarra is present in all the bundles of TomEE but in the comparison page, it is present on TomEE plume only. – Mohit Rathore Jun 03 '19 at 09:53
  • bad luck/strategy! ...i downloaded "plume" and "webprofile", extracted and compared with a diff tool: the only difference are in: 1. the `NOTICE` file and 2. different (binaries) in `lib` ..the difference in NOTICE file is not significant, it is just differently filled&sorted. – xerx593 Jun 17 '19 at 16:52
  • 1
    The difference between the different profiles is just which libraries are bundled in and available by default. The TomEE version itself can be the same across the different profiles. – vlumi Jun 18 '19 at 01:58

1 Answers1

0

The difference between the versions are only in the contained numbers of libraries. Meaning, the TomEE source files will not differ at all. The installations will only have a different size of the lib folder (because of the mentioned differences in libraries).

If you have access to the directory structure, the simple solution is to check on the list of jar files. You are not interested in this method, but this is the easiest. :)

If you do not have access to the directory structure, or would like to know at runtime what kind of features are supported you could use a neat little trick to detect features and correlate those with the table provided here.

TomEE editions features

The solution itself is to ask for the classes regarding the specific features. To do so you need a list of class names with correlation to the features. After that you can use a method like this to check if the class is accessible (if you are using classpaths instead of module-path).

private boolean isClassPresent(String className){
    try {
        Class.forName(className);
        return true;
    } catch (ClassNotFoundException e) {
        return false;
    }
}

With the generated list you'll be able to guess which pre-configured version of TomEE is used.

Be careful tho, if any additional lib is added, it could mess up your calculations.

Hash
  • 4,647
  • 5
  • 21
  • 39
  • If I add eclipse link jar file in lib folder of TomEE webprofile will it become TomEE plume? – Mohit Rathore Jun 19 '19 at 07:56
  • Well `TomEE+` + `EclipseLink` + `Mojarra` = `TomEE PluME` At first that was really bothering me, that those are just fantasy names, but later on I got used to it... Mostly I use the `PluME` version everywhere as it does not make any big difference as classes will not be loaded if those are not necessary. – Hash Jun 19 '19 at 08:39
  • *1.* As I can see mojarra is present on every package. So why the document states (https://i.stack.imgur.com/dcY3k.png) mojarra is not present on any other package apart from TomEE Plume? *2.* Why they are providing different versions of TomEE if they are just dealing with libraries which we can download from different sources and create some application. *3.* If the difference is just jar file so they may also not able to detect what TomEE version it is? – Mohit Rathore Jun 21 '19 at 03:42
  • Good questions... I think those should be asked from the devs here: http://tomee.apache.org/mailing-lists.html – Hash Jun 21 '19 at 10:45