I need to write a Java Service that uses JDBC and needs to refer to the Data Sources (Alias) defined in webMethods. The Java Service is run standalone - hence has no inputs from any other services.
I am assuiming that you want to reference the aliases defined rather than hardcoding the URL, user, password and driver settings in your code. If that is the case then you can just use the service
wm.server.db:dataSourceGet
with the database alias as the input and it will return an IData object with the URL, user, password and driver setting in the alias. From there on you can just use simple JDBC code to open a connection.