JBoss Community

Re: Deployer problem: Duplicate ApplicationContext & Beans created

created by Adam Sussman in Spring Integration - View the full discussion

Here is a trace of the spring deployer.  This is done in a very simple setup.  The only things in the 'deploy' directory are "hdscanner-jboss-beans.xml" (which is part of the jboss distribution) and "host-messenger-spring.xml" (which is the spring file seeing double deployment).

 

Let me know if you want more stuff logged.

 

2010-09-22 10:44:47,932 TRACE [org.jboss.spring.deployers.SpringParserDeployer] (main) Deploying: vfsfile:/home/myddryn/runtime/jboss/server/amq/deploy/hdscanner-jboss-beans.xml
2010-09-22 10:44:47,932 TRACE [org.jboss.spring.deployers.SpringParserDeployer] (main) Deploying: vfsfile:/home/myddryn/runtime/jboss/server/amq/deploy/hdscanner-jboss-beans.xml
2010-09-22 10:44:47,932 TRACE [org.jboss.spring.deployers.SpringParserDeployer] (main) Deployed:  vfsfile:/home/myddryn/runtime/jboss/server/amq/deploy/hdscanner-jboss-beans.xml
2010-09-22 10:44:47,932 TRACE [org.jboss.spring.deployers.SpringParserDeployer] (main) Deployed:  vfsfile:/home/myddryn/runtime/jboss/server/amq/deploy/hdscanner-jboss-beans.xml
2010-09-22 10:44:47,932 TRACE [org.jboss.spring.deployers.SpringParserDeployer] (main) Deploying: vfsfile:/home/myddryn/runtime/jboss/server/amq/deploy/host-messenger-spring.xml
2010-09-22 10:44:47,932 TRACE [org.jboss.spring.deployers.SpringParserDeployer] (main) Deploying: vfsfile:/home/myddryn/runtime/jboss/server/amq/deploy/host-messenger-spring.xml
2010-09-22 10:44:47,934 TRACE [org.jboss.spring.deployers.SpringParserDeployer] (main) Deployed:  vfsfile:/home/myddryn/runtime/jboss/server/amq/deploy/host-messenger-spring.xml
2010-09-22 10:44:47,934 TRACE [org.jboss.spring.deployers.SpringParserDeployer] (main) Deployed:  vfsfile:/home/myddryn/runtime/jboss/server/amq/deploy/host-messenger-spring.xml
2010-09-22 10:44:47,988 TRACE [org.jboss.spring.deployers.ApplicationContextDeployer] (main) Deploying: vfsfile:/home/myddryn/runtime/jboss/server/amq/deploy/host-messenger-spring.xml
2010-09-22 10:44:47,988 TRACE [org.jboss.spring.deployers.ApplicationContextDeployer] (main) Deploying: vfsfile:/home/myddryn/runtime/jboss/server/amq/deploy/host-messenger-spring.xml
2010-09-22 10:44:48,073 INFO  [org.jboss.spring.factory.NamedXmlApplicationContext] (main) Refreshing org.jboss.spring.factory.NamedXmlApplicationContext@42bc5245: startup date [Wed Sep 22 10:44:48 PDT 2010]; root of context h
ierarchy
2010-09-22 10:44:48,073 INFO  [org.jboss.spring.factory.NamedXmlApplicationContext] (main) Refreshing org.jboss.spring.factory.NamedXmlApplicationContext@42bc5245: startup date [Wed Sep 22 10:44:48 PDT 2010]; root of context h
ierarchy
2010-09-22 10:44:48,221 INFO  [org.jboss.spring.factory.NamedXmlBeanDefinitionReader] (main) Loading XML bean definitions from URL [vfsfile:/home/myddryn/runtime/jboss/server/amq/deploy/host-messenger-spring.xml]
2010-09-22 10:44:48,221 INFO  [org.jboss.spring.factory.NamedXmlBeanDefinitionReader] (main) Loading XML bean definitions from URL [vfsfile:/home/myddryn/runtime/jboss/server/amq/deploy/host-messenger-spring.xml]
2010-09-22 10:44:48,664 DEBUG [org.jboss.spring.factory.NamedXmlBeanDefinitionParser] (main) Loading bean definitions
2010-09-22 10:44:48,664 DEBUG [org.jboss.spring.factory.NamedXmlBeanDefinitionParser] (main) Loading bean definitions
2010-09-22 10:44:48,905 INFO  [org.apache.camel.spring.handler.CamelNamespaceHandler] (main) camel-osgi.jar/camel-spring-osgi.jar not detected in classpath
2010-09-22 10:44:48,905 INFO  [org.apache.camel.spring.handler.CamelNamespaceHandler] (main) camel-osgi.jar/camel-spring-osgi.jar not detected in classpath
2010-09-22 10:44:50,118 DEBUG [org.jboss.spring.factory.NamedXmlApplicationContext] (main) Bean factory for org.jboss.spring.factory.NamedXmlApplicationContext@42bc5245: org.springframework.beans.factory.support.DefaultListabl
eBeanFactory@6bfcc7a9: defining beans [org.springframework.beans.factory.config.PropertyPlaceholderConfigurer#0,template,consumerTemplate,camel:beanPostProcessor,camel,activemq,host-messenger,PrettyJSON]; root of factory hiera
rchy
2010-09-22 10:44:50,118 DEBUG [org.jboss.spring.factory.NamedXmlApplicationContext] (main) Bean factory for org.jboss.spring.factory.NamedXmlApplicationContext@42bc5245: org.springframework.beans.factory.support.DefaultListabl
eBeanFactory@6bfcc7a9: defining beans [org.springframework.beans.factory.config.PropertyPlaceholderConfigurer#0,template,consumerTemplate,camel:beanPostProcessor,camel,activemq,host-messenger,PrettyJSON]; root of factory hiera
rchy
2010-09-22 10:44:50,239 INFO  [org.springframework.beans.factory.config.PropertyPlaceholderConfigurer] (main) Loading properties file from URL [file:/home/myddryn/runtime/jboss/server/amq//conf/host_messenger.properties]
2010-09-22 10:44:50,240 INFO  [org.springframework.beans.factory.config.PropertyPlaceholderConfigurer] (main) Loading properties file from URL [file:/home/myddryn/runtime/jboss/server/amq//conf/activemq.properties]
2010-09-22 10:44:50,256 DEBUG [org.jboss.spring.factory.NamedXmlApplicationContext] (main) Unable to locate MessageSource with name 'messageSource': using default [org.springframework.context.support.DelegatingMessageSource@3a
a9f827]
2010-09-22 10:44:50,256 DEBUG [org.jboss.spring.factory.NamedXmlApplicationContext] (main) Unable to locate MessageSource with name 'messageSource': using default [org.springframework.context.support.DelegatingMessageSource@3a
a9f827]
2010-09-22 10:44:50,260 DEBUG [org.jboss.spring.factory.NamedXmlApplicationContext] (main) Unable to locate ApplicationEventMulticaster with name 'applicationEventMulticaster': using default [org.springframework.context.event.
SimpleApplicationEventMulticaster@550dcd3]
2010-09-22 10:44:50,260 DEBUG [org.jboss.spring.factory.NamedXmlApplicationContext] (main) Unable to locate ApplicationEventMulticaster with name 'applicationEventMulticaster': using default [org.springframework.context.event.
SimpleApplicationEventMulticaster@550dcd3]
2010-09-22 10:44:50,260 INFO  [org.springframework.beans.factory.support.DefaultListableBeanFactory] (main) Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@6bfcc7a9: definin
g beans [org.springframework.beans.factory.config.PropertyPlaceholderConfigurer#0,template,consumerTemplate,camel:beanPostProcessor,camel,activemq,host-messenger,PrettyJSON]; root of factory hierarchy

 

At this point logs from the host-messenger-spring.xml beans show duplicate instantiation.

Reply to this message by going to Community

Start a new discussion in Spring Integration at Community