What about putting a listener in your web.xml that create a connection pool and link it to jndi?
En l'instant précis du 03/10/07 14:01, Charl Gerber s'exprimait en ces termes: > Turns out datasource configuration is not possible > using Plesk as a shared tomcat server, the guys at > Plesk themselves told me. > > That sucks. Means I have to create and manage the > Datasource in my app... minor refactoring, but not a > nice way of doing it. I also use hibernate and could > only get that working by defining its own connection > pooling. So now I have two pools :(( > > > --- Pid <[EMAIL PROTECTED]> wrote: > > >> Charl Gerber wrote: >> >>> Hi, >>> >>> I just moved my hosting from a provider where I >>> >> had a >> >>> private Tomcat server with complete control over >>> >> it to >> >>> a provider that uses Plesk and I share the Tomcat >>> server with other users. The provider has no >>> >> Tomcat >> >>> knowledge in house and the Tomcat service is >>> >> rarely >> >>> used, so they couldn't help me with this problem. >>> >> which version of tomcat? >> >> >>> I want to create a jdbc datasource for my >>> >> application. >> >>> If we manually create it in server.xml, the >>> >> provider >> >>> claims that the changes are overwritten and >>> >> removed >> >>> every time someone uploads a new .war file. (Is >>> >> this >> >>> true?) >>> >> AFAIK, server.xml is not altered by war file >> deployments. >> Tomcat would need to be restarted in order that >> those alterations to >> server.xml are evaluated. >> >> I also do not want to define the datasource as >> >>> eg a global resource, as it would mean the other >>> >> users >> >>> of the tomcat server can get access to my >>> >> database. >> >>> I tried to configure the datasource in the >>> >> context.xml >> >>> of my application and put it in my .war file. This >>> works fine on my development server, but when >>> >> uploaded >> >>> to the Tomcat server with Plesk, a server.xml >>> >> entry >> >>> for my application is created without the >>> >> datasource >> >>> settings and I cannot access my database. >>> >> What are the details of the entry being made in >> server.xml? >> Is Plesk making these alterations? >> What process are you using to upload the WAR? >> >> >>> How and where can I properly define a datasource >>> >> for >> >>> my application so that Plesk will set the Tomcat >>> configuration correctly? >>> >> META-INF/context.xml is the best location I think. >> >> Please provide more details about the tomcat version >> and the answer to >> the questions above. >> >> >> p >> >> >> >> >>> CG >>> >>> >>> > --------------------------------------------------------------------- > >>> To start a new topic, e-mail: >>> >> users@tomcat.apache.org >> >>> To unsubscribe, e-mail: >>> >> [EMAIL PROTECTED] >> >>> For additional commands, e-mail: >>> >> [EMAIL PROTECTED] >> >>> >> >> > --------------------------------------------------------------------- > >> To start a new topic, e-mail: >> users@tomcat.apache.org >> To unsubscribe, e-mail: >> [EMAIL PROTECTED] >> For additional commands, e-mail: >> [EMAIL PROTECTED] >> >> >> > > > --------------------------------------------------------------------- > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > -- http://www.devlog.be (a belgian developer's logs) --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]