Restart application server after WAR redeployment on Websphere - java

Currently I'm supporting a web application project where every time there's a production deployment, we have to restart the Application Server. I ask my colleague why and he said, deployment takes a lot of memory therefore restart is to avoid outOfMemory and PermGen error. I also found out that JBoss AS, we also doing the same - have to restart after deployment. In Tomcat, we stop the app server then do the deployment and then restart the app server.
Is it by standard Webpshere and JBoss or any other Java Application Server have to restart after deployment?
Thank you.

No, this is by no way a standard. A redeployment may mean some time offline when the old code is taken offline and updated, but having to restart the complete server is normally no must.

Related

How do I debug server-side errors?

Our Java application is going through migration from a WAS 7 server to a WAS 8.5 server - and for some reason, even though our application shows as Deployed in our Admin Console, the application itself isn't coming up on our assigned URL.
I've ruled out the possibility of a code-related problem by testing the application in my local server, so I know the problem is with some server settings - but, almost all of my experience in CS is in coding, and I don't know how to figure out where those settings have gone awry.
What options do I have to debug my application's server-side issues?
You don't specify what you mean by "coming up," so I'll start with the broad suggestions.
A couple things to sanity check:
Ensure the application has been deployed on the specific server you are trying to access it on. It's common to have multiple servers all in one cell controlled by one deployment manager, and applications can be deployed to only some of those servers. In the admin console, under Servers -> WebSphere application servers you can find the server you expect it to be on and check Installed applications.
Check to see if the application itself has started. It's possible the server has been started, but not the application. In Applications -> WebSphere enterprise applications, look for the green arrow next to your application.
If you're trying to access a servlet, make sure the context-root of your web module is set to what you expect. In the application's configuration page, it's in Context Root for Web Modules under Web Module Properties.
If all of those seem correct, or if the application is stopped and won't start, check the server logs in your profile's logs directory, especially the SystemOut.log and the ffdc folder. It may be that an error is occuring when you go to access it, or when it is starting up. Those should appear there.
If your application uses EJBs at a version less than 3.1, the EJBDeploy tool must have been run against your application either before deployment, or as part of the deployment process. If you are expecting the latter to occur, ensure the EJBDeploy tool was installed alongside WebSphere on the target system.
If all of that fails, you may way to break out the debugger (if that's allowed in your environment) and see if your code is even being reached.
Check Server Logs: in WAS Console you can find the logs of your server.
Debug in local server. By deploying an ear in your local server, you can then start the server in loggin mode. Then you shuld stop and restart your websphere aplication and it will be stoped in selected breakpoints.

Deployed WildFly WebSocket Giving poor Performance in Openshift . Need to restart the application in Openshift Site

Deployed WildFly Websocket application OPENSHIFT . Everything was going good . But Sometime Websocket is not working properly. Then again Everytime i am logging in Openshift Site and Restarting the application. After that it's working fine. After sometime again websocket is not working . Please help me to solve this. How to keep the application always live in OPENSHIFT ??
You might try checking for Memory Limit Violations (https://help.openshift.com/hc/en-us/articles/202399600-How-to-check-for-memory-limit-violations). If you are using small gears you might be running out of memory, your application may require a medium or large gear to work properly. Especially if you are running WildFly + a database on the same gear. Also keep in mind that the JVM is allocated 1/2 of the available gear memory by default, you can read more about that here (https://developers.openshift.com/en/wildfly-jvm-memory.html)

openshift, Tomcat 7 (JBoss EWS 2.0) and neo4j

I run a Java EE application on openshift with a Tomcat 7 server, and using neo4j in embedded mode for the persistance layer. I am using the openshift free plan for now. Every now and then, the application stops, and i get a 503 error. I suspect they pause the gear if the application is inactive for some time, but the application never restarts properly.
I have logged in using ssh and inspected the logs in Tomcat, but found no errors. I suspect that neo4j does not get to call shutdown, but i guess it should still recover.
Any ideas? What should i inspect?
It the application isn't receiving any external requests for 48 hours it will then get idled. However the application will automatically be restarted once an external request is made. Also since you're using java and your database on small gear, check to make sure you aren't hitting any memory limits (https://www.openshift.com/kb/kb-e1082-how-to-check-for-memory-limit-violations).

Deploying to a Tomcat server which is already running outside of IntelliJ IDEA

I have installed Tomcat server on my PC and I have added it as a service in Windows. So now it starts each time I boot my computer. Now, in IntelliJ I have configured an application server, and that is my Tomcat server, however when trying to "run" the application it says that the port is already in use....and it is ofcourse since Tomcat is started on boot. Is it possible that IntelliJ deploys to the already running Tomcat server instead of trying to start again?
If you want to deploy to Tomcat started outside of IDEA, use the Tomcat Remote Run/Debug configuration type.
The difference of the Remote configuration is that it doesn't start the server, ensure you create Remote configuration, not Local:
It's possible to update application without restarting the server, refer to the Updating Applications on Application Servers help section.
You can use Jrebel plugin. It will be helpful to update your application without restarting your server.

Google App Engine - I have to restart the development server anytime I make changes to a servlet

I have to restart the development server anytime I make changes to a servlet. Is there a way I can make it so I don't have to do this? Restarting the dev app server takes about 20 seconds for my project.
AFAIK, Hot deployment is not supported as of now.
I was using the netbeans plugin, and once I moved over to using the Eclipse plugin, I no longer had to restart the server every change.

Categories

Resources