0 Replies Latest reply on Jan 4, 2006 11:35 AM by boby

    connecting to multiples databases for one Java application ?

    boby

      Hello everybody,

      JBoss 4.0.3SP1
      EJB3 RC3

      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.

      Have you any suggestions ???