context « DataSource « Java Database Q&A

Home
Java Database Q&A
1.Blob
2.cassandra
3.column
4.Connection
5.Cursor
6.dao
7.Data Type
8.Database
9.Database Product
10.DataSource
11.Date
12.db2
13.derby
14.Development
15.Driver
16.Exception
17.file
18.hadoop
19.hbase
20.hsqldb
21.ibatis
22.JDBC
23.memcached
24.mongodb
25.MS Access
26.mysql
27.ODBC
28.Operation
29.oracle
30.postgresql
31.Record
32.result
33.Resultset
34.Schema
35.SQL
36.sqlite
37.SQLserver
38.Statement
39.stored procedure
40.sybase
41.Table
42.Transaction
43.Trigger
Java Database Q&A » DataSource » context 

1. How can I spoof a jndi lookup for a datasource without a app server    stackoverflow.com

I want to test some new functionality which is part of an internal web app. This new code uses a database connection normally provided by an app server (tomcat). I do not ...

2. Context specific usernames for connections on a JEE Datasource (JBoss 5.1)    stackoverflow.com

We have an application that needs to access a database that is owned by a different team. That database has security inside the database (triggers, table permissions, etc) and so we need ...

3. Object persistence terminology: 'repository' vs. 'store' vs. 'context' vs. 'retriever' vs. (...)    stackoverflow.com

I'm not sure how to name data store classes when designing a program's data access layer (DAL). (By data store class, I mean a class that is responsible to read a persisted ...

4. How can I switch the database context of an existing DataSource?    stackoverflow.com

Let's say I have an existing DataSource to a master database. I now need to create a new database, and execute some DDLs on that database. Is this possible with e.g, ...

5. lookup datasource in context every time, Is it right?    stackoverflow.com

In my application i configured more than one datasource (for diff databases). Whenever user sends a request depends upon user category i need to look up for the respective datasource in ...

6. Getting Datasource from Context    coderanch.com

7. Errored while looking up datasource: PWC4216: Name jdbc is not bound in this Context    coderanch.com

//looks up a datasource private static synchronized DataSource getDataSource(String jndiName) throws NamingException { DataSource dataSource = null; try { Context c = new InitialContext(); Context envContext = (Context) c.lookup("java:comp/env"); Logger.getLogger(DBUtilities.class.getName()).log(Level.INFO, "Found sub context"); dataSource = (DataSource) envContext.lookup(jndiName); } catch (NamingException e) { e.printStackTrace(); throw new NamingException("Errored while looking up datasource: " + e.getMessage()); } return dataSource; }

8. Getting Remote Datasource object to client using Weblogic Context Factory from remote Machine    coderanch.com

I've written a simple java class in my client machine to get jdbc datasource using weblogic jndi context created in weblogic server which is hosted in remote machine. I'm facing a small problem to get this datasource object. Can any one please help to sort it out? I've included the below list of jars in my classpath. Please let me know ...

10. ClassCastException getting Datasource from Context    java-forums.org

package connections; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.util.Properties; import javax.naming.Context; import javax.naming.InitialContext; import javax.sql.DataSource; public class TestJNDI { public static void main(String[] args) { Properties p = new Properties(); p.setProperty("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory" ) ; p.setProperty("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces" ) ; p.setProperty("java.naming.provider.url","jnp://192.168.15.22:6578") ; try { Context ctx = null; ctx = new InitialContext(p); DataSource _dataSource = (DataSource) ctx.lookup("MY_POOL"); Connection dbConn = _dataSource.getConnection(); System.out.println(dbConn.getTransactionIsolation()); ...

java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.