2012/8/28 Knute Snortum <ksnor...@catalystitservices.com>:
>> >
>> > "applicationContext.xml" is my Spring context file.  I have
>> placeholders in it to point to the correct database based on Maven
>> profiles and filtering.  So a piece of applicationContext.xml looks like
>> this:
>> >
>> >         <bean id="dataSource"
>> class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
>> >                 <property name="driverClassName"
>> value="${db.driverClassName}" />
>> >                 <property name="url"             value="${db.url}" />
>> >                 <property name="username"
>> value="${db.username}" />
>> >                 <property name="password"
>> value="${db.password}" />
>> >                 <property name="maxActive"       value="10" />
>> >                 <property name="maxIdle"         value="1" />
>> >         </bean>
>> >
>> > As you can see, Tomcat (or Spring?) is finding the dataSource bean
>> that does not have the placeholders replaced yet.
>>
>> Usually it is Spring job to resolve those.
>>  (It has nothing to to with Tomcat or Maven).
>>
>> See
>> org.springframework.beans.factory.config.PropertyPlaceholderConfigurer
>
> Well, I'm using Maven filtering, but regardless, I thought the whole point of 
> the tomcat7-maven-plugin was to run the *war* file, not the development 
> (project) files.

Your question was about "applicationContext.xml". That is an essential
part of a Spring web application. It is not just a "project" file.
Now you are changing the topic...

Tomcat knows nothing about Spring, and "context" has different meaning
in Tomcat (referring to the META-INF/context.xml file in a web
application, see Tomcat Configuration Reference in Tomcat 7
documentation).

If you need apply filtering to your data file (that
"applicationContext.xml" one), shouldn't you configure so explicitly
somewhere?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to