I have a scheduled task described by schedule-service.xml. The implementation of this service is in a class which stays inside my .ear file. As the default configuration says, the schedule-service.xml is deployed first and a ClassNotFoundException is throw. I solved this using org.jboss.deployment.scanner.PrefixDeploymentSorter and renaming schedule-service.xml to 0schedule-service.xml but this solution does not seam so good. Any suggestion?