Is it possible to embed a MySQL database server in a Java Servlet?

I'm in a situation where I'm being asked to make one WAR file that runs Wordpress . Using Quercus , Tomcat and httpd + mod_rewrite I was able to make a WAR file containing everything except the database, which I ran externally. That said, I'm not sure how I can manage to eliminate the dependency on an external database (and to be honest, this whole endeavor seems like a bad idea to me).

This article describes how Wordpress was successfully deployed on Google App Engine and therefore without MySQL, but it was done using JPA.

Instead of embedding a MySQL instance, if I could use an external connection to the MSSQL database, that would be nice. ( This is an old post , but it looks like real MySQL is the only supported database for Wordpress.) What is the most viable option to try and replace every MySQL call in the Wordpress source code with an MSSQL call? Is there some kind of compatibility / translation layer that I could use instead? (I've seen this question , but the solution won't work in my case.)

UPDATE : I stumbled upon MySQL-JE but it looks outdated and not complete enough (not sure how I will tell Quercus / PHP about this). Has anyone used it? If so, do you think this will help solve this problem?

0


source to share


1 answer


Built-in database

According to this diagram , MySQL is not built for embedded systems use.

I can point you to two pure Java database engines to embed in a Java application. Both are open, free and active. Both have good pedigrees with a long line of database development history behind them.



WordPress Requires MySQL

According to this WordPress Requirements page, in particular, MySQL is required. This is annoying. The main reason for SQL is to prevent database locking.

+1


source







All Articles