org.sr.server.ejb
Class EJB3ServiceLocator

java.lang.Object
  extended by org.sr.server.AbstractServiceLocator
      extended by org.sr.server.ejb.EJB3ServiceLocator
All Implemented Interfaces:
IServiceLocator

public class EJB3ServiceLocator
extends AbstractServiceLocator
implements IServiceLocator

This class is a Service Locator implementation for EJB3 objects.This locator access EJB instances by using JNDI, so the target attribute of services need to show the JNDI name of the target EJB.

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=".*" />
  </Service>
 <Services>
</Config>

Author:
Serhat Dirik

Field Summary
 
Fields inherited from interface org.sr.server.IServiceLocator
SESSION_KEY_PREFIX
 
Constructor Summary
EJB3ServiceLocator()
           
 
Method Summary
 java.lang.Object getServiceByName(java.lang.String serviceName, ICallerContextInfo<?> context)
           
 
Methods inherited from class org.sr.server.AbstractServiceLocator
getLocatorName, getOperationDefinition, getServiceDefinition, getServiceDefinitions, registerService, setLocatorName, unRegisterService
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.sr.server.IServiceLocator
getLocatorName, getOperationDefinition, getServiceDefinition, getServiceDefinitions, registerService, setLocatorName, unRegisterService
 

Constructor Detail

EJB3ServiceLocator

public EJB3ServiceLocator()
Method Detail

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