简体   繁体   中英

Accessing a Datasource defined in Websphere Liberty Profile 8.5 from an external Standalone java client

Can anyone let me know the procedure to access the Datasource defined in a Websphere Liberty profile 8.5 , from an external Standalone JavaClient.

thanks

It's not possible to access a DataSource defined in WebSphere Liberty from a standalone java client.

However, you can access one from the client container, but that's different than a standalone java program.

Here are some alternative options:

  • Write some code in a WebSphere Liberty application which would interface with the DataSource on Liberty, and have your standalone java client call the application which would do the DB work and return results.
  • You should still be able to access the underlying database without going through a WebSphere DataSource. Simple specify the connection url in your standalone java client and you'll be able to work directly with the underyling db. The drawback to this approach is you don't get any of the performance enhancements that a DataSource from WebSphere offers.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM