To set up the database connection that is to connect to a Load Balance database.
The steps are slightly different.
Agenda:
1. Creating JPA project and generating entities.
2. Configuring persistence properties and JPA project
3. Testing the JPA project
4. Update database when entity changed.
5. Setting up load balance database connection.
6. Setting Cache Coordination in Eclipselink
1. Creating JPA project and generating entities.
2. Configuring persistence properties and JPA project
3. Testing the JPA project
4. Update database when entity changed.
5. Setting up load balance database connection.
6. Setting Cache Coordination in Eclipselink
Steps:
1. R-click > New, to add a new database connection.
3. Choose database driver --> Other Driver
4. Fill in connection details.
The jdbc url for load balance Oracle database is like following.
jdbc:oracle:thin:@(DESCRIPTION=(LOAD_BALANCE=on)(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.5)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.6)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=myServiceName)))
5. Review configuration summary > Finish.
Done!!
No comments:
Post a Comment