|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.figure8.join.core.setup.BootstrapManager
public class BootstrapManager
Manager object responsible of Join application bootstrapping.
Field Summary | |
---|---|
protected static org.apache.commons.logging.Log |
log
Get a commons logger. |
Constructor Summary | |
---|---|
BootstrapManager()
Creates a new instance of BootstrapManager |
Method Summary | |
---|---|
void |
bootstrap()
Bootstrap the Join application ! |
void |
bootstrapDatabase(DatabaseDetails details,
boolean embedded)
Bootstrap the database access system. |
void |
bootstrapDatasource(java.lang.String datasourceName,
java.lang.String dialect)
Bootstrap the database access system through JNDI datasource. |
void |
bootstrapMessaging(java.lang.String brokerUrl,
boolean embedded)
Bootstrap the messaging system. |
java.lang.String |
getJoinHome()
Retrieve Join home location onto filesystem. |
java.lang.String |
getOtherSideUrl()
Convenient method for knowing the Url of application other side. |
java.lang.String |
getPathProperty(java.lang.String key)
Convenient method for getting a path property that may contain the ${join.home} string. |
java.lang.String |
getProperty(java.lang.String property)
Convenient method for retrieving application configuration property. |
boolean |
isAsynchronousSide()
|
boolean |
isBootstrapped()
Tell if bootstrap phase has ran ok. |
boolean |
isCustomSetup()
Convenient method for knowing if application setup is a custom setup. |
boolean |
isDissociatedSetup()
|
boolean |
isHibernateSetup()
Convenient method for knowing if hibernate setup is complete. |
boolean |
isMessagingSetup()
Convenient method for knowing it activeMQ setup is complete. |
boolean |
isSetupComplete()
Convenient method for knowing if application setup is complete. |
boolean |
isStandardSetup()
Convenient method for knowing if application setup is a standard setup. |
boolean |
isSynchronousSide()
|
protected void |
launchConnectionKeeper()
Launch the ConnectionKeeper daemon. |
void |
setApplicationConfig(ApplicationConfig config)
|
void |
setHibernateConfigurator(HibernateConfigurator configurator)
|
void |
setHomeLocator(JoinHomeLocator locator)
|
void |
setMessagingConfigurator(ActiveMQConfigurator configurator)
|
void |
setProperty(java.lang.String key,
java.lang.Object value)
Convenient method for setting an application config property. |
protected void |
testBrokerConnection(java.net.URI brokerUri)
Test the connection to broker denoted by brokerUri. |
protected void |
testDatabaseConnection(DatabaseDetails details)
Test the connection to configured database. |
protected void |
testDatasourceAccess(java.lang.String datasourceName)
Test the access to configured datasource |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static org.apache.commons.logging.Log log
Constructor Detail |
---|
public BootstrapManager()
Method Detail |
---|
public void setHomeLocator(JoinHomeLocator locator)
locator
- JoinHomeLocator
instancepublic void setApplicationConfig(ApplicationConfig config)
config
- ApplicationConfig
instancepublic void setMessagingConfigurator(ActiveMQConfigurator configurator)
configurator
- ActiveMQConfigurator
instancepublic void setHibernateConfigurator(HibernateConfigurator configurator)
configurator
- HibernateConfigurator
instancepublic void bootstrap() throws BootstrapException
BootstrapException
- if Join home cannot be located or if parsing
the application configuration file failed.public boolean isBootstrapped()
public boolean isSetupComplete()
ApplicationConfig
public boolean isCustomSetup()
ApplicationConfig
public boolean isStandardSetup()
ApplicationConfig
public boolean isMessagingSetup()
public boolean isHibernateSetup()
public boolean isSynchronousSide()
public boolean isAsynchronousSide()
public boolean isDissociatedSetup()
public java.lang.String getOtherSideUrl()
public java.lang.String getJoinHome()
public java.lang.String getProperty(java.lang.String property)
property
- The name of the property of retrieve
public void setProperty(java.lang.String key, java.lang.Object value)
key
- Unique id of the application propertyvalue
- Value associated to keyApplicationConfig.setProperty(String, Object)
public java.lang.String getPathProperty(java.lang.String key)
key
- Unique id of the application property
public void bootstrapDatabase(DatabaseDetails details, boolean embedded) throws BootstrapException
details
- Database security details wrapperembedded
- Tells if the db is the default embedded one
BootstrapException
- if database cannot be reached or configuredpublic void bootstrapDatasource(java.lang.String datasourceName, java.lang.String dialect) throws BootstrapException
datasourceName
- JNDI name of datasource to use for accessing databasedialect
- Dialect of database to access (as Hibernate dialect)
BootstrapException
- if database cannot be reached or configuredpublic void bootstrapMessaging(java.lang.String brokerUrl, boolean embedded) throws BootstrapException
brokerUrl
- Messaging broker urlembedded
- Tells if the messaging broker is on this side of application
BootstrapException
- if connection to messaging system cannot be configuredprotected void testDatabaseConnection(DatabaseDetails details) throws java.lang.Exception
details
- Database details wrapper for connection params
java.lang.Exception
protected void testDatasourceAccess(java.lang.String datasourceName) throws java.lang.Exception
datasourceName
- JNDI name of datasource to access
java.lang.Exception
protected void testBrokerConnection(java.net.URI brokerUri) throws java.lang.Exception
brokerUri
- The URI of broker to test connection to
java.lang.Exception
protected void launchConnectionKeeper()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |