I`m using hibernate with jpa, and it is configured with persistence.xml Is it possible to get hibernate connection properties from web application?
Thanks.
If you are using JDBC you can always get a connection and its metadata. If you are using a Spring transaction manager you could get it like this:
transactionManager.getDataSource().getConnection().getMetaData()
This shows tons of information about your database and its connection including the username. There is some information in the persistence.xml that might deal with database connection pooling which usually isn't stored anywhere in Hibernate but in the actually connection pooling code.
What information do you need to get from the persistence.xml file?