Jump to content

War Deployment


Amoss

Recommended Posts

You're on Tommy, so you can do this yourself in cPanel now. https://www.helionet.org/index/topic/29658-servlet-deploy/

 

It can take a few hours. If it doesn't deploy within 24 hours, let us know and we can post the logs (usually a failure in deployment is caused by either too many mysql connections or a damaged WAR file).

Link to comment
Share on other sites

They take a few hours to deploy, and when they finish I think the application will just start working and it will show the URL of the deployed servlet. Usually the servlet address ends up being something like domain.heliohost.org/cpusername_warfilename/ (so a user example deploying MyFirstServlet.war on example.heliohost.org would have example.heliohost.org/example_MyFirstServlet/ as its URL)

 

I don't use Java myself, so I don't have much experience with its deployment unfortunately. I'm a PHP developer. Krydos would know more about how this deployment works since he built the script.

Link to comment
Share on other sites

I updated my current war so the url is already working but without the new functionality I added so if I understand you correctly, I just need to check it until the new functionality is working?

Or should I wait for a reply from Krydos to be sure?

 

Again, thank you for the tip

Link to comment
Share on other sites

Correct. You can only have one WAR at a time, so the old deployment should be overwritten when the new one takes effect.

 

There might be a small period where it doesn't work at all, actually (between when the old one undeploys and the new one goes live). I'm not sure though.

Link to comment
Share on other sites

There are four states that the deployment can be in.

 

First, you've never deployed a .war before and you have a .war uploaded.

java_deploy.png

 

Second, you've requested a deployment and it hasn't gone through yet. Notice how you can't upload a new .war or request deployment again. If you already had a .war file deployed it will stay deployed until the new version is deployed. The downtime between deployments varies from .war to .war but generally it's only a few seconds. Some more complicated .wars have a few minutes of downtime while it processes the new version.

java_pending.png

 

Third, your servlet has been properly deployed, and you can click the link to visit it. Notice how the current version stays deployed even if you upload a new version of your .war or an entirely different .war file.

java_done.png

 

The fourth state is error. Sometimes .war files cannot be deployed because of severe errors. The most common reason is the servlet is trying to use more than four simultaneous mysql connections. By default java applications assume they are the only thing running on the entire server and try to hog all of the resources by opening like 50 mysql connections.

java_error.png

Link to comment
Share on other sites

Thank you all for your explanation but I'm not sure I understood how can I know if my deployment of the new war went through and whether I have the new war or not without trial an err :)

If trial and err is the only option, I will add an API that gives back the version so next time I will know :)

Link to comment
Share on other sites

Thank you all for your explanation but I'm not sure I understood how can I know if my deployment of the new war went through

You will know because

java_pending.png

will change to

java_done.png

 

It says "pending" while it's working on it, and when it's done it says "deployed."

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...