Spring boot and Tomcat : Is it better to use embeded Tomcat or external Tomcat installation. - spring

I was wondering if some experienced spring boot users can tell us how to choose between embedded Tomcat and external Tomcat installation.
Thanks in advance.

Embedded Tomcat helps you to define Standalone application. Earlier we have to deploy war to Tomcat Server which itself a tedious task. From the embedded tomcat you can run application as service without worrying about the deployment thing. As now days microservices are being popular, spring boot is more popular because of its feature one of them is embedded servers like Tomcat,Jetty or Netty.

Related

Spring boot webservice to start and be discoverable when JBOSS EAP starts

We need to create independent spring boot web services for our apps which runs in JBOSS EAP. Can we do the below if its possible.
Spring Boot is typically deployed as a runnable jar but our apps are EAR deployed. Can we bootstrap / launch the spring boot listener / controller when the EAR application starts)
Can we register the services on start to facilitate automated discoverability of services (typically done with consul/ etcd/ zookeeper etc)
You can generate a WAR instead of a JAR and deploy this. If this is not ok you can put the WAR in an EAR
Read the docs: https://docs.spring.io/spring-boot/docs/current/reference/html/howto-traditional-deployment.html
Yes. If you have a service registry in place you can use this with Spring Cloud.
Please read the documentation:
https://spring.io/guides/gs/service-registration-and-discovery/

Deploy Apache Camel on(with or without spring boot) on wildfly server

We have use case where we need to develop integration on Apache camel.
However, from deployment point of view we have Wildly server where so far we have deployed varous Java spring boot Microservices.
Also, wehave another environment where these Java spring boot service are deployed on Openshift inside JBoss EAP conatiner.
Now, quuestion is how can I deploy apache camel routes/jar in similar way on Wild fly or Joss.
Few options , I can think of but not sure hows it possible.Need technical guidance.
Options
1. Create camel jar and deploy on Widlfly- I dont know how it works.
2. Create apache camel integration using spring boot . As per documentation ,it will work . my question in how it will be deployed on widlfly or open shift.
Also, can I use spring DSL in that?

Spring webflux on tomcat

I just created a new application using Spring boot 2 M7 and I'm using spring-webflux.
I built the application as an autoexecutable war that I can start in dev with java -jar app.war and also on a standalone tomcat server for UAT purpose.
In the web reactive reference doc, I read
To deploy as a WAR to a Servlet 3.1+ container, wrap HttpHandler with ServletHttpHandlerAdapter and register that as a Servlet. This can be automated through the use of AbstractReactiveWebInitializer.
Baeldung site also wrote about it and they describe a procedure to register a servlet that wrap the router for a standalone environment.
Using Spring boot tomcat starter, I didn't need to do anything : no code about booting the server necessary ; the app starts using the embedded server. In debug I saw NIO access so all seems fine.
I didn't try yet but what will happen on a standalone tomcat using Spring boot tomcat starter and webflux starter ? Is spring boot take care of everything (embbeded and standalone tomcat) ? how does it work ?

Running multiple spring boot web app on tomcat

I am trying to deploy multiple spring boot web app on tomcat. All have the same application.properties.How can I split the configuration files for different app running on tomcat.
Spring Boot doesn't require an external Tomcat, because it contains its own embedded Tomcat. So you can run all of your application in it's own Tomcat on the same machine. All you have to do is to define different ports for your applications via server.port property.

Embedding OSGi on Weblogic Server 10.3.3

I am new to OSGi, and trying to configure Equinox/Felix on Weblogic Server. But nowhere can I find any information of any OSGi container embedded in Weblogic Server. So my questions are-
1. Has anyone configured Equinox or Felix with Weblogic Server? Is it supported?
2. SpringDM supports tomcat and jetty, does it support Weblogic too?
3. Can I deploy a Spring MVC application as a bundle without using SpringDM? OSGi container could be Felix/Equinox; and app server is Weblogic 10.3.3
Appreciate any help/samples/references to understand OSGi support in Weblogic.
Thanks in advance
-dee
please have a look to this question I've raised several months ago: WebLogic and OSGi. I also updated the question. Since version 12.1.2, Weblogic supports OSGi out of the box.

Resources