org.kuali.rice.ksb.messaging.config
Class KSBConfigurer

java.lang.Object
  extended by org.kuali.rice.core.lifecycle.BaseLifecycle
      extended by org.kuali.rice.core.lifecycle.BaseCompositeLifecycle
          extended by org.kuali.rice.core.config.ModuleConfigurer
              extended by org.kuali.rice.ksb.messaging.config.KSBConfigurer
All Implemented Interfaces:
Configurer, RiceConfigEventListener, Lifecycle, org.springframework.beans.factory.InitializingBean

public class KSBConfigurer
extends ModuleConfigurer

Used to configure the embedded workflow. This could be used to configure embedded workflow programmatically but mostly this is a base class by which to hang specific configuration behavior off of through subclassing

Author:
Kuali Rice Team (rice.collab@kuali.org)

Field Summary
private  List<AlternateEndpointLocation> alternateEndpointLocations
           
private  List<AlternateEndpoint> alternateEndpoints
           
private  org.quartz.Scheduler exceptionMessagingScheduler
           
private  boolean isStarted
           
private  String keystoreAlias
           
private  String keystoreFile
           
private  String keystorePassword
           
private  DataSource messageDataSource
           
private  String messageDataSourceJndiName
           
private  DataSource nonTransactionalMessageDataSource
           
private  String nonTransactionalMessageDataSourceJndiName
           
private  org.springframework.transaction.PlatformTransactionManager platformTransactionManager
           
private  DataSource registryDataSource
           
private  String registryDataSourceJndiName
           
private  List<ServiceDefinition> services
           
private  String serviceServletUrl
           
private  String webserviceRetry
           
private  String webservicesUrl
           
 
Fields inherited from class org.kuali.rice.core.config.ModuleConfigurer
EMBEDDED_RUN_MODE, exposeServicesOnBus, includeUserInterfaceComponents, LOCAL_RUN_MODE, LOG, REMOTE_RUN_MODE, resourceLoaderName, setSOAPServicesAsDefault, springFileLocations, testMode, THIN_RUN_MODE, VALID_RUN_MODES, webInterface, webModuleBaseUrl, webModuleConfigName, webModuleConfigurationFiles
 
Constructor Summary
KSBConfigurer()
           
 
Method Summary
protected  void cleanUpConfiguration()
          Because our configuration is global, shutting down Rice does not get rid of objects stored there.
protected  void configureAlternateEndpoints(Config config)
           
protected  void configureBus(Config config)
           
protected  void configureDataSource(Config config)
           
protected  void configureKeystore(Config config)
           
protected  void configurePlatformTransactionManager(Config config)
           
protected  void configureScheduler(Config config)
           
protected  void configureServiceList(Config config, String key, List services)
           
 List<AlternateEndpointLocation> getAlternateEndpointLocations()
           
 List<AlternateEndpoint> getAlternateEndpoints()
           
 org.quartz.Scheduler getExceptionMessagingScheduler()
           
 String getKeystoreAlias()
           
 String getKeystoreFile()
           
 String getKeystorePassword()
           
 DataSource getMessageDataSource()
           
 String getMessageDataSourceJndiName()
           
 DataSource getNonTransactionalMessageDataSource()
           
 String getNonTransactionalMessageDataSourceJndiName()
           
 org.springframework.transaction.PlatformTransactionManager getPlatformTransactionManager()
           
 DataSource getRegistryDataSource()
           
 String getRegistryDataSourceJndiName()
           
 ResourceLoader getResourceLoaderToRegister()
          This method returns a resource loader that this module might want to register with the global resource loader.
protected  String getServiceNamespace(Config config)
           
 List<ServiceDefinition> getServices()
           
 String getServiceServletUrl()
           
 String getSpringFileLocations()
          This method returns a comma separated string of spring file locations for this module.
 String getWebserviceRetry()
           
 String getWebservicesUrl()
           
 boolean isStarted()
           
 Config loadConfig(Config parentConfig)
           
protected  List<Lifecycle> loadLifecycles()
          This overridden method ...
 void onEvent(RiceConfigEvent event)
          Used to refresh the service registry after the Application Context is initialized.
 void setAlternateEndpointLocations(List<AlternateEndpointLocation> alternateEndpointLocations)
           
 void setAlternateEndpoints(List<AlternateEndpoint> alternateEndpoints)
           
 void setExceptionMessagingScheduler(org.quartz.Scheduler exceptionMessagingScheduler)
           
 void setKeystoreAlias(String keystoreAlias)
           
 void setKeystoreFile(String keystoreFile)
           
 void setKeystorePassword(String keystorePassword)
           
 void setMessageDataSource(DataSource messageDataSource)
           
 void setMessageDataSourceJndiName(String messageDataSourceJndiName)
           
 void setNonTransactionalMessageDataSource(DataSource nonTransactionalMessageDataSource)
           
 void setNonTransactionalMessageDataSourceJndiName(String nonTransactionalMessageDataSourceJndiName)
           
 void setPlatformTransactionManager(org.springframework.transaction.PlatformTransactionManager springTransactionManager)
           
 void setRegistryDataSource(DataSource registryDataSource)
           
 void setRegistryDataSourceJndiName(String registryDataSourceJndiName)
           
 void setServices(List<ServiceDefinition> javaServices)
           
 void setServiceServletUrl(String serviceServletUrl)
           
protected  void setStarted(boolean isStarted)
           
 void setWebserviceRetry(String webserviceRetry)
           
 void setWebservicesUrl(String webservicesUrl)
           
 boolean shouldRenderWebInterface()
          Returns true - KSB UI should always be included.
 void stop()
           
 
Methods inherited from class org.kuali.rice.core.config.ModuleConfigurer
afterPropertiesSet, configureRunMode, configureWebConfiguration, createResourceLoader, getDefaultConfigPackagePath, getDefaultResourceLoaderName, getDefaultResourceLoaderQName, getDefaultSpringBeansPath, getModuleName, getRunMode, getWebModuleBaseUrl, getWebModuleConfigName, getWebModuleConfigurationFiles, hasWebInterface, isExposeServicesOnBus, isIncludeUserInterfaceComponents, isSetSOAPServicesAsDefault, isTestMode, setExposeServicesOnBus, setHasWebInterface, setIncludeUserInterfaceComponents, setModuleName, setRunMode, setSetSOAPServicesAsDefault, setSpringFileLocations, setTestMode, setWebModuleBaseUrl, setWebModuleConfigName, setWebModuleConfigurationFiles
 
Methods inherited from class org.kuali.rice.core.lifecycle.BaseCompositeLifecycle
start
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.kuali.rice.core.lifecycle.Lifecycle
start
 

Field Detail

services

private List<ServiceDefinition> services

alternateEndpointLocations

private List<AlternateEndpointLocation> alternateEndpointLocations

alternateEndpoints

private List<AlternateEndpoint> alternateEndpoints

serviceServletUrl

private String serviceServletUrl

keystoreAlias

private String keystoreAlias

keystorePassword

private String keystorePassword

keystoreFile

private String keystoreFile

webservicesUrl

private String webservicesUrl

webserviceRetry

private String webserviceRetry

registryDataSource

private DataSource registryDataSource

messageDataSource

private DataSource messageDataSource

nonTransactionalMessageDataSource

private DataSource nonTransactionalMessageDataSource

registryDataSourceJndiName

private String registryDataSourceJndiName

messageDataSourceJndiName

private String messageDataSourceJndiName

nonTransactionalMessageDataSourceJndiName

private String nonTransactionalMessageDataSourceJndiName

exceptionMessagingScheduler

private org.quartz.Scheduler exceptionMessagingScheduler

platformTransactionManager

private org.springframework.transaction.PlatformTransactionManager platformTransactionManager

isStarted

private boolean isStarted
Constructor Detail

KSBConfigurer

public KSBConfigurer()
Method Detail

loadConfig

public Config loadConfig(Config parentConfig)
                  throws Exception
Overrides:
loadConfig in class ModuleConfigurer
Throws:
Exception

getSpringFileLocations

public String getSpringFileLocations()
Description copied from class: ModuleConfigurer
This method returns a comma separated string of spring file locations for this module.

Overrides:
getSpringFileLocations in class ModuleConfigurer

shouldRenderWebInterface

public boolean shouldRenderWebInterface()
Returns true - KSB UI should always be included.

Overrides:
shouldRenderWebInterface in class ModuleConfigurer
See Also:
ModuleConfigurer.shouldRenderWebInterface()

getResourceLoaderToRegister

public ResourceLoader getResourceLoaderToRegister()
                                           throws Exception
Description copied from class: ModuleConfigurer
This method returns a resource loader that this module might want to register with the global resource loader.

Overrides:
getResourceLoaderToRegister in class ModuleConfigurer
Throws:
Exception

loadLifecycles

protected List<Lifecycle> loadLifecycles()
                                  throws Exception
Description copied from class: ModuleConfigurer
This overridden method ...

Overrides:
loadLifecycles in class ModuleConfigurer
Throws:
Exception
See Also:
BaseCompositeLifecycle.loadLifecycles()

onEvent

public void onEvent(RiceConfigEvent event)
             throws Exception
Used to refresh the service registry after the Application Context is initialized. This way any services that were exported on startup will be available in the service registry once startup is complete.

Specified by:
onEvent in interface RiceConfigEventListener
Overrides:
onEvent in class ModuleConfigurer
Throws:
Exception

getServiceNamespace

protected String getServiceNamespace(Config config)

configureBus

protected void configureBus(Config config)
                     throws Exception
Throws:
Exception

configureServiceList

protected void configureServiceList(Config config,
                                    String key,
                                    List services)
                             throws Exception
Throws:
Exception

configureScheduler

protected void configureScheduler(Config config)

configureKeystore

protected void configureKeystore(Config config)

configureDataSource

protected void configureDataSource(Config config)

configurePlatformTransactionManager

protected void configurePlatformTransactionManager(Config config)

configureAlternateEndpoints

protected void configureAlternateEndpoints(Config config)

stop

public void stop()
          throws Exception
Specified by:
stop in interface Lifecycle
Overrides:
stop in class BaseCompositeLifecycle
Throws:
Exception

cleanUpConfiguration

protected void cleanUpConfiguration()
Because our configuration is global, shutting down Rice does not get rid of objects stored there. For that reason we need to manually clean these up. This is most important in the case of the service bus because the configuration is used to store services to be exported. If we don't clean this up then a shutdown/startup within the same class loading context causes the service list to be doubled and results in "multiple endpoint" error messages.


isStarted

public boolean isStarted()
Specified by:
isStarted in interface Lifecycle
Overrides:
isStarted in class BaseLifecycle

setStarted

protected void setStarted(boolean isStarted)
Overrides:
setStarted in class BaseLifecycle

getServices

public List<ServiceDefinition> getServices()

setServices

public void setServices(List<ServiceDefinition> javaServices)

getKeystoreAlias

public String getKeystoreAlias()

setKeystoreAlias

public void setKeystoreAlias(String keystoreAlias)

getKeystoreFile

public String getKeystoreFile()

setKeystoreFile

public void setKeystoreFile(String keystoreFile)

getKeystorePassword

public String getKeystorePassword()

setKeystorePassword

public void setKeystorePassword(String keystorePassword)

getWebserviceRetry

public String getWebserviceRetry()

setWebserviceRetry

public void setWebserviceRetry(String webserviceRetry)

getWebservicesUrl

public String getWebservicesUrl()

setWebservicesUrl

public void setWebservicesUrl(String webservicesUrl)

getServiceServletUrl

public String getServiceServletUrl()

setServiceServletUrl

public void setServiceServletUrl(String serviceServletUrl)

getMessageDataSource

public DataSource getMessageDataSource()

setMessageDataSource

public void setMessageDataSource(DataSource messageDataSource)

getNonTransactionalMessageDataSource

public DataSource getNonTransactionalMessageDataSource()

setNonTransactionalMessageDataSource

public void setNonTransactionalMessageDataSource(DataSource nonTransactionalMessageDataSource)

getMessageDataSourceJndiName

public String getMessageDataSourceJndiName()

setMessageDataSourceJndiName

public void setMessageDataSourceJndiName(String messageDataSourceJndiName)

getNonTransactionalMessageDataSourceJndiName

public String getNonTransactionalMessageDataSourceJndiName()

setNonTransactionalMessageDataSourceJndiName

public void setNonTransactionalMessageDataSourceJndiName(String nonTransactionalMessageDataSourceJndiName)

getRegistryDataSource

public DataSource getRegistryDataSource()

setRegistryDataSource

public void setRegistryDataSource(DataSource registryDataSource)

getRegistryDataSourceJndiName

public String getRegistryDataSourceJndiName()

setRegistryDataSourceJndiName

public void setRegistryDataSourceJndiName(String registryDataSourceJndiName)

getExceptionMessagingScheduler

public org.quartz.Scheduler getExceptionMessagingScheduler()

setExceptionMessagingScheduler

public void setExceptionMessagingScheduler(org.quartz.Scheduler exceptionMessagingScheduler)

getPlatformTransactionManager

public org.springframework.transaction.PlatformTransactionManager getPlatformTransactionManager()

setPlatformTransactionManager

public void setPlatformTransactionManager(org.springframework.transaction.PlatformTransactionManager springTransactionManager)

getAlternateEndpointLocations

public List<AlternateEndpointLocation> getAlternateEndpointLocations()

setAlternateEndpointLocations

public void setAlternateEndpointLocations(List<AlternateEndpointLocation> alternateEndpointLocations)

getAlternateEndpoints

public List<AlternateEndpoint> getAlternateEndpoints()

setAlternateEndpoints

public void setAlternateEndpoints(List<AlternateEndpoint> alternateEndpoints)


Copyright © 2007-2011 The Kuali Foundation. All Rights Reserved.