org.sr.server.ejb
Class EJB2ServiceLocator
java.lang.Object
org.sr.server.AbstractServiceLocator
org.sr.server.ejb.EJB2ServiceLocator
- All Implemented Interfaces:
- IServiceLocator
public class EJB2ServiceLocator
- extends AbstractServiceLocator
- implements IServiceLocator
This is service locator implementation class for Enterprise Java Beans that implemented using EJB 2.1 and former specs.
This locator access EJB instances by using JNDI, so the target attribute of services need to show the JNDI name of the target EJB.
In addition to that this locator needs that the service definitions describes the home interface class of the target EJB as custom
property.
Sample Configuration
<Config>
<Locators>
<Locator class="org.sr.server.ejb.EJB2ServiceLocator" name="EJB2Locator"/>
</Locators>
<Services>
<Service name="echoBean" target="test.bean.EchoBean" lifeContext="singleton" locator="EJB2Locator">
<Operation pattern=".*" />
<Property key="homeInterfaceClass" value="test.bean.EchoBeanHome"/>
</Service>
<Services>
</Config>
- Author:
- Serhat Dirik
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HOME_INTERFACE_ATTRIBUTE
public static final java.lang.String HOME_INTERFACE_ATTRIBUTE
- See Also:
- Constant Field Values
HOME_CREATE_METHOD
public static final java.lang.String HOME_CREATE_METHOD
- See Also:
- Constant Field Values
EJB2ServiceLocator
public EJB2ServiceLocator()
getServiceByName
public java.lang.Object getServiceByName(java.lang.String serviceName,
ICallerContextInfo<?> context)
throws ServiceNotFoundException,
SessionNotFoundException,
ServicePreparationException
- Specified by:
getServiceByName
in interface IServiceLocator
- Throws:
ServiceNotFoundException
SessionNotFoundException
ServicePreparationException