-
Notifications
You must be signed in to change notification settings - Fork 841
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add spring sharding demo #308
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good for most of it, please check the couple of comments I've left in the files.
How will a user ever uninstall these samples? There is a tablespace being created, etc. Do we expect users just to destroy the entire sharded database environment after they run these sample applications or is there a need for an uninstall script that can be run that will clean up the environment?
...g/JDBCTemplate/src/main/java/com/oracle/jdbc/samples/springsharding/ShardingApplication.java
Outdated
Show resolved
Hide resolved
.../main/java/com/oracle/jdbc/samples/springsharding/configuration/CatalogDataSourceConfig.java
Outdated
Show resolved
Hide resolved
...n/java/com/oracle/jdbc/samples/springsharding/configuration/DirectShardDataSourceConfig.java
Outdated
Show resolved
Hide resolved
.../main/java/com/oracle/jdbc/samples/springsharding/configuration/CatalogDataSourceConfig.java
Outdated
Show resolved
Hide resolved
...ngSharding/JPA/src/main/java/com/oracle/jdbc/samples/springsharding/service/UserService.java
Outdated
Show resolved
Hide resolved
.../src/main/java/com/oracle/jdbc/samples/springsharding/service/UserServiceImplementation.java
Outdated
Show resolved
Hide resolved
java/jdbc/SpringSharding/JPA/src/main/resources/application.properties
Outdated
Show resolved
Hide resolved
to learn how to set up and deploy an Oracle sharded database. | ||
You can also refer to [Oracle Database Operator](https://github.com/oracle/oracle-database-operator) that makes deploying a sharded database on a Kubernetes Cluster an easy process. | ||
|
||
After your sharded database is set, run the following SQL script on the shard catalog to create your tables. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As what database user are you supposed to run this script? There is no indication of that. Is it SYSTEM
or the shard director user, or the catalog user, or are these all the same the user? It would probably help the user to be more specific on how to execute these DDLs and what user(s) to use in the properties.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After your sharded database is set, connect to the shard catalog as sysdba and create the demo application schema user.
@gvenzl this is what was added to address you comment:
|
* Add spring sharding demo * Update database setup instructions * Replace 2023 with 2024 in copyright header --------- Co-authored-by: Gerald Venzl <[email protected]>
Adding a demo application demonstrating the use of the latest sharding feature in Spring Framework with the Oracle Database.
There are two versions one that uses JPA to access data in the database, and a second one that uses JdbcTemplate