Friday, April 23, 2010

ParentAppContext

The bk-core.spring is deployed by Spring Deployer and its applicatonContext could be parent context of the webApplicatonContext (loaded by ContextLoaderListener) in bk-config-engine.war to share the beans in bk-core. To configure this:

1. In bk-core's jboss-spring.xml


BeanFactory=(java:/bkCore);

Then the beanFactory will be bound to JNDI in unserialized form with the given name by Spring deployer.

2. In bk-config-engine.war's web.xml


parentContextKey
bkCoreAppContext


3. Add beanRefContext.xml in bk-config-engine.war (located in classpath)

<jee:jndi-lookup id="bkCoreAppContext" jndi-name="java:/bkCore"/>

No comments: