yes there is a way to access the
JDBC datasource configured in weblogic using java code.. Suppose you have the UAT datasource as "projectUAT", then you have to code in java as :
String dataSourceName = "projectUAT";
javax.naming.Context ctx = new InitialContext();
javax.sql.DataSource ds = ctx.lookup(dataSourceName);
javax.sql.Connection conn = ds.getConnection();
//you can use the connection object as you like after this.
//you need to envelope this code snippet in proper try/catch block.