The project based on the jetty at startup must display the application version in console. Is desired to show version data just after jetty says he started. However, the app architecture does not allow to do so directly from my code.
Perhaps this can be done using configuration files?
Editing1:
Project starts as jetty server from compiled with maven war file and on momet of start I have no access to pom.xml. Also, after start no java methods are calling. Jetty server waits while somebody connect to it via browser or rest api (not sure how it works). Only after a user request my code will be called.
So, I need to show version of my project just after jetty server run with my compiled war file. How can I do it?
Related
I have to deploy an EAR archive corresponding to a Java EE application in a client's WebLogic server. I have full access to Enterprise Manager but I'm not allowed to deploy through it—instead, I need to invoke a web service that triggers a home-brew shell script. I can see its source code: it first attempts to undeploy the app and (no matter the result) then attempts to deploy the uploaded EAR; each task call a Python script and that's where I lose track. I believe actual work is eventually done by Java libraries from WebLogic Scripting Tool.
The problem is that I'm not getting any error code or message but the application stubbornly remains in its previous release. I'm positively sure there's nothing wrong with the EAR. I've recompiled everything several times and it deploys successfully to the staging server (where I do use EM).
Is there any log file to be found either in Enterprise Manager or Administration Console?
I have a spring boot application that running on embedded tomcat with java -jar app.jar on a server away from my work office, and I haven't any ssh or other access to that server.
So when I want to install and run newer version of application, I should go to the server place, physically connect to server and then install and run newer version.
Is there a way to run newer version of application without going to the server place? for example, upload newer jar file into my running application, and itself update it.
NOTE
I don't have any access to server and cannot use and run any continous delivery tools like jenkins or other, because of IP and port restrictions.
I did something like this a while back which worked out pretty well.
So you could create a super small app on the server(so small that it "never" needs to be updated) and have that monitor the versions and when a new version is available it could stop the real process and restart it with the new jar file.
I unfortunately don't have the code for that starter app, but it shouldn't take that long to write one that suits your needs
Why don't you install a Tomcat to the server and use it's management GUI to deploy the newer version of the app? It is a very old fashion but works well.
The only thing you will need to modify in your source code is to replace the packaging from jar to war in the pom.xml, so you can deploy it via Tomcat Manager.
This how the manager GUI looks like:
You can learn more about the Tomcat Manager here.
I have an Eclipse plugin that my company uses to analyze some data files. I've been tasked with writing a REST application that will take uploaded data files and use this plugin to generate some output and return it to the client.
Currently, my application listens for incoming requests and launches Eclipse in Headless Mode to startup this plugin (e.g. ./eclipse -application "xyz" ...) .
The trouble is, Eclipse is fairly slow to start and each request received launches a new instance of Eclipse.
Ideally, I want only one instance of Eclipse running all the time and an HTTP listener that can request this plugin to run.
I looked into something like Jetty, but my understanding is that Jetty needs to be embedded in the plugin code to setup a listener. Unfortunately, I don't have access to the plugin's source code.
Is this possible? Which tools would you use?
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.
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).