Marek Nazarko wrote on Feb 26, 2008 01:31 PM:
Is it possible to know, which datasource uses server?
I need to make some manual modifications in database via JDBC at startup of Seam application, so I want to use datasource to get connection.
I need some translation here ;-) Are you asking how to list what datasources are available to the server? Check the JNDI. If not, then the answer might not apply...
Application at start is bind to some datasource - entity manager uses it to persist etc. I want to know name of that datasource.
It's written in xxx-ds.xml like
Hmmm, I don't think there is any API for that. You could read your persistence.xml yourself and look through the deployed datasource-xml-files but there is probably something preventing you from reading files outside the ear/war(?)