The broker bean is defined in the activemq.xml spring file. Both are loaded at the same time (see web.xml), that's why spring can resolve this dependency.
Guillaume On 3/8/06, Charles Souillard <[EMAIL PROTECTED]> wrote: > > Guillaume, > > I think there is an error on this commit as the depends-on broker is > wrong. There is no more bean with name broker in applicationContext.xml... > I get an error when I deploy the webapp... > Could you fix it ? > I don't know how it is possible to make the dependance working as it is > an important one... > > Thanks, > Charles > > [EMAIL PROTECTED] wrote: > > >Author: gnodet > >Date: Tue Mar 7 15:44:15 2006 > >New Revision: 384055 > > > >URL: http://svn.apache.org/viewcvs?rev=384055&view=rev > >Log: > >Fix relative paths in the webapp > > > >Modified: > > > > > incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/servicemix-web/src/webapp/WEB-INF/activemq.xml > > > > > incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/servicemix-web/src/webapp/WEB-INF/applicationContext.xml > > > > > incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/servicemix-web/src/webapp/WEB-INF/web.xml > > > >Modified: > incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/servicemix-web/src/webapp/WEB-INF/activemq.xml > >URL: > http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/servicemix-web/src/webapp/WEB-INF/activemq.xml?rev=384055&r1=384054&r2=384055&view=diff > > >============================================================================== > >--- > incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/servicemix-web/src/webapp/WEB-INF/activemq.xml > (original) > >+++ > incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/servicemix-web/src/webapp/WEB-INF/activemq.xml > Tue Mar 7 15:44:15 2006 > >@@ -1,10 +1,10 @@ > > <!-- START SNIPPET: xbean --> > > <beans xmlns="http://activemq.org/config/1.0"> > > > >- <broker useJmx="false"> > >+ <broker id="broker" useJmx="false"> > > > > <persistenceAdapter> > >- <journaledJDBC journalLogFiles="5" dataDirectory="./data"/> > >+ <journaledJDBC journalLogFiles="5" dataDirectory="#dataDir"/> > > <!-- To use a different datasource, use th following syntax : --> > > <!-- > > <journaledJDBC journalLogFiles="5" dataDirectory="../data" > dataSource="#postgres-ds"/> > >@@ -60,5 +60,12 @@ > > </bean> > > --> > > > >+ <!-- Directories relative to web app --> > >+ <bean id="servletContext" class=" > org.springframework.web.context.support.ServletContextFactoryBean" /> > >+ <bean id="dataDir" class="org.springframework.web.util.WebUtils" > factory-method="getRealPath"> > >+ <constructor-arg ref="servletContext" /> > >+ <constructor-arg value="/data" /> > >+ </bean> > >+ > > </beans> > > <!-- END SNIPPET: xbean --> > > > >Modified: > incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/servicemix-web/src/webapp/WEB-INF/applicationContext.xml > >URL: > http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/servicemix-web/src/webapp/WEB-INF/applicationContext.xml?rev=384055&r1=384054&r2=384055&view=diff > > >============================================================================== > >--- > incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/servicemix-web/src/webapp/WEB-INF/applicationContext.xml > (original) > >+++ > incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/servicemix-web/src/webapp/WEB-INF/applicationContext.xml > Tue Mar 7 15:44:15 2006 > >@@ -6,15 +6,16 @@ > > > > <!-- the JBI container --> > > <sm:container id="jbi" > >- rootDir="../wdir" > >+ rootDir="#rootDir" > > useMBeanServer="true" > > createMBeanServer="true" > >- installationDirPath="../install" > >- deploymentDirPath="../deploy" > >+ installationDirPath="#installDir" > >+ deploymentDirPath="#deployDir" > > monitorInstallationDirectory="true" > > dumpStats="true" > > statsInterval="10" > >- transactionManager="#transactionManager"> > >+ transactionManager="#transactionManager" > >+ depends-on="broker"> > > > > <sm:activationSpecs> > > > >@@ -150,20 +151,6 @@ > > </property> > > </bean> > > > >- <!-- message broker --> > >- > >- <!-- ActiveMQ 3.x --> > >- <bean id="broker" class="org.apache.activemq.xbean.BrokerFactoryBean"> > >- <property name="config" value="/WEB-INF/activemq.xml"/> > >- </bean> > >- > >- <!-- ActiveMQ 4.x --> > >- <!-- > >- <bean id="broker" class="org.apache.activemq.broker.BrokerService" > init-method="start"> > >- <property name="transportConnectorURIs" > value="tcp://localhost:61636"/> > >- </bean> > >- --> > >- > > <bean id="transactionManager" class=" > org.jencks.factory.TransactionManagerFactoryBean"/> > > > > <bean id="jmsFactory" class=" > org.apache.activemq.pool.PooledConnectionFactory"> > >@@ -172,6 +159,21 @@ > > <constructor-arg value="tcp://localhost:61636"/> > > </bean> > > </property> > >+ </bean> > >+ > >+ <!-- Directories relative to web app --> > >+ <bean id="servletContext" class=" > org.springframework.web.context.support.ServletContextFactoryBean" /> > >+ <bean id="rootDir" class="org.springframework.web.util.WebUtils" > factory-method="getRealPath"> > >+ <constructor-arg ref="servletContext" /> > >+ <constructor-arg value="/wdir" /> > >+ </bean> > >+ <bean id="installDir" class="org.springframework.web.util.WebUtils" > factory-method="getRealPath"> > >+ <constructor-arg ref="servletContext" /> > >+ <constructor-arg value="/install" /> > >+ </bean> > >+ <bean id="deployDir" class="org.springframework.web.util.WebUtils" > factory-method="getRealPath"> > >+ <constructor-arg ref="servletContext" /> > >+ <constructor-arg value="/deploy" /> > > </bean> > > > > </beans> > > > >Modified: > incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/servicemix-web/src/webapp/WEB-INF/web.xml > >URL: > http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/servicemix-web/src/webapp/WEB-INF/web.xml?rev=384055&r1=384054&r2=384055&view=diff > > >============================================================================== > >--- > incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/servicemix-web/src/webapp/WEB-INF/web.xml > (original) > >+++ > incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/servicemix-web/src/webapp/WEB-INF/web.xml > Tue Mar 7 15:44:15 2006 > >@@ -11,7 +11,7 @@ > > > > <context-param> > > <param-name>contextConfigLocation</param-name> > >- <param-value>/WEB-INF/applicationContext.xml</param-value> > >+ <param-value>/WEB-INF/applicationContext.xml > /WEB-INF/activemq.xml</param-value> > > </context-param> > > <context-param> > > <param-name>contextClass</param-name> > > > > > > > > > > >