org.wicketstuff.javaee
Class JndiObjectLocator

java.lang.Object
  extended by org.wicketstuff.javaee.JndiObjectLocator
All Implemented Interfaces:
Serializable, IProxyTargetLocator, IClusterable

public class JndiObjectLocator
extends Object
implements 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 Summary
JndiObjectLocator(String beanId, Class<?> beanType)
          Constructor
 
Method Summary
 boolean equals(Object obj)
           
 String getBeanName()
           
 Class<?> getBeanType()
           
 int hashCode()
           
 Object locateProxyTarget()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

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 IProxyTargetLocator
See Also:
IProxyTargetLocator.locateProxyTarget()

equals

public boolean equals(Object obj)
Overrides:
equals in class Object
See Also:
Object.equals(java.lang.Object)

hashCode

public int hashCode()
Overrides:
hashCode in class Object
See Also:
Object.hashCode()

getBeanName

public String getBeanName()

getBeanType

public Class<?> getBeanType()


Copyright © 2013. All Rights Reserved.