大家帮帮看看调度为什么没有执行

kobe00714 2010-09-18 11:08:41
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-2.5.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
">

<context:component-scan base-package="iSearch" />
<bean id="jobtask"
class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
<property name="targetObject">
<ref bean="mytest" />
</property>
<property name="targetMethod">
<value>test</value>
</property>
</bean>

<bean id="doTime" class="org.springframework.scheduling.quartz.CronTriggerBean">
<property name="jobDetail">
<ref bean="jobtask" />
</property>
<!-- cron表达式 -->
<property name="cronExpression">
<value>0/3 * * * * ?</value>
</property>
</bean>
<bean id="startQuertz" lazy-init="false" autowire="no"
class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
<property name="triggers">
<list>
<ref bean="doTime" />
</list>
</property>
</bean>

<bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource"
destroy-method="close">
<property name="driverClass" value="com.mysql.jdbc.Driver" />
<property name="jdbcUrl" value="jdbc:mysql://192.168.4.77:3306/isearch?useUnicode=true&characterEncoding=UTF-8" />
<property name="user" value="root" />
<property name="password" value="cs.swust" />

<!-- 初始化时获取的连接数,取值应在minPoolSize与maxPoolSize之间。Default:3 -->
<property name="initialPoolSize" value="1" />

<!-- 连接池中保留的最小连接数。 -->
<property name="minPoolSize" value="1" />

<!-- 连接池中保留的最大连接数。Default:15 -->
<property name="maxPoolSize" value="300" />

<!-- 最大空闲时间,60秒内未使用则连接被丢弃。若为0则永不丢弃。Default:0 -->
<property name="maxIdleTime" value="60" />

<!-- 当连接池中的连接耗尽的时候c3p0一次同时获取的连接数。Default:3 -->
<property name="acquireIncrement" value="5" />

<!-- 每60秒检查所有连接池中的空闲连接。Defalut:0 -->
<property name="idleConnectionTestPeriod" value="60" />
</bean>

<bean id="sessionFactory"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource">
<ref bean="dataSource" />
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">
org.hibernate.dialect.MySQL5Dialect
</prop>
<prop key="hibernate.show_sql">true</prop>
<prop key="hibernate.hbm2ddl.auto">update</prop>
</props>
</property>
<property name="mappingResources">
<list>
<value>iSearch/pojo/Carecustomcontent.hbm.xml</value>
<value>iSearch/pojo/Carecustom.hbm.xml</value>
<value>iSearch/pojo/Refuncrole.hbm.xml</value>
<value>iSearch/pojo/Sitecategory.hbm.xml</value>
<value>iSearch/pojo/Role.hbm.xml</value>
<value>iSearch/pojo/Siteurl.hbm.xml</value>
<value>iSearch/pojo/Restplsurl.hbm.xml</value>
<value>iSearch/pojo/Content.hbm.xml</value>
<value>iSearch/pojo/Recacusurl.hbm.xml</value>
<value>iSearch/pojo/Reuserrole.hbm.xml</value>
<value>iSearch/pojo/Favorite.hbm.xml</value>
<value>iSearch/pojo/Favocategory.hbm.xml</value>
<value>iSearch/pojo/User.hbm.xml</value>
<value>iSearch/pojo/Searchclassify.hbm.xml</value>
<value>iSearch/pojo/Reseclthes.hbm.xml</value>
<value>iSearch/pojo/Recacuthes.hbm.xml</value>
<value>iSearch/pojo/Thesapply.hbm.xml</value>
<value>iSearch/pojo/Searchtemplate.hbm.xml</value>
<value>iSearch/pojo/Function.hbm.xml</value>
<value>iSearch/pojo/Thesaurus.hbm.xml</value>
</list>
</property>
</bean>

<bean id="txManager"
class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<!-- 将前面指定的sessionFactory注入进来,交给Spring的事务管理器进行管理 -->
<property name="sessionFactory" ref="sessionFactory" />
</bean>

<!-- 使用注解方式打开事务 -->
<tx:annotation-driven transaction-manager="txManager" />
<bean id="CarecustomcontentDAO"
class="iSearch.dao.impl.CarecustomcontentDaoImpl">
<property name="sessionFactory">
<ref bean="sessionFactory" />
</property>
</bean>
<bean id="CarecustomDAO" class="iSearch.dao.impl.CarecustomDaoImpl">
<property name="sessionFactory">
<ref bean="sessionFactory" />
</property>
</bean>
<bean id="RefuncroleDAO" class="iSearch.dao.impl.RefuncroleDaoImpl">
<property name="sessionFactory">
<ref bean="sessionFactory" />
</property>
</bean>
<bean id="SitecategoryDAO" class="iSearch.dao.impl.SitecategoryDaoImpl">
<property name="sessionFactory">
<ref bean="sessionFactory" />
</property>
</bean>
<bean id="RoleDAO" class="iSearch.dao.impl.RoleDaoImpl">
<property name="sessionFactory">
<ref bean="sessionFactory" />
</property>
</bean>
<bean id="SiteurlDAO" class="iSearch.dao.impl.SiteurlDaoImpl">
<property name="sessionFactory">
<ref bean="sessionFactory" />
</property>
</bean>
<bean id="RestplsurlDAO" class="iSearch.dao.impl.RestplsurlDaoImpl">
<property name="sessionFactory">
<ref bean="sessionFactory" />
</property>
</bean>
<bean id="ContentDAO" class="iSearch.dao.impl.ContentDaoImpl">
<property name="sessionFactory">
<ref bean="sessionFactory" />
</property>
</bean>
<bean id="RecacusurlDAO" class="iSearch.dao.impl.RecacusurlDaoImpl">
<property name="sessionFactory">
<ref bean="sessionFactory" />
</property>
</bean>
<bean id="ReuserroleDAO" class="iSearch.dao.impl.ReuserroleDaoImpl">
<property name="sessionFactory">
<ref bean="sessionFactory" />
</property>
</bean>
<bean id="FavoriteDAO" class="iSearch.dao.impl.FavoriteDaoImpl">
<property name="sessionFactory">
<ref bean="sessionFactory" />
</property>
</bean>
<bean id="FavocategoryDAO" class="iSearch.dao.impl.FavocategoryDaoImpl">
<property name="sessionFactory">
<ref bean="sessionFactory" />
</property>
</bean>
<bean id="UserDAO" class="iSearch.dao.impl.UserDaoImpl">
<property name="sessionFactory">
<ref bean="sessionFactory" />
</property>
</bean>
<bean id="SearchclassifyDAO"
class="iSearch.dao.impl.SearchclassifyDaoImpl">
<property name="sessionFactory">
<ref bean="sessionFactory" />
</property>
</bean>
<bean id="ReseclthesDAO" class="iSearch.dao.impl.ReseclthesDaoImpl">
<property name="sessionFactory">
<ref bean="sessionFactory" />
</property>
</bean>
<bean id="RecacuthesDAO" class="iSearch.dao.impl.RecacuthesDaoImpl">
<property name="sessionFactory">
<ref bean="sessionFactory" />
</property>
</bean>
<bean id="ThesapplyDAO" class="iSearch.dao.impl.ThesapplyDaoImpl">
<property name="sessionFactory">
<ref bean="sessionFactory" />
</property>
</bean>
<bean id="SearchtemplateDAO"
class="iSearch.dao.impl.SearchtemplateDaoImpl">
<property name="sessionFactory">
<ref bean="sessionFactory" />
</property>
</bean>
<bean id="FunctionDAO" class="iSearch.dao.impl.FunctionDaoImpl">
<property name="sessionFactory">
<ref bean="sessionFactory" />
</property>
</bean>
<bean id="ThesaurusDAO" class="iSearch.dao.impl.ThesaurusDaoImpl">
<property name="sessionFactory">
<ref bean="sessionFactory" />
</property>
</bean>

<!-- 配置业务逻辑service -->
<bean id="ccService" class="iSearch.service.impl.CareCustomServiceImpl">
<property name="userDao" ref="UserDAO"/>
<property name="caCuDao" ref="CarecustomDAO"/>
<property name="recacuthesDao" ref="RecacuthesDAO"/>
<property name="thesDao" ref="ThesaurusDAO"/>
<property name="cccontDao" ref="CarecustomcontentDAO"/>
<property name="contDao" ref="ContentDAO"/>
</bean>
<bean id="contService" class="iSearch.service.impl.ContentServiceImpl">
<property name="contDao" ref="ContentDAO"/>
</bean>
<bean id="scService" class="iSearch.service.impl.SearchClassifyServiceImpl">
<property name="scDao" ref="SearchclassifyDAO"/>
<property name="restDao" ref="ReseclthesDAO"/>
<property name="thesDao" ref="ThesaurusDAO"/>
<property name="contDao" ref="ContentDAO"/>
</bean>

<!-- 配置Action -->
<bean id="scAction" class="iSearch.action.SearchClassifyAction" scope="prototype">
<property name="scs" ref="scService"/>
</bean>
<bean id="ccAction" class="iSearch.action.CareCustomAction" scope="prototype">
<property name="cacuService" ref="ccService"/>
</bean>
</beans>
package storage;

public class TestQuartz {
public void test(){

System.out.println("............kaishi diaodu.........");

}
}
...全文
48 点赞 收藏 5
写回复
5 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
kobe00714 2010-09-18
[Quote=引用 1 楼 hackerster 的回复:]
一点描述也没有。全市配置文件晕啊。
[/Quote]
<bean id="mytest" class="storage.TestQuartz"/>
粘贴的时候漏掉了
回复
hackerster 2010-09-18
貌似可开启了spring的bean自动扫描,你自己定义的类没有在扫描范围。且类名不对。
回复
closewbq 2010-09-18
mytest引用哪个了?
回复
hackerster 2010-09-18
一点描述也没有。全市配置文件晕啊。
回复
kobe00714 2010-09-18
[Quote=引用 3 楼 hackerster 的回复:]
貌似可开启了spring的bean自动扫描,你自己定义的类没有在扫描范围。且类名不对。
[/Quote]
那个类名不对?
回复
相关推荐
发帖
Web 开发
创建于2007-09-28

8.0w+

社区成员

Java Web 开发
申请成为版主
帖子事件
创建了帖子
2010-09-18 11:08
社区公告
暂无公告