org.springframework.jndi

Class JndiObjectLocator

    • Constructor Detail

      • JndiObjectLocator

        public JndiObjectLocator()
    • Method Detail

      • setJndiName

        public void setJndiName(@Nullable
                                java.lang.String jndiName)
        Specify the JNDI name to look up. If it doesn't begin with "java:comp/env/" this prefix is added automatically if "resourceRef" is set to "true".
        Parameters:
        jndiName - the JNDI name to look up
        See Also:
        JndiLocatorSupport.setResourceRef(boolean)
      • getJndiName

        @Nullable
        public java.lang.String getJndiName()
        Return the JNDI name to look up.
      • setExpectedType

        public void setExpectedType(@Nullable
                                    java.lang.Class<?> expectedType)
        Specify the type that the located JNDI object is supposed to be assignable to, if any.
      • getExpectedType

        @Nullable
        public java.lang.Class<?> getExpectedType()
        Return the type that the located JNDI object is supposed to be assignable to, if any.
      • afterPropertiesSet

        public void afterPropertiesSet()
                                throws java.lang.IllegalArgumentException,
                                       javax.naming.NamingException
        Description copied from interface: InitializingBean
        Invoked by the containing BeanFactory after it has set all bean properties and satisfied BeanFactoryAware, ApplicationContextAware etc.

        This method allows the bean instance to perform validation of its overall configuration and final initialization when all bean properties have been set.

        Specified by:
        afterPropertiesSet in interface InitializingBean
        Throws:
        java.lang.IllegalArgumentException
        javax.naming.NamingException