|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectch.elca.el4j.tests.services.persistence.generic.dao.ImpatientClass
public class ImpatientClass
This impatient class tries to access the daoRegistry before the Spring context is initialized.
| Field Summary | |
|---|---|
private ModuleApplicationContext |
m_applicationContext
The Spring application context. |
private boolean |
m_contextIsReady
Is context ready? |
private DaoRegistry |
m_daoRegistry
The dao registry. |
private Thread |
m_impatientThread
The thread that tries to access the daoRegistry too early. |
private boolean |
m_successful
Was test successful? |
| Constructor Summary | |
|---|---|
ImpatientClass()
|
|
| Method Summary | |
|---|---|
DaoRegistry |
getDaoRegistry()
|
boolean |
join()
Wait until impatient thread finally has accessed the DAO registry. |
void |
onContextRefreshed()
|
void |
setApplicationContext(ApplicationContext applicationContext)
|
void |
setDaoRegistry(DaoRegistry daoRegistry)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private ModuleApplicationContext m_applicationContext
private DaoRegistry m_daoRegistry
private Thread m_impatientThread
private volatile boolean m_contextIsReady
private boolean m_successful
| Constructor Detail |
|---|
public ImpatientClass()
| Method Detail |
|---|
public void setApplicationContext(ApplicationContext applicationContext)
throws BeansException
setApplicationContext in interface ApplicationContextAwareBeansExceptionpublic void onContextRefreshed()
onContextRefreshed in interface ModuleApplicationListenerpublic DaoRegistry getDaoRegistry()
public void setDaoRegistry(DaoRegistry daoRegistry)
daoRegistry - the DAO registrypublic boolean join()
true if test was successful.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||