Both of them have a method called getConnection(). DriverManager has it as a static method whereas DataSource's is an instance method. getConnection() gives you a java.sql.Connection object.
Also make sure of the JDBC Driver Type as well. Depends on that you need to pass the Connection URL.