/** * Create the RMI stub, typically by looking it up. * <p>Called on interceptor initialization if "cacheStub" is "true"; * else called for each invocation by {@link #getStub()}. * <p>The default implementation retrieves the service from the * JNDI environment. This can be overridden in subclasses. * @return the RMI stub to store in this interceptor * @throws RemoteLookupFailureException if RMI stub creation failed * @see #setCacheStub * @see #lookup */ protected Object lookupStub() throws RemoteLookupFailureException { try { return lookup(); } catch (NamingException ex) { throw new RemoteLookupFailureException("JNDI lookup for RMI service [" + getJndiName() + "] failed", ex); } }
/** * Create the RMI stub, typically by looking it up. * <p>Called on interceptor initialization if "cacheStub" is "true"; * else called for each invocation by {@link #getStub()}. * <p>The default implementation retrieves the service from the * JNDI environment. This can be overridden in subclasses. * @return the RMI stub to store in this interceptor * @throws RemoteLookupFailureException if RMI stub creation failed * @see #setCacheStub * @see #lookup */ protected Object lookupStub() throws RemoteLookupFailureException { try { return lookup(); } catch (NamingException ex) { throw new RemoteLookupFailureException("JNDI lookup for RMI service [" + getJndiName() + "] failed", ex); } }
/** * Create the RMI stub, typically by looking it up. * <p>Called on interceptor initialization if "cacheStub" is "true"; * else called for each invocation by {@link #getStub()}. * <p>The default implementation retrieves the service from the * JNDI environment. This can be overridden in subclasses. * @return the RMI stub to store in this interceptor * @throws RemoteLookupFailureException if RMI stub creation failed * @see #setCacheStub * @see #lookup */ protected Object lookupStub() throws RemoteLookupFailureException { try { return lookup(); } catch (NamingException ex) { throw new RemoteLookupFailureException("JNDI lookup for RMI service [" + getJndiName() + "] failed", ex); } }