Questions tagged [datasource]

Datasource is a name given to the connection set up to a database from a server. The name is commonly used when creating a query to the database. The database source name (DSN) does not have to be the same as the filename for the database.

A data source is any of the following types of sources for (mostly) digitized data:

  • a database (in the Java software platform, datasource is a special name for the connection set up to a database from a server)
  • a computer file
  • a data stream

Please see more here (Wikipedia entry for Datasource) and here (Java 6 Datasource interface documentation)

4740 questions
25
votes
4 answers

Can I configure Grails with no datasource?

I have a Grails app that loads its data from xml files and delivers rss feeds via rome. I don't have any domain classes and my app has no datasource. I don't want Grails to load an in memory hsql db when the application has no need for it. Deleting…
Jack Chu
  • 6,791
  • 4
  • 38
  • 44
24
votes
3 answers

New method added in javax.sql.CommonDataSource in 1.7

Trying to compile my app against java 1.7 I found what there was a new method added in javax.sql.CommonDataSource (and so in j.s.DataSource) -- .getParentLogger(). You can compare CommonDataSource:1.7 with CommonDataSource:1.6 For me this change…
BegemoT
  • 3,776
  • 1
  • 24
  • 30
24
votes
2 answers

How should I connect to JDBC database / datasource in a servlet based application?

I have an external MySQL server that's set up and working fine. I created a database connection in Eclipse and can view the database in the Data Source Explorer tab. Now, I have a servlet that needs to access that database. How do I do it? Is…
Ed Marty
  • 39,590
  • 19
  • 103
  • 156
24
votes
3 answers

tomcat7 - jdbc datasource - This is very likely to create a memory leak

I get the following messages in catalina.out log file when tomcat is shutdown. I am using Tomcat 7.x and the Tomcat JDBC data source. Mar 26, 2013 1:17:52 PM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc SEVERE: The web…
arahant
  • 2,203
  • 7
  • 38
  • 62
24
votes
5 answers

Using encoded password for the datasource used in spring applicationContext.xml

I want to keep encoded password in my below mentioned springApplicationContext.xml Is there any way to achieve this? presently I have configured all properties using property-placeholder as shown below but the raw password is still open in my…
23
votes
1 answer

No managed connections available within configured blocking timeout (JBoss 7 and Postgres)

Periodically i get error : ERROR JDBCExceptionReporter --> javax.resource.ResourceException: IJ000453: Unable to get managed connection for java:jboss/datasources/myDB 08:12:05,928 ERROR…
Benjamin
  • 531
  • 2
  • 6
  • 18
22
votes
1 answer

how to return connection to pool

do we need to call any method on dbcp.BasicDataSource or jndi datasource(i'm using jboss) to return the connection after done with it?
user920420
  • 221
  • 1
  • 2
  • 4
22
votes
4 answers

Spring-boot datasource commit trouble

My application uses Spring-Boot 1.4.1.RELEASE and the configuration of my datasource is as follows; spring: datasource: url: *** username: *** password: *** driver-class-name: oracle.jdbc.driver.OracleDriver initial-size: 1 …
buræquete
  • 14,226
  • 4
  • 44
  • 89
21
votes
6 answers

referencing configuration.properties outside of the .war

i want to deploy a war and the war should fetch some properties from outside the war (lets say where the .war file is, that same directory.) at the moment this is the best solution i have found:
Ikthiander
  • 3,917
  • 8
  • 37
  • 54
21
votes
4 answers

Safely Wrapping a Connection Pool

I am trying to implement row level security so our application can enforce more stringent access control. One of the technologies we are looking into is Oracle's Virtual Private Database, which allows row level security by basically augmenting all…
TheNorthWes
  • 2,661
  • 19
  • 35
21
votes
2 answers

What's the difference between nonXADatasource with jta="true" and XADataSource?

I was confused by the fact that we can allow to use JTA transactions with a non-XA-datasource. Link to the documentation. So what is the difference between XA/non-XA datasources? Why should we use XA-datasources at all?
user3663882
  • 6,957
  • 10
  • 51
  • 92
21
votes
3 answers

Separating Data Source to another class in Swift

I'm trying to keep my view controllers clean as described in this article objc.io Issue #1 Lighter View Controllers. I tested this method in Objective-C and it works fine. I have a separate class which implements UITableViewDataSource…
Isuru
  • 30,617
  • 60
  • 187
  • 303
21
votes
5 answers

How do I lookup a JNDI Datasource from outside a web container?

I have the following environment set up: Java 1.5 Sun Application Server 8.2 Oracle 10 XE Struts 2 Hibernate I'm interested to know how I can write code for a Java client (i.e. outside of a web application) that can reference the JNDI datasource…
masotime
  • 506
  • 1
  • 3
  • 14
21
votes
2 answers

Weblogic datasource disappears from JNDI tree

We are using weblogic version 12C. Steps to reproduce the issue: - Create the datasource. Deploy the application to weblogic. Application works fine. Update the deployed ear with the new one. Application is not able to connect the…
mittalpraveen
  • 481
  • 3
  • 13
20
votes
2 answers

Spring DriverManagerDataSource vs apache BasicDataSource

What is the difference between Spring DriverManagerDataSource and apache BasicDataSource? Which of them is preferable and in which situations? Thank you.
Nazar Sobchuk
  • 297
  • 1
  • 7
  • 17