• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Configuring a Tomcat JDBC datasource

D

double-bogey

Guest
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.

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?)

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.

How and where can I properly define a datasource for my application so that Plesk will set the Tomcat configuration correctly?
 
Double-bogey,

Unfortunately, that is a shortcoming
of a shared JVM environment vs a Private
JVM environment. I suggest getting a
host that offers Private JVM hosting,
or have your present host install the addon tool called,NGASI AppServer Manager (http://www.ngasi.com)
which enables private jvm java hosting
with Plesk.
 
Are they planning to address the issue? Its a bit of a bummer...

I got around it by creating the datasource in my code, but since I also use Hibernate, it cause a few more worries. All solved now, just not the cleanest solution.
 
Back
Top