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
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?
<?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&characterE
ncoding=UTF-8&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>
Z.
On 2/07/2015 3:22 pm, "Zoran Avtarovski" <[email protected]> wrote:
>We have a struts2 based app that uses spiring scheduling to trigger a task
>every morning at 6am.
>
>The problem we have is that task in triggered multiple times,
>simultaneously.
>
>We have an Ubuntu 14.04.1 Server using the standard tomcat 7 installed
>using
>apt-get and running on oracle java 8.
>
>Tomcat is configured as a stand alone not a cluster and I had a look at
>the
>servers.xml file and it only has one host.
>
>It has to be the way we have tomcat configured, but I can¹t see what. I
>changed from quartz to spring scheduling thinking the issue was quartz,
>but
>that made no difference.
>
>I¹d really appreciate any pointers at this stage.
>
>Z.
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]