Reputation: 21
Hello all,
I am trying to figure out how to move my current system architecture based on modules (war´s) running in Wildfly. Nowadays all infra resources are placed in JNDI tree, such as Datasources, JMS, etc... The framework for my projects is Spring 4 and family, which allows me to lookup those resources and other things.
My goal is to create a micro-service architecture using Spring-Boot and Spring Cloud Netflix, where each one of those WAR´s would be a new independent application integrated by Bus service.
But my doubt is, how to share those Jndi Datasources with all single Spring Boot applications, keeping in mind it´s not nice to have to setup user/password for each application / datasource in each application.properties.
Is there any way to have a master Spring Boot managing all sub-projects, because the great advantage is to have a application running in one port and other one running in another one, so if any problem happens for example Wildfly wouldn't stop all of them, for what now happens in my current architecture.
(Spring Boot) + (Spring Cloud) + (single jndi tree for all projects) + (independent modules between themselves)
Let me know your thoughts!
Thanks...
Upvotes: 0
Views: 1092
Reputation: 44565
Spring Cloud has a module called Spring Cloud Config, which is for exactly that purpose. The configuration server allows you to centrally define your configuration, and each micro service automatically fetches this configuration (and refreshes it, if necessary). Regarding the single JNDI tree, i think, this contradicts the architecture of micro services a bit. Since every micro service has its own database, you only would configure one datasource per micro service, so configuring it in the application.properties or with the config server hasn't that much overhead.
Upvotes: 3