/** * Perform a JNDI lookup for the given resource by name. * <p>Called for EntityManagerFactory and EntityManager lookup * when JNDI names are mapped for specific persistence units. * @param jndiName the JNDI name to look up * @param requiredType the required type of the object * @return the obtained object * @throws Exception if the JNDI lookup failed */ protected <T> T lookup(String jndiName, Class<T> requiredType) throws Exception { return new LocatorDelegate().lookup(jndiName, requiredType); }
/** * Perform a JNDI lookup for the given resource by name. * <p>Called for EntityManagerFactory and EntityManager lookup * when JNDI names are mapped for specific persistence units. * @param jndiName the JNDI name to look up * @param requiredType the required type of the object * @return the obtained object * @throws Exception if the JNDI lookup failed */ protected <T> T lookup(String jndiName, Class<T> requiredType) throws Exception { return new LocatorDelegate().lookup(jndiName, requiredType); }
/** * Perform a JNDI lookup for the given resource by name. * <p>Called for EntityManagerFactory and EntityManager lookup * when JNDI names are mapped for specific persistence units. * @param jndiName the JNDI name to look up * @param requiredType the required type of the object * @return the obtained object * @throws Exception if the JNDI lookup failed */ protected <T> T lookup(String jndiName, Class<T> requiredType) throws Exception { return new LocatorDelegate().lookup(jndiName, requiredType); }