Skip to content
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

chore: update Hibernate sample code #368

Merged
merged 2 commits into from
Mar 17, 2023

Conversation

karenc-bq
Copy link
Contributor

Summary

Update Hibernate sample code to reflect changes in the wrapper source code.

Description

  • remove unnecessary exception classes
  • update exception handling
  • hibernate uses global transaction, which the wrapper does not support yet, so a transaction related failover exception will not be thrown in this sample code.

Additional Reviewers

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

<property name="hibernate.connection.driver_class" value="software.amazon.jdbc.Driver"/>
<property name="hibernate.connection.url" value="jdbc:aws-wrapper:postgresql://hostname.amazonaws.com/hibernate_orm_test"/>
<property name="hibernate.connection.url" value="jdbc:aws-wrapper:postgresql://database-pg.cluster-cwpu2jclcwdc.us-east-2.rds.amazonaws.com/hibernate_orm_test"/>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't forget to remove this :P

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😱 thank you

@karenc-bq karenc-bq force-pushed the update_hibernate_example branch from eba3bc0 to 015c86d Compare March 16, 2023 02:35
public static void main(String[] args) {
int i = 0;
try {
while (true) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need a condition to exit the loop. It could be a time (5 min?) or a number of iteration.

@karenc-bq karenc-bq force-pushed the update_hibernate_example branch from 5f31ce4 to d02e797 Compare March 17, 2023 00:39
@karenc-bq karenc-bq merged commit 510d10f into aws:main Mar 17, 2023
@karenc-bq karenc-bq deleted the update_hibernate_example branch March 17, 2023 23:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants