I need to undeploy a library deployed on my weblogic domain but first I should undeploy all deployed applications reference to this library. this is very hard to do even in the script it will take a lot of time
do you have any way to undeploy the library without affecting any dependent application
I found this post WebLogic Application redeployment using shared libraries - without downtime which may save some time than redeploying all referencing applications, though it's not the direct answer to this question.
Related
I have 5 Spring Boot web applications but have only one Server (low-end).
What is the best way to deploy all 5 in one Server? Having only one web container (Tomcat) and deploy all of them as separate war files on the same Tomcat or run all 5 on different Tomcat containers (Spring Boot default behavior)?
What is your recommendation by considering performance and maintenanability?
IMHO, if you're running a resource-constrained server, your best bet is to deploy all of your applications as war files under a single tomcat instance. Running multiple servers would just add un-needed overhead.
If you have little resources on your server, you don't have much choice. Each Java virtual machine has a significant overhead, so running separate containers will make you reach the limits of your low-end server earlier.
You will have to deploy your wars in the same tomcat server, with different servlet contexts.
However, if you have sufficient RAM, the cleanest way in my opinion is creating docker images and running the standalone spring-boot jars in each container.
My recommendations are:
If these WARs are independent of each other, deploy them in a different Web server, not only Tomcat or whatever container you're using, but also in either different virtual server, dedicated server or Cloud instances.
Deploying in different "virtual server" you can scale horizontally, so this is good for future workloads.
Deploy a load balancer from your hosting provider, or you can use Nginx for doing that.
Hope this helps!
From my experience, using container such as docker is the easiest way to maintenance multiple spring-boot applications. When you have a new server, it can be migrated easily, and the application can be updated without interrupting other applications. But you may need to spend extra time to learn how to use the container.
If using Tomcat, it is recommended to separate the tomcat instances. One tomcat for each WAR file. Putting multiple WAR files in one tomcat can make the maintenance difficult. Tomcat hot deployment / auto deploy tends to have some errors which require you to restart the whole tomcat
What are the major differences between a web application deployed as a JAR versus it deployed on an application server as a WAR?
My case is that, I have developed a REST service using Spring Boot and that is packaged as a JAR file. The service may have to handle 500-1000 requests at the same time and I'm working on improving the performance of the service.
From a performance perspective, is it better to install an application server and deploy the application as a WAR rather than just execute the JAR as a standalone process?
Would the application server like Tomcat give more control related to number of configurable threads as compared to its JAR counterpart?
The question is a bit incorrect, as JAR and WAR are simply a packaging format.
SpringBoot uses Tomcat as an embedded server by default, so there won't be a difference between running Tomcat as application server and deploying your application as WAR, or simply running a JAR.
What really matters is your code. If you plan to serve 1000rps, I would highly advice looking at Spring Reactor (as you already use Spring) or Vert.x, to provide as much concurrency as possible.
Not sure if it is this is exactly what you are looking for.
But this link will definitely add a point to the discussion-
https://dzone.com/articles/standalone-web-application
They are all ZIP format files, not any differents, just the ext string.
Why do we use external tomcat server while working in the industry though there is support for the server in the Eclipse?
Previously I was using the server integrated with the eclipse itself. But now as a part of the industry I've started using the external tomcat server.
The reason we use external server during development is that the server integrated with Eclipse works most of the time but not all of the time. This you will notice when there are multiple number of web application being deployed as part of the development in your Eclipse and you start and stop Tomcat a number of times to refresh web applications in rapid succession. The problems that can happen are:
1) Source/WAR files updated but deployed application does not update
2) Tomcat throws exception during start within Eclipse
3) A web context becomes unavailable from within eclipse
all the above are not limitations of either eclipse or tomcat, since we change the deployables in rapid succession, sometimes the WAR files get corrupted while exporting or old remnants of previously deployed files remain within tomcat work/localhost directory.
In general this kind of errors become difficult to determine. the best way to avoid them is to have a separate tomcat and export the WAR to the webapp directory, even then it is good to clear the work/localhost directory from time to time.
If I were to deploy an application on Tomcat vs. Websphere, what are things that I need to consider?
Do I have to develop my Java code differently if developing in one app server vs another?
Edit:
I will be funneling people from a website into a web app that does credit card processing and e-signatures (cc processing and e-sigs are through separate services). That is its sole job
You cannot use EJBs on Tomcat (unless you add OpenEJB). If your WebSphere deployment uses EJBs, you'll have to remove them to deploy on Tomcat.
If you use any Java EE features beyond servlet/JSP engine and JNDI naming service you'll have to eliminate them from your app.
Tomcat accepts WAR packages. If you package your app into an EAR on WebSphere, you'll have to change it to WAR for Tomcat.
Both use JNDI for data sources. There might be some nagging differences in naming conventions, but if you stick to the standard they should be portable.
If you use any WebSphere specific code in your app, you'll have to remove it to deploy on Tomcat.
If your app is servlets, JSPs, and JDBC you can deploy on either one without any problems.
You can think as Tomcat as a subset of Websphere, so theoretically everything that works on Tomcat will work in Websphere.
But...Deploying in Websphere, in my humble opinion, is a terrible pain, while deploying in Tomcat just works. (And if fails, just delete temporary folders)
Without knowing the technologies you are using, that's all I can say.
Depends, what are you trying to deploy?
Tomcat isn't a full EE server--are you trying to deploy an EE app?
If you're just deploying a web app, it's more important to consider which version of the servlet spec/etc. each server implements.
i have a jboss 5.1.0 AS and ejb 3.0 bean.
the problem is when i redeploy(hot) the bean to the server using ant build file, no changes are made. i have to restart the server each time i redeploy the bean. the operating system is ubuntu 9.04.
i've already done the following:
1) checked whether the bean jar file is built correctly.
2) checked the roles(i thought about some access issues).
3) checked everywhere for some kind of cache.
but still i have no luck.
any help would be appreciated.
Where do you copy your EAR? You should copy it to deploy directory. In this case JBoss usually knows to re-deploy the application. Usually but not always.
So, try to do the following. First, verify that you are really copying the EAR to deploy directory. Second, stop JBoss and cleanup work and tmp directories. Now start jboss, wait a couple of minutes and copy the EAR to deploy directory. I hope it will work.
Note that JBoss is not able to redeploy application many times. According to my experience it works 5-10 times. Then you get OutOfMemoryError (PermGen). At this point you have to restart JBoss anyway.
Sounds like he's hot deploying an EJB jar somewhere, maybe to an exploded directory.
In my experience hot deploy is unreliable in the best of cases, leaves the server in an unstable state at worst (not just jBoss, it's pretty universal).
Best to do is shut down the server, deploy an ear as Alex states, and start the server again.
jBoss startup time is good, won't cost you more than a minute or so per iteration.