EjbJar ejbJar = new EjbJar();
ejbJar.addEnterpriseBean(new StatelessBean(WidgetBean.class));
EjbJarInfo ejbJarInfo = config.configureApplication(ejbJar);
EnterpriseBeanInfo beanInfo = ejbJarInfo.enterpriseBeans.get(0);
Map<String, ResourceReferenceInfo> refs = new HashMap<String,ResourceReferenceInfo>();
for (ResourceReferenceInfo ref : beanInfo.jndiEnc.resourceRefs) {
refs.put(ref.referenceName.replaceAll(".*/",""), ref);
}