OSGi, Jetty - exposing the server to the outside - java

As a topic. I have the task to issue an OSGi, Jetty server on the outside. I have a host (Debian). I have read that this type of server best place with the help of Virgo.
Virgo Jetty server installed on Debian.
Just I do not know where I got there, throw your plug-in project to make it work.
Any suggestions? For all the answers, very thanks.

Take a look at the virgo user guide. Especially starting / stopping chapter and deploying artifacts.
Alternatively you might want to take a look at Apache Karaf. It is similar to virgo but works mainly using maven repostories. So you just build your OSGi application with maven and deploy it into karaf directly from maven. See karaf user guide and karaf tutorials.

Related

Is it possible to make a Spring MVC web app run as a "standalone executable" with Java and Tomcat embedded?

I have a web app built with Java, Spring MVC, and JDBC. The result is a WAR file.
To run it, the user has to install Java 8 JDK and Tomcat, and deploy the WAR file to the Tomcat server.
It would be great if they could just download the one file run it as a standalone application.
That is, run "the WAR file" and just browse to http://localhost:8080/myapp
Also, on Windows it would be great it was setup as a Server (like Tomcat is when installed with the installer).
Is there any way to do this? Maybe with Spring Boot or something new like that?
Yep, Spring boot is the way to go.
It allows you to build an executable Jar with all dependencies and a Tomcat (by default, can be changed) embedded.
But users will still need to download a JRE to execute the Jar, and a database if it's required, but you can use en embedded database like H2, HSQLDB..., depends what is your needs.
Yes . you can use spring boot to achieve your results. Kindly refer the below link for sample code
https://mkyong.com/spring-boot/spring-boot-hello-world-example-jsp/
You can use embedded jetty server using maven but that would require you to setup few things your app and may have align your existing app, please check this article for more information.
Jetty is similar to tomcat server in terms of running spring application, there are not much difference in terms of development. Tomcat is just more famous.
Other option as others said, is to migrate your app to spring boot which would be easy if you already have app written in spring (But that depends how much code you have and how much time you have)

Deploy Artifactory in existing Tomcat

I'd like to deploy the OSS version of artifactory in my existing Tomcat environment. My first try was to simply throw in the two wars that come with the bundled Tomcat. I had to copy over the derby jar, too, so that part seemed to work. I then got blocked by an issue with authentication tokens.
The manual I found is pretty outdated and talks about V2.x only. What I found here was this:
Deployment of my application in existing tomcat
Now - how official is this statement? I didn't find anything on their website saying that it's not supported anymore.
I'd need now
either a helpful resource (for me)
or a link to an official statement (for my management)
Thanks!
Well, I guess this qualifies as an official statement (at https://www.jfrog.com/confluence/display/RTF/Release+Notes#ReleaseNotes-Artifactory4.0)
Tomcat 8 as the Container
JFrog Artifactory 4.0 only supports Tomcat 8 as its container for both RPM and standalone versions. If you are currently using a different container (e.g. Websphere, Weblogic or JBoss), please refer to Upgrading When Using External Servlet Containers for instructions on how to migrate to Tomcat 8.

Overview of camel endpoints?

I have deployed my camel integration projects (WAR) on a JBoss Wildfly application server.
I was wondering if there is a way to see what endpoints are available and what the URL's are?
In a similiar way as i can log into the administration console under Wildfly and select web services to get an overview of what is deployed?
Thanks in advance for your help.
Yes, if you have JMX enabled on your camel context, then you can view a list of endpoints via jconsole, as you can see from:
JMX is on by default according to the camel site but if you've somehow disabled it, adding:
<jmxAgent id="agent" disabled="false"/>
to your <camelContext> element should be enough to re-enable it.
There is also hawtio which is a web console to manage Java stuff, and it has plugins for Apache Camel, JBoss, and others too.
You could then install hawtio in wildfly, and then see your Camel routes / endpoints and whatnot
http://hawt.io/

Deploying java application in jboss application server

I have a java application which I was running using tomcat server. Now I need to run the same application in jboss server.I am new to jboss, I tried deploying war file in jboss but not able to do so.
I don't know what changes needs to be done for application to run on jboss.
Any one please guide me.
Thank you.
An obvious answer would be Read The Friendly Manual.
You can configure JBoss to autodeploy files in the standalone/deployed/ directory for example, you can also use the maven-jboss7 plugin to handle deployment from maven.
I'm sure the jboss community forums have plenty of examples.

How do I push an update to a war file to clients?

Assuming my clients are running my J2EE WAR application on their intranet, and I have an update for them... how do I push the updated war file to them?
I'd like it to be automatic and require no human interaction on the client's side.
Can this be done?
Any help would be appreciated.
Tomcat (if this is your target container...) offers a manager interface that will allow you to deploy/start/stop applications.
I have used both ant and maven tasks to great effect in deploying wars remotely all while being built-in to the build process.
Depending on your deployment process, this may not work for you, but for dev & qa: highly recommended.
Edit: of course apache has to be configured for this type of access to be allowed.
See: Deployer how-to
Glassfish has documentation on deployment here.
Ant tasks are also available here.
Glassfish uses Tomcat internally, but the Tomcat Manager is not available as it is a separate application.
If the glassfish admin console can be accessed, it can be used to upload and deploy war files.
I'm not sure if you're comfortable giving them access to your source code repository...even in read-only mode.
If you are, then you could script up something in ANT to check out the latest version of the source code (using CVS task) and then build the .war file (using WAR task).
The only trick would be automatically deploying it once the war has been built. Tomcat will automatically deploy applications copied into a certain directory. For Websphere, see this question and this question.
For other J2EE servers I don't know how it would be done.

Categories

Resources