You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Oliver Hirschi <o....@bluewin.ch> on 2007/06/22 08:42:14 UTC
Service Settings, DB connection
Hi there,
I have to implement several webservice with DB connections to a
mysql-database. Now I have two questions about the implementing of
that:
1. Where should I store the db-connection parameters. Now I have
integrated it to service.xml! It works fine, but if I make the
deployment of the services I generate an ".aar" file which includes
also the service.xml. This implicates, that by updating the service on
a server, the service.xml is also overwritten, it means the
customer-settings (like db connection parameters, etc.) are lost and
have to set again.
Is there a better place to store such settings?
2. I connect to db in the startUp method of an additional service-class
implementing the ServiceLifeCycle interface and stores it to a
service-parameter (the disconnecting is made in the shutDown method).
So from the serveral service-methods I can acces the db-connection
object over the servicecontext. It runs well.
Now, my question is, was happens, if there comes several requests to
services wich used the db-connection from different clients at the same
time? I think there is only one db-connection object instance, so there
can occur access violations, isn't it?
Many thanks & Regards,
--
Oliver Hirschi
http://www.FamilyHirschi.ch
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org