These DataSource classes cannot be used in applications that use the Java Naming and Directory Interface (JNDI) API. Otherwise, they are just like the versions for the full Java SE platform.
Applications using Java SE 8 Compact Profile 2 must use these classes.
Applications using Java SE 8 Compact Profile 3 can use the ordinary DataSource
classes. (Compact Profile 1 does not provide any JDBC support, so
The following DataSource classes are required for use with Java SE 8 Compact Profile 2: