Jean,

I believe that you can start/stop a service remotely on Windows NT+ if the target macine is running Netsvc.exe (http://support.microsoft.com/kb/166819). One idea would be to logon to the remote machine and register the database startup script as a Windows service. From that point on, you can use NetSvc to remotely manage your Derby Network server. You may also want to consider using JavaServiceWrapper (http://wrapper.tanukisoftware.org) since it provides a clean way to "shutdown" Java processes when stopped by the NT service manager. The last thing you want is for your database to be corrupted by forcibly killing the process.

Jean-Charles Laurent wrote:

Hi

I am tring to start the Derby Database to listen on a given port on a remote machin. Let say I am on my window PC called 'myMachin' IP=xxx.xxx.xxx.xxx. I want to start Derby to listen on another window machine called 'otherMachin' IP=yyy.yyy.yyy.yyy.

If I logon to 'otherMachin' and lauch the following command all works fine:


/java -cp CLASSPATH org.apache.derby.drda.NetworkServerControl start -h 0.0.0.0 -p 1527/


Then I can create the database and several client applications can retrieve, insert, update and delete information stored in the database.


What I want to do is to start the server from 'myMachin' as I cannot logon to the actual server and run the script local to the machin. I have tried several option but I alway get an error "Cannot list on 'otherMachin' on port 1527".

here is

/ java -cp CLASSPATH org.apache.derby.drda.NetworkServerControl start -h otherMachin -p 1527/
/or/
/ java -cp CLASSPATH org.apache.derby.drda.NetworkServerControl start -h yyy.yyy.yyy.yyy -p 1527/


My CLASSPATH is "/.;./vendor/lib/derby.jar;./vendor/lib/derbynet.jar/".


Is this possible to do, or do we need to be on the local host to start the server?
If this is possible what am I doing wrong?
If it is not possible, I've seen some post for Linux, where they suggest using ssh to remote connect to the linux box where the Database resides and the server must listen. What would be the equivalent for Windows?

Thanks for any help.


Jean-Charles Laurent

Reply via email to