1

Apache Derby has an option to run its "Network Server" as a web application in a servlet container (derby.war).

The problem is then how to deploy other applications that depend on derby in the same container to load after derby loads (preferable in a Tomcat container).

From what I recall there is no way to control the order of web application initialization in Tomcat.

Has anybody gotten derby.war to work in a multiple web application environment?

Adam Gent
  • 47,843
  • 23
  • 153
  • 203

2 Answers2

0

You'll probably find it easier and more reliable to run the Network Server in a separate standalone process of its own, rather than as part of the Tomcat process. It will make it easier to start, stop, control, and administer your Derby databases separately from your applications.

Bryan Pendleton
  • 16,128
  • 3
  • 32
  • 56
  • Yes I agree for production that your answer makes sense but we are trying to ship an of out-of-box product that has as minimal setup as possible. – Adam Gent Jul 25 '11 at 16:24
  • Does your product ship with a Tomcat installation within? If so, you can write a script (myProduct.sh or .bat) that starts up Derby and then proceeds to start Tomcat. You might also want to take a look at Jetty. Our trial product ships as a small, custom Jetty container which first boots Derby then starts our .war files. – st.never Jul 26 '11 at 16:18
0

I had a similar issue too, but with HSQLDB. I went to using standalone instances.

yottamoto
  • 381
  • 1
  • 3
  • 17