Automatically start JavaDB (Derby) on GlassFish

del.ave picture del.ave · Aug 17, 2010 · Viewed 17.9k times · Source

I am planning to deploy GlassFish v3 open source edition to a production environment. It comes with JavaDB (Apache Derby) which is just what I need. The only problem is that JavaDB is not started by default when GlassFish starts. I would have to go to the command line and enter:

asadmin start-database

Is there a way to make the database start automatically whenever the server (GlassFish) starts? I hated doing that manually everytime while I was developing my application and I certainly don't want to do that in production.

Thanks in advance

Answer

Truman picture Truman · Feb 21, 2012

This is a little dated but there's a checkbox in the GlassFish section in Eclipse's preferences titled "Start the JavaDB database process when starting GlassFish Server". I am running Eclipse Indigo SR1.