Discussions

XML & Web services: Sharing same DB connection for all published Web Services

  1. Salut
    I'm developing web services using AXIS, however using new DB connection for each Web Service is very deprecated,
    i need help on how sharing one DB connction for all Web services.

    Threaded Messages (4)

  2. one detail[ Go to top ]

    using AXIS as webapps
  3. why[ Go to top ]

    is you data read only? if not this does not make sense
  4. Yes[ Go to top ]

    Data is read only, how can this question help me ?
  5. use database pools[ Go to top ]

    By all means if you are accesing databases from webservices running on an application server use and define a databasepool and retrieve a connection through the datasource.

    If you are using tomcat just grab some opensource database poool implementation such as dbcp or c3p0. But never create a new jdbc connection inside an application server without using database pools.

    Sergio Berna
    Open-VA, a fully accessible open source Validation Authority
    www.open-va.org