Connection « DataSource « Java Database Q&A





1. Any gotchas in migrating database connectivity to DataSource?    stackoverflow.com

Looking at some old application code which uses explicit driver loading as

Class.forName(...).newInstance
I have been told to change this to use the Java 1.4.2 mechanism to establish a database connection using ...

2. How do I implement getConnection() in DataSource in Java?    stackoverflow.com

I'm reading up on DataSource, here, and trying to implement it in my own little project by using a simple file as my "data source". I've created a ...

3. Should I close a connection that came from a datasource?    stackoverflow.com

When I do a dataSource.getConnection(), when I want the connection to be return to the pool (and not closed), does calling the close method return the connection to the pool or ...

4. Close connection to DB does not close all connections    stackoverflow.com

I have connection leak to DB in my code. The funny thing is that when I debug, all the connections are closed successfully (or when I do Thread.Sleep(100) ). but without that ...

5. Cannot connect - createConnection from AQ XAQueueConnectionFactory using DataSource    stackoverflow.com

I'm trying to get a connection from WebSphere Application Server to Oracle Streams AQ. It fails to make a connection. The source is:

<bean id="dataSource" class="org.springframework.jndi.JndiObjectFactoryBean">
    <property name="jndiName" value="jdbc/MessageManagerDB"/>
</bean>
A ...

6. Use java.sql.Connection as DataSource for Flyway    stackoverflow.com

Is there a way to set flyway to use an existing java.sql.Connection as DataSource, resp. is there a way to generate a DataSource from an existing java.sql.Connection? I did not find ...

7. How use DataSource to get connection    coderanch.com

8. DataSource Connection in WSAD    coderanch.com

9. Datasource Connection    coderanch.com

Can anyone tells me if this the correct way of getting connection using a servlet? I need to process against 2 beans after the else statement, do I need to get connection and close connection and then open connection again when I goes against my second bean? Can I open the connection just one time and process both beans? Any help ...





10. Do I close connections from a javax.sql.DataSource?    coderanch.com

Hi, I'm faced with a peculiar problem. I did proceed to call close on the connection obtained from the pool but i found that instead of returning it to the pool it was being closed as if it were a standalone connection. So I started working with the premise that after the stipulated time is over the container(tomcat) will close it. ...

11. Connection from DataSource only allows "selects"!    coderanch.com

1. check the auto-commit mode of connection 2. if you are managing transactions by any means like ejb,jta make sure you are commiting your transaction it is adivised that if you are not having transaction via ejb,or jta the set auto-commit mode of connection to false immediate after you create connection and use conn.commit() after you execute an insert statement or ...

13. WSAD DataSource Connection Exception    coderanch.com

I am having a problem configuring the DataSource using WSAD , please,let me know from the following Exception what could be done R java.sql.SQLException: Io exception: The Network Adapter could not establish the connection [10/23/05 21:09:38:797 EDT] 530b96cd SystemErr R at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java) [10/23/05 21:09:38:797 EDT] 530b96cd SystemErr R at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java) [10/23/05 21:09:38:797 EDT] 530b96cd SystemErr R at oracle.jdbc.driver.OracleConnection.(OracleConnection.java) [10/23/05 21:09:38:797 EDT] ...

14. Datasource and connection    coderanch.com

15. How to check if DB Connection is LOSTwhen using DATASOURCE    coderanch.com

Is it sort of vendor dependant although you could construct special cases that try to handle vendors and codes efficiency. Generally though, I do not follow why you want to decode it. For starters, losing a database connection should be an exception, not the standard. Other than the database going offline, its not easy to lose access. Second, most design patterns ...





19. problem in getting connection from datasource for multiple threads    coderanch.com

Hi , We are using a multi threaded approach wherein we are tyring to get connection from the datasource. But the problem is when all the 12 threads try to get the conncetion at the same time from the datasource, the code is getting hanged. No exception is thrown . How do we solve this? Is getting connections from a datasource ...

21. Connection using DataSource    coderanch.com

Data sources are nice because they can be managed in the administration console of the server, rather than in the source code or some text file. How you set them up, though, is server platform dependent. Often time there are XML files you can use to configure them. [ March 23, 2008: Message edited by: Scott Selikoff ]

23. Datasource vs Connection    coderanch.com

24. JDBC Connection with DataSource    coderanch.com

Hey thanks guys for the reply. I probly wont be using the Glassfish server anytime soon. Just need to use the Java derby database within netbeans for an assignment. org.apache.derby.client.ClientDataSource dataSource = new org.apache.derby.client.ClientDataSource (); is not known in a default install of Netbeans. I thought derby class paths were all set up in a defailt netbeans install. Any ideas?

25. DataSource VS Connection    coderanch.com

27. Creating datasource and Closing connection?    coderanch.com

1)When we get a connection using datasource say oracleDatasource . Lets say during programming, some developer does not close the connection explicity. Will that connection be returned to connection or will it be considered as connection leak. 2) As it is said , datasource is created, deployed, and managed separately(by appserver) from the applications that use it. There are two ways ...

28. A datasource solution for querys to validate the connection isn't close?    java-forums.org

Hi, I have a problem with a application. When users don't use the database in hours, and one of them enter to the application, and do an operation that try to connect to the BD, this is closed. The application is waiting for a long time, and don't do anything, and 15 minutes after, throw an exception that indicates that the ...

29. please help can we implement datasource for bluetooth connections    forums.oracle.com

hi i my application reads data from bluetooth from PC to mobile now iam using streamconnections iam sending audio data from pc to mobile and for this in my mobile side i would like to implement the datasource for incomming bluetooth data is it possible if so how i can do it....