Tag: datasource

如何将PostgreSQL数据源添加到WildFly 9.0?

我在mastertheboss.com上试过教程: ./jboss-cli.sh module add –name=org.postgres –resources=/tmp/postgresql-9.3-1101.jdbc41.jar –dependencies=javax.api,javax.transaction.api /subsystem=datasources/jdbc-driver=postgres:add(driver-name=”postgres”,driver-module-name=”org.postgres”,driver-class-name=org.postgresql.Driver) data-source add –jndi-name=java:/PostGreDS –name=PostgrePool –connection-url=jdbc:postgresql://localhost/postgres –driver-name=postgres –user-name=postgres –password=postgres 本教程适用于WildFly 8.2,但它不适用于WildFly 9.0。 第3步失败并显示错误消息: { “outcome” => “failed”, “failure-description” => “WFLYJCA0041: Failed to load module for driver [org.portgres]”, “rolled-back” => true } 如何将Postgres数据源添加到WildFly 9.0?

在Spring Batch中使用多个DataSource

我试图在Spring Batch中配置几个数据源。 在启动时,Spring Batch抛出以下exception: To use the default BatchConfigurer the context must contain no more thanone DataSource, found 2 批量配置的代码段 @Configuration @EnableBatchProcessing public class BatchJobConfiguration { @Primary @Bean(name = “baseDatasource”) public DataSource dataSource() { // first datasource definition here } @Bean(name = “secondaryDataSource”) public DataSource dataSource2() { // second datasource definition here } … } […]