Oracle Weblogic Server (MOSC)

MOSC Banner

How can I reference the Overridden Default DataSource specified in the managed server configuration?

Referencing java:comp/DefaultDataSource in the context lookup is still returning the built-in Derby datasource.

I would expect these two statements to be equivalent (with the managed server default datasource (image attached) set to: jdbc/CommunicationRoutingService )

1. ic = new InitialContext();
    DataSource dataSource = (DataSource) ic.lookup("jdbc/CommunicationRoutingService");

2. ic = new InitialContext();
    DataSource dataSource = (DataSource) ic.lookup("java:comp/DefaultDataSource");

The 1st works correctly, the 2nd returns the Derby datasource.

I'm curious if anyone has gotten this to work.

Thanks

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center