Retrieve Datasource Object by Client

The client retrieves the DataSource object by setting its JNDI properties the same way the DataSource was deployed.

The client needs to have an object factory available that can transform the object as it is stored (for example, serialized) into a Java object.

Context ctx = new InitialContext();
DataSource ds = (DataSource) ctx.lookup("java:comp/env/jdbc/myASE");
Connection conn = ds.getConnection();