TOMEE-1401

Reestablished functionality for the module type detection.