datasource

configuring hibernate datasource in spring xml

白昼怎懂夜的黑 提交于 2019-12-23 04:33:19
问题 I get below error while running my web application. I had problems in configuring hibernate & spring with right jars. After i crossed that hurdle after working on it for hours, i am getting problem in hibernate datasource . The session factory and dao beans are getting initialized properly by spring but when i access method in dao i get error... INFO: Attestation_spring_hibernate was successfully deployed in 11,309 milliseconds. INFO: before calling rateDAO.getCount() INFO: inside

Setting up Play 2.4.0 with Postgres and HikariCP yields configuration error

拜拜、爱过 提交于 2019-12-22 19:01:07
问题 I'm trying to set up a play framework server with a connection to a local postgres. My current applications.conf is like this: dbplugin=disabled db { default { dataSourceClassName=org.postgresql.ds.PGSimpleDataSource dataSource { user="postgres" password="postgres" databaseName="timeseries" serverName="localhost" } hikaricp { connectionTestQuery = "SELECT 1" } } } My build.sbt has only the newest jdbc for postgres added: lazy val root = (project in file(".")).enablePlugins(PlayJava)

Spring dataSource bean definition failing

家住魔仙堡 提交于 2019-12-22 09:39:26
问题 I'm trying to use Spring's JdbcTemplate to simplify my DAOs in a Java web service that is deployed in Tomcat and connects to Postgres. I'm following Spring's documention, and I'm trying configure a DataSource in the application context file, as follows: <?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" xsi:schemaLocation="http:/

Prevent Oracle Connection autocommit for JNDI Datasource on JBoss 7 (Jeeves DBMS)

痞子三分冷 提交于 2019-12-22 08:06:08
问题 I am currently having an odd situation with the autocommit settings of an Oracle JNDI Datasource in JBoss 7. The outline The application I want to deploy, wich I can inspect but not change, obtains connections from the Connection Pool and trys to commit after certain statements. Obviously the connection has autocommit set to 'true' per default and so an exception is raised. You cannot commit with autocommit set! What I cannot do Due to the fact that I can't change the application source, the

AbstractRoutingDataSource doesn't change connection

喜夏-厌秋 提交于 2019-12-22 06:55:58
问题 I use AbstractRoutingDataSource to change data source dynamically and ThreadLocal to set up currentLookupKey. It works nice when I use only one data source per http request. I use JpaRepository @Component @Primary public class RoutingDataSource extends AbstractRoutingDataSource { @Autowired private DatabaseMap databaseMap; @Override public void afterPropertiesSet() { setTargetDataSources(databaseMap.getSourcesMap()); setDefaultTargetDataSource(databaseMap.getSourcesMap().get("DEFAULT"));

Wildfly 10 can't connect datasource: invalid connection

£可爱£侵袭症+ 提交于 2019-12-22 05:51:07
问题 Problem I'm trying test my connection and it keeps giving me the same error while at first sight I can't see what I did wrong. Maybe I'm overlooking something... Error nexpected HTTP response: 500 Request { "address" => [ ("subsystem" => "datasources"), ("data-source" => "ProjectenDS") ], "operation" => "test-connection-in-pool" } Response Internal Server Error { "outcome" => "failed", "failure-description" => "WFLYJCA0040: failed to invoke operation: WFLYJCA0047: Connection is not valid",

Difference between DataSource and DataSet

拈花ヽ惹草 提交于 2019-12-22 05:28:23
问题 I am currently working on project whose main task is to read data stored in SQL database and to display them in user-friendly form. Programming language used is C++. I am working in Borland C++ Builder 6 environment. But I think question posed in title is independent from programming language or libraries. When reading data from db i am quite frequently meeting with these terms in class names without knowing exactly what they represent. I understand that they behave as interface to data

jboss datasource statistics JMX monitoring - inconsistent information

那年仲夏 提交于 2019-12-21 21:27:23
问题 I have defined two datasources in *-ds.xml on jboss 4.2.3 (redhat 4.3) Both datasources are identical. Only jndi-name differ Each defines min=max=10 <xa-datasource> <jndi-name>com.trax.hibernate.DataSource</jndi-name> <track-connection-by-tx>true</track-connection-by-tx> <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:@localhost:1521:orcl10</xa

MyBatis-guice 3.3 + Multiple datasources + properties + scriptrunner

元气小坏坏 提交于 2019-12-21 20:46:24
问题 I'm using MyBatis-guice 3.3 to connect to a first database using a java Properties object and a ScriptRunner to run few scripts: Environment environment = injector.getInstance(SqlSessionFactory.class).getConfiguration().getEnvironment(); DataSource source = environment.getDataSource(); ScriptRunner runner = new ScriptRunner(source.getConnection()); runner.setLogWriter(null); runner.setStopOnError(true); runner.runScript(Resources.getResourceAsReader(properties.getProperty("script.dbA.create

What is difference between MysqlDataSource and MysqlConnectionPoolDataSource?

旧时模样 提交于 2019-12-21 20:42:06
问题 I am configuring a mysql connection in an application server (glassfish specifically, but I am curious about other application servers as well) and it appears that there are 2 extremely similar options for the resource type & driver. Namely, MysqlDataSource and MysqlConnectionPoolDataSource . I am curious about what the difference between the two is. It appears that glassfish is maintaining a connection pool either way, so it's difficult to tell what the difference is. Thanks for any insight