This method will search for all of the persistence archives on the classpath and weave
all the classes associated with those persistence units.
Set<Archive> pars = PersistenceUnitProcessor.findPersistenceArchives();
Iterator<Archive> parIterator = pars.iterator();
while (parIterator.hasNext()){
List<SEPersistenceUnitInfo> puInfoList = PersistenceUnitProcessor.getPersistenceUnits(parIterator.next(), Thread.currentThread().getContextClassLoader());
Iterator<SEPersistenceUnitInfo> puInfoListIterator = puInfoList.iterator();
while (puInfoListIterator.hasNext()){
Persistence.createEntityManagerFactory(puInfoListIterator.next().getPersistenceUnitName());
}
}