I use the EJB3 persistance with one database. That is works. But actually I have one database by client. Therefore, I need to connect (disconnect) at multiples databases according to the client. For example : 1) a client X asks to me a jobs list. I have to connect to database of client X. Then 2) a client Y asks to me his jobs list. I have to connect to database of client Y. etc.. for every client.
I dont know how to do. I looked at wiki, forum. I think it has to do some modifications in datasource, then the look up in EJB Session and specify the database name for example. Or change the persistance.xml file of par archive.