/** * PUBLIC: * Look up a given name in JNDI. This can be used by a subclass or even an * application to look up transaction artifacts that are required for the * implementation. * <p> * The lookup assumes that it is taking place on the server side, and that the * InitialContext can be used without requiring any special properties. * * @param jndiName The name to look up * @return The object bound in JNDI to the specified name * @exception TransactionException Thrown in case of lookup failure */ public Object jndiLookup(String jndiName) { Context context = null; Object jndiObject = null; try { context = new InitialContext(); jndiObject = context.lookup(jndiName); } catch (NamingException ex) { throw TransactionException.jndiLookupException(jndiName, ex); } finally { try { context.close(); } catch (Exception ex2) {/* ignore */ } } return jndiObject; }
/** * PUBLIC: * Look up a given name in JNDI. This can be used by a subclass or even an * application to look up transaction artifacts that are required for the * implementation. * <p> * The lookup assumes that it is taking place on the server side, and that the * InitialContext can be used without requiring any special properties. * * @param jndiName The name to look up * @return The object bound in JNDI to the specified name * @exception TransactionException Thrown in case of lookup failure */ public Object jndiLookup(String jndiName) { Context context = null; Object jndiObject = null; try { context = new InitialContext(); jndiObject = context.lookup(jndiName); } catch (NamingException ex) { throw TransactionException.jndiLookupException(jndiName, ex); } finally { try { context.close(); } catch (Exception ex2) {/* ignore */ } } return jndiObject; }
jndiObject = context.lookup(jndiName); } catch (NamingException ex) { throw TransactionException.jndiLookupException(jndiName, ex); } finally { if (context != null) {