Package sk.iway.iwcm.rag.vectorjpa
Class VectorJpaConfig
java.lang.Object
sk.iway.iwcm.rag.vectorjpa.VectorJpaConfig
@EnableTransactionManagement
@EnableJpaRepositories(entityManagerFactoryRef="ragEntityManager",
transactionManagerRef="ragTransactionManager",
basePackages="sk.iway.iwcm.rag.vectorjpa")
public class VectorJpaConfig
extends Object
JPA configuration for RAG entities.
Uses an explicitly configured
rag_jpa datasource or the primary datasource.
The vector backend and JPA dialect are detected from JDBC metadata.
Registered only by VectorSpringConfig in its isolated persistence context;
deliberately has no component stereotype to avoid discovery by the main application.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.orm.jpa.LocalContainerEntityManagerFactoryBeanCreate the JPA EntityManagerFactory for RAG entities.static StringReturns the datasource name for supported RAG vector operations.static booleanCheck if a supported and enabled RAG vector store is available.org.springframework.transaction.PlatformTransactionManagertransactionManager(jakarta.persistence.EntityManagerFactory entityManagerFactory) Create the JPA transaction manager for RAG entities.
-
Constructor Details
-
VectorJpaConfig
public VectorJpaConfig()
-
-
Method Details
-
transactionManager
@Bean("ragTransactionManager") public org.springframework.transaction.PlatformTransactionManager transactionManager(@Qualifier("ragEntityManager") jakarta.persistence.EntityManagerFactory entityManagerFactory) Create the JPA transaction manager for RAG entities. -
entityManagerFactory
@Bean("ragEntityManager") public org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean entityManagerFactory()Create the JPA EntityManagerFactory for RAG entities. Uses the RAG datasource selected byVectorStoreDataSourceResolver. -
getRagDataSourceName
Returns the datasource name for supported RAG vector operations.- Returns:
- datasource name, or
nullwhen the selected datasource is unsupported
-
isRagAvailable
public static boolean isRagAvailable()Check if a supported and enabled RAG vector store is available.
-