Persisisntece.xml configuration with Glassfish datasource

Asked

Viewed 92 times

1

Next people I made 2 glassfish datasources!!!! Where the first is a fixed database!!! Follow picture:

inserir a descrição da imagem aqui

This datasource is working correctly !!!

My second I do not pass the Database property because this property comes from my first datasource, ie I take the path and the server ip of the first datasource!!

Follow picture:

inserir a descrição da imagem aqui

Then I pass the property in my Connection class when I will create the EMF

Follow picture:

inserir a descrição da imagem aqui

The problem is that it does not take the property from the database and gives the following error: Caused by: java.sql.Sqlexception: Database was not specified. Cannot provide Connections.

Someone can help me?

  • Search for Multitenancy. Hibernate and Eclipselink bring support. I believe it will help you

  • Multitenacy’s problem is that I have to have all the addresses of the databases I have , and that information I have inside a database called Manager !!! so I make the connection in the Manager, I take the data from the client’s database , as IP Sv and local , then I make the connection !!!

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.