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