. DataSource, JNDI, , . , , URL- , , DataSource ( jdbc, ). DataSource, , .
Let's say that you want to write your own implementation that gives the client a NOOP connection (a connection object on which all operations give nothing). All you have to do is "register" the user implementation DataSourcewith the server JNDI application servers. This implementation method getConnection()simply returns a class that implements the Connection interface and methods that do nothing.
source
share