VirtualFile ejbJarFile = resourceRoot.getRoot().getChild("META-INF/ejb-jar.xml");
if (ejbJarFile.exists()) {
SubDeploymentMarker.mark(resourceRoot);
ModuleRootMarker.mark(resourceRoot);
} else {
final Index index = resourceRoot.getAttachment(Attachments.ANNOTATION_INDEX);
if (index != null) {
if (!index.getAnnotations(STATEFUL).isEmpty() ||
!index.getAnnotations(STATELESS).isEmpty() ||
!index.getAnnotations(MESSAGE_DRIVEN).isEmpty() ||
!index.getAnnotations(SINGLETON).isEmpty()) {
//this is an EJB deployment
//TODO: we need to mark EJB sub deployments so the sub deployers know they are EJB deployments
SubDeploymentMarker.mark(resourceRoot);
ModuleRootMarker.mark(resourceRoot);
}