public List<Injection> buildInjections(JndiEncInfo jndiEnc) throws OpenEJBException {
List<Injection> injections = new ArrayList<Injection>();
for (EnvEntryInfo info : jndiEnc.envEntries) {
for (InjectionInfo target : info.targets) {
Class targetClass = loadClass(target.className);
Injection injection = new Injection(info.name, target.propertyName, targetClass);
injections.add(injection);
}
}
for (EjbReferenceInfo info : jndiEnc.ejbReferences) {
for (InjectionInfo target : info.targets) {
Class targetClass = loadClass(target.className);
Injection injection = new Injection(info.referenceName, target.propertyName, targetClass);
injections.add(injection);
}
}
for (EjbLocalReferenceInfo info : jndiEnc.ejbLocalReferences) {
for (InjectionInfo target : info.targets) {
Class targetClass = loadClass(target.className);
Injection injection = new Injection(info.referenceName, target.propertyName, targetClass);
injections.add(injection);
}
}
for (PersistenceUnitReferenceInfo info : jndiEnc.persistenceUnitRefs) {
for (InjectionInfo target : info.targets) {
Class targetClass = loadClass(target.className);
Injection injection = new Injection(info.referenceName, target.propertyName, targetClass);
injections.add(injection);
}
}
for (PersistenceContextReferenceInfo info : jndiEnc.persistenceContextRefs) {
for (InjectionInfo target : info.targets) {
Class targetClass = loadClass(target.className);
Injection injection = new Injection(info.referenceName, target.propertyName, targetClass);
injections.add(injection);
}
}
for (ResourceReferenceInfo info : jndiEnc.resourceRefs) {
for (InjectionInfo target : info.targets) {
Class targetClass = loadClass(target.className);
Injection injection = new Injection(info.referenceName, target.propertyName, targetClass);
injections.add(injection);
}
}
for (ResourceEnvReferenceInfo info : jndiEnc.resourceEnvRefs) {
for (InjectionInfo target : info.targets) {
Class targetClass = loadClass(target.className);
Injection injection = new Injection(info.resourceEnvRefName, target.propertyName, targetClass);
injections.add(injection);
}
}
for (ServiceReferenceInfo info : jndiEnc.serviceRefs) {
for (InjectionInfo target : info.targets) {
Class targetClass = loadClass(target.className);
Injection injection = new Injection(info.referenceName, target.propertyName, targetClass);
injections.add(injection);
}
}
return injections;
}