Hi Team,
We have a requirement to support read-write database splitting for performance optimization.
Current Setup
At the Tomcat level, we have configured two JNDI DataSources in context.xml:
jdbc.<DB> → Primary database (read/write)
jdbc.readonly.<DB> → Read-only replica database
Requirement
We want to achieve the following behavior:
All read operations (fetch/search) should use the read-only DataSource
All write operations (add/update/remove) should use the primary DataSource
Questions
We would like guidance on the recommended approach within SmartGWT:
Is it possible to configure this routing directly at the DataSource (.ds.xml) level (e.g., per operationBinding)?
Can DSRequest / server-side request handling be used to dynamically switch the DataSource?
Or is the recommended approach to handle this entirely in the server-side DMI layer by explicitly choosing the appropriate JNDI DataSource?
Are there any SmartGWT-supported patterns or best practices for this use case?
Looking forward to your guidance.
We have a requirement to support read-write database splitting for performance optimization.
Current Setup
At the Tomcat level, we have configured two JNDI DataSources in context.xml:
jdbc.<DB> → Primary database (read/write)
jdbc.readonly.<DB> → Read-only replica database
Requirement
We want to achieve the following behavior:
All read operations (fetch/search) should use the read-only DataSource
All write operations (add/update/remove) should use the primary DataSource
Questions
We would like guidance on the recommended approach within SmartGWT:
Is it possible to configure this routing directly at the DataSource (.ds.xml) level (e.g., per operationBinding)?
Can DSRequest / server-side request handling be used to dynamically switch the DataSource?
Or is the recommended approach to handle this entirely in the server-side DMI layer by explicitly choosing the appropriate JNDI DataSource?
Are there any SmartGWT-supported patterns or best practices for this use case?
Looking forward to your guidance.