Teiid Spring Boot - Configuring Multiple Data Sources - spring-boot

I started with Teiid Spring Boot simple example from the following url:
https://github.com/teiid/teiid-spring-boot/blob/master/docs/UserGuide.adoc
It uses two different data source to demonstrate Teiid Spring Boot's capability to interact and fetch data from multiple data sources. However, when I deployed my Teiid Spring Boot component it threw exceptions related to entityManagerFactory.
One of the sites that I came across related to Spring Boot says that in order to define and use multiple data sources I need to assign one as Primary and others as Secondary Data Source, as provide on this page:
https://springframework.guru/how-to-configure-multiple-data-sources-in-a-spring-boot-application/
Can someone please confirm if my understanding is correct? If i am required to define Primary and Secondary Data Source?
I am using Spring Boot 2.2.4 and Teiid 1.3.0
Thank you!
Purnima Das

Have you seen this working example here with a single database? https://github.com/teiid/teiid-spring-boot/tree/master/samples/rdbms Teiid 1.3.0 This can be easily extended to have two databases. It only works with Spring Boot 2.1.6.RELEASE right now. No need to define the primary and secondary with this framework. Follow the example.

Related

Access Amazon QLDB in Spring boot application

is there a way to access Amazon QLDB as a repository in spring boot applications like MongoDB?
There isn't a library yet that integrates QLDB with spring boot.
I started to look at building exactly what you suggest, I even contacted the lead of spring data to look at adding this (I haven’t raised the ticket yet), however the CrudRepository interface provided enough integration for the demo applications that we have built with Spring Boot. One of the issues that i had when trying to create the Repository was the mapping of fields from the java objects into the partiql fields without explicit knowledge of what was changing.
QLDB does not have a jdbc driver anymore so it is now a proprietary driver which also uses partiql over sql, there could be some further issues getting this to work as a full blown repository in spring boot due to the inner reliance on sql in spring data .

Spring Boot with JDO

Do we have any support for JDO in Spring Boot Release Train? I couldn't find any recent relevant material.
I am looking for OSS options that can help in creating Spring Boot applications, portable to different sort of DB Engines (RDBMS to NoSQL or vice-versa), with minimal code change, assuming no change in DB model.
DataNucleus is an open source persistence provider fully compatible with JDO/JPA APIs. You can check how to integrate it with Spring Boot in sample code here.

custom update and delete queries in spring boot for postgresql

hi I am trying to update and delete the data in my application in spring boot and I came to know that postgresql is quite different from normal SQL can you provide the correct syntax for the update and delete operations in postgresql for spring boot application please I couldn't find it in internet.
If you use Spring Boot you actually could use Spring Data for creating queries and you'll not need to write queries by yourself.

Developing a simple CRUD App with Spring Boot and an existing Database

Is there a way to create a simple CRUD App using Spring Boot and an Existing Database?
You could look at Spring Roo. Its entire purpose is to allow rapid application generation. There is also support for reverse engineering an app from an existing database.
Version 2 will apparently also support Spring Boot, but I don't know if database reverse engineering already made it into v2. You could always try generating your application and adding Spring Boot later on.
I haven't much used it myself so unfortunately I can't offer you much guidance on its actual use - but you should be able to find some tutorials on Google, and StackOverflow contains several questions and answers on Spring Roo as well.

Creation of Data source and JNDI, communication in spring MVC application using annotation

I am creating a demo application using Spring mvc 3.0.Now i wants to connect the my application to the data base using "JNDI" and annotations. I am searching on the web,but
not find any good example.
Hopefully somebody could give me a good link where I could learn step by step for the annotation driven spring mvc application that communicate with the db layer with the help of annotation and JNDI.
what you need is
<jee:jndi-lookup/>
check this link http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/html/xsd-config.html#xsd-config-body-schemas-jee-jndi-lookup for info on using JNDI lookup . Remaining configurations are similar to app without JNDI .
Check a sample here

Resources