public class JndiRegistrationSupport extends AbstractRegistrationSupport
JndiRegistrationSupport extends the
AbstractRegistrationSupport class to register repositories with a
JNDI context whose provider URL and initial factory class name may be
configured.
Note: Currently, only these two properties are declared to be configurable, in the future a mechanism should be devised to support declaration of more properties.
| Modifier and Type | Class and Description |
|---|---|
static interface |
JndiRegistrationSupport.Configuration |
registryLock, REPOSITORY_REGISTRATION_NAME| Constructor and Description |
|---|
JndiRegistrationSupport() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
bindLog(org.osgi.service.log.LogService log)
Binds the LogService
|
protected Object |
bindRepository(String name,
javax.jcr.Repository repository)
Called to actually register a repository with the registry.
|
protected boolean |
doActivate()
Performs additional activation tasks.
|
protected void |
doDeactivate()
Performs additional deactivation tasks.
|
protected void |
unbindLog(org.osgi.service.log.LogService log)
Unbinds the LogService
|
protected void |
unbindRepository(String name,
Object data)
Called to actually unregister a repository with the registry.
|
activate, bindRepository, deactivate, getComponentContext, getName, log, unbindRepositoryprotected boolean doActivate()
AbstractRegistrationSupportAbstractRegistrationSupport.activate(ComponentContext) method and is intended for internal
setup, such as acquiring the registry.doActivate in class AbstractRegistrationSupporttrue
is returned, activation succeeded and any repositories which have
been bound before the component was activated are now actually
registered. If false is returned, activation
failed and this component is disabled and receives no further
repository bind and unbound events (apart for unbind events for
repositories which have already been bound).protected void doDeactivate()
AbstractRegistrationSupportAbstractRegistrationSupport.deactivate(ComponentContext) method and is intended for internal
cleanup of setup done by the AbstractRegistrationSupport.doActivate() method.
This method is always called, regardless of whether AbstractRegistrationSupport.doActivate()
succeeded or not.
doDeactivate in class AbstractRegistrationSupportprotected Object bindRepository(String name, javax.jcr.Repository repository)
AbstractRegistrationSupportAbstractRegistrationSupport.activate(ComponentContext) for any repositories
bound before the component was activated and by
AbstractRegistrationSupport.bindRepository(ServiceReference) for any repositories bound
after the component was activated.
If actual registration fails, this method is expected to return
null to indicate this fact. In this case, the
AbstractRegistrationSupport.unbindRepository(String, Object) will NOT be called for the
named repository.
This method may safely assume that it is only called on or after activation of this component on or before the component deactivation.
bindRepository in class AbstractRegistrationSupportname - The name under which the repository is to be registered.repository - The javax.jcr.Repository to register.data
parameter to the AbstractRegistrationSupport.unbindRepository(String, Object) method
to unregister the repository of the given name. This may be
null if actual registration failed.protected void unbindRepository(String name, Object data)
AbstractRegistrationSupportAbstractRegistrationSupport.unbindRepository(ServiceReference) for any
repositories unbound before the component is deactivated and by
AbstractRegistrationSupport.deactivate(ComponentContext) for any repositories not unbound
before the component is deactivated.
If the AbstractRegistrationSupport.bindRepository(String, Repository) returned
null for when the named repository was registered, this
method is not called.
This method may safely assume that it is only called on or after activation of this component on or before the component deactivation.
unbindRepository in class AbstractRegistrationSupportname - The name under which the repository is to be registered.data - The data object returned by the
AbstractRegistrationSupport.bindRepositoryInternal(String, ServiceReference)
method.protected void bindLog(org.osgi.service.log.LogService log)
AbstractRegistrationSupportbindLog in class AbstractRegistrationSupportprotected void unbindLog(org.osgi.service.log.LogService log)
AbstractRegistrationSupportunbindLog in class AbstractRegistrationSupportCopyright © 2007–2018 The Apache Software Foundation. All rights reserved.