The Connection class has a setReadOnly() that hints to the database that the connection is read only. This will enable any possible database optimisation.
Connection connection = DriverManager.getConnection(
connectionString, properties);
connection.setReadOnly(true);
written by objects
\\ tags: connection, database
The Proxy class can be used specify proxy details at the connection level.
SocketAddress addr = new InetSocketAddress("proxy.objects.com", 88);
Proxy proxy = new Proxy(Proxy.Type.SOCKS, addr);
URL url = new URL("http://java.sun.com/");
URConnection conn = url.openConnection(proxy);
written by objects
\\ tags: connection, proxy, SOCKS
The Proxy class can be used specify proxy details at the connection level.
SocketAddress addr = new InetSocketAddress("proxy.objects.com", 88);
Proxy proxy = new Proxy(Proxy.Type.HTTP, addr);
URL url = new URL("http://java.sun.com/");
URConnection conn = url.openConnection(proxy);
written by objects
\\ tags: connection, http, proxy