how to replace library in shared/lib tomcat without restart the server? - java

I am trying to do a project with micro-webservices with spring boot and tomcat. My idea is pull apart each one services in different projects.
However there are shared services. For this I thought of creating the shared services like web services, however the final system increases the latency, for this reason I think doing it like library .jar and share the folder in tomcat with shared/lib and change the conf/catalina.properties file like here with:
shared.loader=${catalina.home}/shared/lib,${catalina.home}/shared/lib/*.jar
The problem occurs when I replace the library .jar for a newer version, I have to restart the server tomcat and all web services within, this is not ok.
Could someone tell me other option to do it?
Regards.

Related

Best place to store driver JAR's on .jsp application hosted on Tomcat

I've been quizzing my mentor, but he isn't sure on the answer.
I'm building a JSP based application to be hosted on a tomcat server. It connects to several different types of SQL database. Where is the best place to store the drivers? We can't decide between adding to a lib folder in the application, or whether to add them to the lib folder of tomcat.
I'm using Eclipse to build the application and setting the buildpath for the app, rather than setting the classpath of the machine.
Thanks.
Db drivers normally go in the Container lib folder as different apps might use the same driver. Just to give you an idea an Application Server like JBoss provides drivers and libraries to connect to databases and other resources.
Another advantage it makes your WAR file a bit smaller.

How can I patch/copy java classes to local WebSphere server?

I am using WebSphere 8.5 for an Java/J2EE application development. Every time when I update java classes, I need to go through the process of building the EAR project, then updating the EAR filing through WebSphere console to deploy the changes. Is there an simple and quick process to patch/copy the java classes to WebSphere?
I have done it when I was developing application in Tomcat, I will just set build automatically in my IDE(eclipse) and it does the work.
You can deploy individual class files if you want to. Either officially, through the web console, or unofficially on the filesystem.
See what's the difference between folders 'installedApps' and 'applications' in websphere application server?
But I don't think this is what you're really seeking.
I don't know of any way to automatically update classes from an IDE to a remote WebSphere instance. I've only done so to a local WebSphere instance I run from within Rational Application Developer (IBM's branded Eclipse).

How To deploy Dropwizard Web Services in Tomcat Server

I am facing a problem to deploy drop wizard services in tomcat server,
I have created my web services in drop wizard framework which use jetty server in default, but here I want to deploy my web services in tomcat server so is there any way that how to deploy Drop wizard created services in tomcat environment.
Because drpo wizard use .jar file instead of .war file so is there any way to convert .jar to .war for deploying it in another server.
Please give your valuable answer I am facing these problem.
As the below link points out, its not overly recommended as a pattern but if you use:
https://github.com/twilio/wiztowar
You can convert your jar to a war for deployment to an application server. Comes with the fairly big warning attached that its not overly tested.
It might be the time to look at why you are using drop wizard if you plan to deploy to a tomcat app server. It goes against the core principals of the framework to a degree.
Spring boot is another option which can embed jetty or tomcat or produce a standard war.

Is it possible to create JAX-WS Service in JAR and not in WAR?

I'm new to Java so I may be misunderstanding some of nouns - I hope I'll get it right.
We are creating an extension to a third party software which loads our JAR dynamically. As part of the implementation, the extension should have a service endpoint (I think servlet is right noun) waiting for requests from my company's backend servers.
The entire solution should run on Websphere (probably 7.0).
I'm looking for a way to open a service endpoint without creating a WAR file. The reason I don't want the WAR is because our JAR is loaded dynamically and I'm not convinced that the third party system will be able to load the WAR.
In addition, I afraid that by creating a WAR I'll basically create a new application which will not have access to the objects allocated in the host process of our extension.
Is that doable?
Thanks,
Nadav
Yes you can, just use Enpoint.publish() method comes with JDK itself.
Please look at the link
Publishing a WS with Jax-WS Endpoint

How can i change deployed application to webserver from application server?

I am having a web application which is deployed in oracle weblogic application server. After getting analysed, i found that there is no need for application server(atleast for this application), i am in need to deploy this application into the oracle weblogic web server.
can anyone help on this, how can i change deployed application to webserver from application server ?
Or in a different words, i can say how can i migrate my application deployment from oracle weblogic application server to oracle weblogic web server ?
I am using weblogic 10. and Maven to build the application
About the application, it is using Apache axis, webservices, jsf, and few java classes.
Thanks in advance!
I've recently migrated one application from WAS to tomcat
The approach i followd is.
Identify and remove all the WL specific dependencies / jars (that you may not need of)
Change the build script to generate .war instead of .ear
deploy the generated .war to any servlet container/ webserver
with your specs (axis,ws,jsf) you dont need a .ear but .war will do.
if you are using ant modify your build script, i'd suggest go for maven for better dependency management
building of top of the answer by #TechExchange
even for Jboss, you still need to analyze the application to remove all WL specifics.
Ex: Descriptors for EJB's MDB's and so on.
with JBOSS you can still use the ear format.
A quesiton, you had mentioned that because you found that the application doesn't need a app server you decided to migrate it to web server, now with JMS in the picture do you still need to move?

Categories

Resources