CentraSite Documentation : CentraSite Developer’s Guide : Application Framework : Introduction : StandaloneRegistryProvider
StandaloneRegistryProvider
In order to obtain a connection to the repository, an instance of StandAloneRegistryProvider must be created. This registry provider has several important parameters for its creation that will affect the functionality of CSAF. CSAF supports several constructors which exclude some of the properties and use their default values instead. The constructor with full parameter list is:
StandaloneRegistryProvider(String registryUrl, String user,
String password, boolean browserBehaviour){}
registryUrl
Specifies the URL to the CentraSite registry. Default value is http://localhost:53307/CentraSite/CentraSite.
user
The username of the registry user
password
The password of the registry user
browserBehaviour
Sets the com.centrasite.jaxr.BrowserBehaviour property of the connection factory. To enable type management, this flag must be set to true; to enable RevisionManagement it must be false. Default value is false.
Example 38. Example for creating a BeanPool instance by using SessionContext and StandaloneRegistryProvider
SessionContext context = null;
RegistryProvider provider = null;try {
provider = new StandaloneRegistryProvider(registryUsername,
registryPassword, true);
 
Configuration conf = new Configuration();
conf.setRegistryProvider(provider);
conf.addBeanType(Item.class);
conf.addBeanType(Action.class);
conf.addBeanType(Entry.class);
conf.addBeanType(ExternalLink.class);
context = SessionContext.createInstance(conf);
} catch (CSAppFrameworkException e) {
// Do something with the exception
}
 
BeanPool beanPool = context.getCurrentBeanPool();
Copyright © Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback