I am using Spring boot 1.2.3 with embedded tomcat 8.0.20.
In regular tomcat we can configure transaction manager in context.
Example:
<Transaction factory="com.atomikos.icatch.jta.UserTransactionFactory"/>
Is there any way that I can register T/X manager in Spring boot embedded tomcat?
Check out http://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-jta.html for how to enable atomicos transaction manager with spring boot.
Related
We have a Spring Boot application that we need to deploy to a JBOSS server. We have a requirement to keep all configuration in the JBOSS standalone.xml file. I need to get SSL set up on the Spring Boot application, but every guide I find shows how to add it to application.properties. How can I tell the Spring Boot application to use the SSL configuration from the JBOSS standalone.xml file?
a- Tomcat has it's own DI container for Servlets (which are beans).
b- Spring has it's own bean container (IoC).
When we start spring boot with embedded tomcat, then we have two application-context on runtime?
How can we print/list all application-contexts on a spring application?
I don't think CDI (Contexts and Dependency Injection) feature is provided by Tomcat (but it is in TomEE). There is only one context running, the Spring context.
How to check what is the connection pool being used by default. I am using Spring boot version 1.5.4.RELEASE
UPDATE : https://www.mkyong.com/spring-boot/spring-boot-how-to-know-which-connection-pool-is-used/
Spring Boot uses HikariCP as the default connection pool, due to its remarkable performance and enterprise-ready features.
Here’s how Spring Boot automatically configures a connection pool datasource:
Spring Boot will look for HikariCP on the classpath and use it by
default when present
If HikariCP is not found on the classpath, then Spring Boot will pick
up the Tomcat JDBC Connection Pool, if it’s available
If neither of these options is available, Spring Boot will choose
Apache Commons DBCP2, if that is available
Source: https://www.baeldung.com/spring-boot-tomcat-connection-pool
I would like to ask how to refresh spring boot configuration info with using spring cloud config. Would you please give me some advice? Many thanks.
If your spring boot application is a client of Spring Cloud Configuration Server and use itself as single point of truth in the application configuration let's say retrieve application.properties/yml from the config server, you can benefit of #RefreshScope. in this case if you do a post to the /refresh if you use spring boot 1.x or /actuator/refresh if you use spring boot 2.x all the bean that are have are annotated as #RefreshScope will be refreshed.
What is the difference between Spring's Spring boot package and Liberty profile Spring Boot package(net.wasdev.wlp.starters.springbootweb)?
Did we get any advantage when we use net.wasdev.wlp.starters.springbootweb package with Liberty profile?
Why IBM specific Spring Boot package and what's its significance compare to conventional Spring Boot package?
net.wasdev.wlp.starters.springbootweb is essentially a sample application that demonstrates using spring boot w/ Liberty. It's not an alternative to spring boot.