Hey Zoran,

On 3 Jul 2015 08:42, "Zoran Avtarovski" <zo...@sparecreative.com> wrote:
>
> I went through the logs in much greater detail today and I noticed when
> the server starts I get multiple Spring loads in the log:
>
> org.apache.catalina.core.ApplicationContext.log Initializing Spring root
> WebApplicationContext

How are you loading your spring context? Where do you initialize it? Please
share your web.xml, it is probably there.

Do you reference spring anywhere else, e.g. in your struts actions?

>
> And the number of times the log entry appears correlates to the number of
> executions, which makes sense.
>
> It looks like I need to find out why the spring config is loaded multiple
> times.
>
> I have a context.xml in the META-INF directory which sets up a db
> container and jndi datasource realm, could this be the issue?
>

That's not an issue. You are just configuring your datasource and security
domain/realm.

> <?xml version="1.0" encoding="UTF-8"?>
> <Context URIEncoding="UTF-8" antiResourceLocking="false" path="/pain">
>   <Resource     auth="Container"
>         driverClassName="com.mysql.jdbc.Driver"
>         logAbandoned="true"
>         testOnBorrow="true"
>         validationQuery="select count(*) from types"
>         maxActive="100"
>         maxIdle="30"
>         maxWait="10000"
>         name=“jdbc/myDB"
>         username=“xxx"
>         password=“xxxx"
>         removeAbandoned="true"
>         removeAbandonedTimeout="60"
>         type="javax.sql.DataSource"
>
url="jdbc:mysql://localhost:3306/my_data_v1?useUnicode=true&amp;characterE
> ncoding=UTF-8&amp;zeroDateTimeBehavior=convertToNull"/>
>
>   <Realm        className="org.apache.catalina.realm.DataSourceRealm"
>         dataSourceName=“jdbc/myDB"
>         debug="1"
>         localDataSource="true"
>         roleNameCol="status"
>         userCredCol="password"
>         userNameCol="user_name"
>         userRoleTable="users"
>         userTable="users"/>
> </Context>
>

Cheers
Neven

Reply via email to