|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.txbridge.ba.execute.ServiceLocator
public class ServiceLocator
The Service Locator component is responsible for locating EJBs. It uses a caching mechanism so that if an EJB has been previously searched for a cached reference can be returned. Based on: http://java.sun.com/blueprints/patterns/ServiceLocator.html
Field Summary | |
---|---|
private java.util.concurrent.ConcurrentMap<java.lang.String,java.lang.Object> |
beanCache
|
private javax.naming.InitialContext |
initialContext
|
private static ServiceLocator |
localServiceLocator
|
private static org.apache.log4j.Logger |
log
|
private static java.util.concurrent.ConcurrentMap<java.lang.String,ServiceLocator> |
serviceLocators
|
Constructor Summary | |
---|---|
private |
ServiceLocator()
Constructor |
private |
ServiceLocator(java.lang.String providerURL)
Constructor |
Method Summary | |
---|---|
static ServiceLocator |
getInstance(java.lang.String providerURL)
Returns the instance of the Service Locator object. |
java.lang.Object |
getInterface(java.lang.String jndiName,
java.lang.Class interfaceName)
This method returns a reference to the interface of an EJB. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static org.apache.log4j.Logger log
private javax.naming.InitialContext initialContext
private java.util.concurrent.ConcurrentMap<java.lang.String,java.lang.Object> beanCache
private static ServiceLocator localServiceLocator
private static java.util.concurrent.ConcurrentMap<java.lang.String,ServiceLocator> serviceLocators
Constructor Detail |
---|
private ServiceLocator() throws javax.naming.NamingException
javax.naming.NamingException
- if there was a naming error.private ServiceLocator(java.lang.String providerURL) throws javax.naming.NamingException
providerURL
- is the URL of the provider.
javax.naming.NamingException
- if there was a naming error.Method Detail |
---|
public static ServiceLocator getInstance(java.lang.String providerURL) throws ServiceLocatorException
providerURL
- is the Provider URL
ServiceLocatorException
- if it was not possible to create the service locator.public java.lang.Object getInterface(java.lang.String jndiName, java.lang.Class interfaceName) throws ServiceLocatorException
jndiName
- is the name of the bean.interfaceName
- is the class of the remote interface.
ServiceLocatorException
- if there was an error with the lookup.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |