2011-11-07 69 views
1

我將我們的代碼從IAS移植到JBoss AS。 石英根本不會觸發任何事件,並且在石英原木上不會出現任何錯誤。我也注意到Quartz表沒有被填充(QRTZ_JOB_DETAILS,QRTZ_TRIGGERS等)。將IAS從Quartz移植到JBoss AS

我正在使用JOBStoreCMT與石英版本1.5.2。數據源是很好的聲明。工作和觸發器在IAS中運行良好,並在代碼中聲明。

石英屬性:

#============================================================================ 
# Configure Main Scheduler Properties 
#============================================================================ 

org.quartz.scheduler.instanceName = bitbandScheduler 
org.quartz.scheduler.instanceId = AUTO 

#============================================================================ 
# Configure ThreadPool 
#============================================================================ 

org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool 
org.quartz.threadPool.threadCount = 15 
org.quartz.threadPool.threadPriority = 5 

#============================================================================ 
# Configure JobStore 
#============================================================================ 

org.quartz.jobStore.misfireThreshold = 60000 

org.quartz.jobStore.class = org.quartz.impl.jdbcjobstore.JobStoreCMT 
org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate 
org.quartz.jobStore.useProperties = false 
org.quartz.jobStore.dataSource = bitband_pluginDS 
org.quartz.jobStore.nonManagedTXDataSource = bitband_pluginDSTX 
org.quartz.jobStore.tablePrefix = QRTZ_ 

org.quartz.jobStore.isClustered = false 
org.quartz.jobStore.clusterCheckinInterval = 20000 

#============================================================================ 
# Configure Datasources 
#============================================================================ 

org.quartz.dataSource.bitband_pluginDS.jndiURL=java:bitband_pluginDS 
org.quartz.dataSource.bitband_pluginDSTX.jndiURL=java:bitband_pluginDS 

甲骨文ds.xml文件:

<xa-datasource> 
      <jndi-name>bitband_pluginDS</jndi-name> 
      <!-- uncomment to enable interleaving <interleaving/> --> 
      <isSameRM-override-value>false</isSameRM-override-value> 
      <xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class> 
      <xa-datasource-property name="URL">jdbc:oracle:thin:@ord-rtv063.orca.ent:1521:DB11g</xa-datasource-property> 

      <xa-datasource-property name="User">RIGHTV7_VS</xa-datasource-property> 
      <xa-datasource-property name="Password">RIGHTV7_VS</xa-datasource-property> 
       <max-pool-size>100</max-pool-size> 
       <min-pool-size>20</min-pool-size> 
       <valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleValidConnectionChecker</valid-connection-checker-class-name> 
       <check-valid-connection-sql>select 1 from dual</check-valid-connection-sql> 
      <!-- Uses the pingDatabase method to check a connection is still valid before handing it out from the pool --> 
      <!--valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleValidConnectionChecker</valid-connection-checker-class-name--> 
      <!-- Checks the Oracle error codes and messages for fatal errors --> 
      <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name> 
      <!-- Oracles XA datasource cannot reuse a connection outside a transaction once enlisted in a global transaction and vice-versa --> 
      <no-tx-separate-pools/> 
       <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) --> 
       <metadata> 
        <type-mapping>Oracle9i</type-mapping> 
       </metadata> 
    </xa-datasource> 

我缺少什麼? PS,使用JobStoreTX時,一切正常,所以我猜這是與容器事務管理器相關的事情。

回答

2

在過去的幾天裏,問題懸而未決之後,我找到了解決方案。

將下面的屬性添加到quartz.properties文件中。就如此容易。

org.quartz.jobStore.dontSetAutoCommitFalse=false 

此參數設置爲true告訴石英不調用setAutoCommit(false)上從數據源(一個或多個)獲得的連接。在一些情況下,這可能會有所幫助,例如,如果驅動程序在已關閉時調用它,則會發出抱怨。此屬性默認爲false,因爲大多數驅動程序要求調用setAutoCommit(false)

由於某種原因,JBoss重寫了默認值,所以我不得不明確地添加它。

功勞歸於未知用戶: http://osdir.com/ml/java.quartz.user/2007-10/msg00123.html

相關問題