Sto tentando di avviare il database H2 nella modalità server (desidero che venga eseguito in un processo diverso) tramite Spring. Attualmente sto usando Java Runnable.exec per avviare il database h2 (usando il comando: "java -cp h2.jar org.h2.tools.Server")Avviare il database H2 in modalità server tramite Spring
So che c'è un modo per fallo via Spring. Ho provato ad aggiungere il seguente alla configurazione primavera, ma non ha funzionato (non è stato avviato il database H2):
<bean id="org.h2.tools.Server" class="org.h2.tools.Server"
factory-method="createTcpServer" init-method="start" destroy-method="stop">
<constructor-arg value="-tcp,-tcpAllowOthers,true,-tcpPort,8043" />
</bean>
<bean id="org.h2.tools.Server-WebServer" class="org.h2.tools.Server"
factory-method="createWebServer" init-method="start">
<constructor-arg value="-web,-webAllowOthers,true,-webPort,8082" />
</bean>
Gradirei qualsiasi aiuto/idee
Qualche messaggio di errore stampato? –