I have inherited a web-service that was written in Netbeans and runs on Glassfish (version 3) and used to talk between a Redhat server and a Windows7 machine.
These can be started manually, by using Netbeans (6.9) to start the Glassfish Server and deploy the Java script, and they communicate securely quite happily
Of course, manually deploying the system like this is far from ideal, so I have arranged for Glassfish to be deployed via the command line interface of Redhat;
Create a user
groupadd glassfish
useradd -s /bin/bash -d /home/glassfish -m -g glassfish glassfish
Copy from CD to glassfish directory
mkdir cdrom
chmod 777 /cdrom
mount /dev/cd0 /cdrom
cp glassfish-v3.zip /home/glassfish/glassfish-v3.zip
Login as the new user in a terminal window
sudo -i -u glassfish
Install GlassFish V3 using user glassfish
cd ~
unzip glassfish-v3.zip
rm glassfish-v3.zip
Exit the shell from step 2
Then the .war file (as in the Java script) is put into
glassfish/glassfishv3/glassfish/domains/domain1/autodeploy/CommandAndControlService.war
(As described in; http://download.oracle.com/docs/cd/E19798-01/821-1757/geyvr/index.html)
Then to run Glassfish I just log in as glassfish user, and launch glassfish
sudo -i -u glassfish
sudo glassfishv2/glassfish/bin/asadmin start-domain
(Which automatically deploys the .war file from earlier, as it’s in the “auto-deploy” directory)
All of the above works without any problems at all, the two machines chatter away happily over a non-secure connection.
The problem is that a secure connection is required, and this has been put into the script, and it works perfectly fine when glassfish is started through Netbeans.
However, when applying the above procedure, the secure network connection complains about the certificates due to them being “self signed”. I’d say that this must be something in the code, but as it works fine when started through Netbeans I’d say that it was something to do with how I’m starting Glassfish, and deploying the .war file.
Currently Glassfish and the Java are manually started through Netbeans on the Windows box.
Any ideas?
Many Thanks