How to configure quartz with Seam 2.0 GA, Postgres & jdbc.jo
statelessbean Nov 8, 2007 7:40 AMHi,
I try to configure quartz to load jbos from db, using seam 2.0.GA JBoss 4.2, and postgres
Here is my configuration
#========================================================================== == # Configure Main Scheduler Properties #========================================================================== == org.quartz.scheduler.instanceName = DefaultQuartzScheduler org.quartz.scheduler.rmi.export = false org.quartz.scheduler.rmi.proxy = false org.quartz.scheduler.wrapJobExecutionInUserTransaction = false org.quartz.scheduler.useClassLoaderOfInitializer = true #====================================================================== ====== # Configure ThreadPool #========================================================================== == org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool org.quartz.threadPool.threadCount = 10 org.quartz.threadPool.threadPriority = 5 org.quartz.threadPool.threadsInheritContextClassLoaderOfInitializingThread = true org.quartz.jobStore.misfireThreshold = 10000 #====================================================================== ====== # Configure JobStore #========================================================================== == org.quartz.jobStore.misfireThreshold 60000 #org.quartz.jobStore.class = org.quartz.simpl.RAMJobStore org.quartz.jobStore.class = org.quartz.impl.jdbcjobstore.JobStoreTX org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.PostgreSQLDelegate #org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate #org.quartz.jobStore.dataSource = myDS org.quartz.jobStore.dataSource = MLMDatasource org.quartz.jobStore.tablePrefix = QRTZ_ #====================================================================== ====== # Configure Datasources #========================================================================== == org.quartz.dataSource.MLMDatasource.driver = org.postgresql.Driver org.quartz.dataSource.MLMDatasource.URL = jdbc:postgresql://localhost:5432/mlm org.quartz.dataSource.MLMDatasource.user = postgres org.quartz.dataSource.MLMDatasource.password = root org.quartz.dataSource.MLMDatasource.maxConnections = 5
MLMDataSource is same as DS from app:
<datasources> <local-tx-datasource> <jndi-name>MLMDatasource</jndi-name> <connection-url>jdbc:postgresql://localhost:5432/mlm</connection-url&g t; <driver-class>org.postgresql.Driver</driver-class> <user-name>postgres</user-name> <password>root</password> <blocking-timeout-millis>50000</blocking-timeout-millis> </local-tx-datasource> </datasources>
I configured all like in seam "quartz" example, also got quartz.jar in ear file, but still get errors when jboss start up.
13:32:51,531 ERROR [[/mlm]] Exception sending context initialized event to listener instance of class org.jboss.seam.servlet.SeamListener java.lang.RuntimeException: exception invoking: initScheduler at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:135) at org.jboss.seam.Component.callComponentMethod(Component.java:2074) at org.jboss.seam.Component.callCreateMethod(Component.java:1997) .... Caused by: java.lang.ClassNotFoundException: No ClassLoaders found for: org.apache.commons.dbcp.BasicDataSource at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:306) at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader. java:514) at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java :408) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source)
Any help? Can anyone show me example how to configure it?