Class JndiObjectLocator

  • All Implemented Interfaces:
    Serializable, org.apache.wicket.proxy.IProxyTargetLocator, org.apache.wicket.util.io.IClusterable

    public class JndiObjectLocator
    extends Object
    implements org.apache.wicket.proxy.IProxyTargetLocator
    Implementation of IProxyTargetLocator to locate object using JNDI

    To use this technique in a Wicket Page, just insert a line like

    private @Resource(name="referenceName") YouClass obj;

    The 'referenceName' attribute is mandatory, and refers to the name of the object as declared in the web.xml file

    Author:
    Filippo Diotalevi
    See Also:
    Serialized Form
    • Constructor Detail

      • JndiObjectLocator

        public JndiObjectLocator​(String beanId,
                                 Class<?> beanType)
        Constructor
        Parameters:
        beanId - bean name
        beanType - bean class
    • Method Detail

      • locateProxyTarget

        public Object locateProxyTarget()
        Specified by:
        locateProxyTarget in interface org.apache.wicket.proxy.IProxyTargetLocator
        See Also:
        IProxyTargetLocator.locateProxyTarget()
      • getBeanName

        public String getBeanName()
      • getBeanType

        public Class<?> getBeanType()