Package org.wso2.carbon.base
Class CarbonInitialContextFactory
java.lang.Object
org.wso2.carbon.base.CarbonInitialContextFactory
- All Implemented Interfaces:
InitialContextFactory
ICF wrapper class for Carbon.
This class itself can not create any initial context. It makes use of an already registered provider ICF instance
to create an initial context. The desired provider ICF name should be specified using the environment variable
provider.naming.factory.initial, which is the fully qualified class name of the provider.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetInitialContext(Hashtable environment) Create initial context using the given provider ICF name.static voidregisterProviderICF(String providerName, InitialContextFactory providerICF) Register a provider ICF instance
-
Constructor Details
-
CarbonInitialContextFactory
public CarbonInitialContextFactory()
-
-
Method Details
-
getInitialContext
Create initial context using the given provider ICF name. If the provider ICF name is not given the default provider is used.- Specified by:
getInitialContextin interfaceInitialContextFactory- Parameters:
environment- Initial context properties- Returns:
- Created IC
- Throws:
NamingException
-
registerProviderICF
Register a provider ICF instance- Parameters:
providerName- Fully qualified class name of the providerproviderICF- Provider instance
-