|
1 | 1 | /*
|
2 |
| - * Copyright (c) 2011, 2019 Oracle and/or its affiliates. All rights reserved. |
| 2 | + * Copyright (c) 2011, 2025 Oracle and/or its affiliates. All rights reserved. |
3 | 3 | *
|
4 | 4 | * This program and the accompanying materials are made available under the
|
5 | 5 | * terms of the Eclipse Public License v. 2.0 which is available at
|
@@ -95,7 +95,7 @@ public void register(Session session) {
|
95 | 95 | Accessor accessor = databaseSession.getAccessor();
|
96 | 96 | accessor.incrementCallCount(databaseSession);
|
97 | 97 | try {
|
98 |
| - OracleConnection connection = (OracleConnection)databaseSession.getServerPlatform().unwrapConnection(accessor.getConnection()); |
| 98 | + OracleConnection connection = databaseSession.getServerPlatform().unwrapConnection(accessor.getConnection()).unwrap(OracleConnection.class); |
99 | 99 | databaseSession.log(SessionLog.FINEST, SessionLog.CONNECTION, "dcn_registering");
|
100 | 100 | Properties properties = new Properties();
|
101 | 101 | properties.setProperty(OracleConnection.DCN_NOTIFY_ROWIDS, "true");
|
@@ -149,6 +149,8 @@ public void onDatabaseChangeNotification(DatabaseChangeEvent changeEvent) {
|
149 | 149 | } catch (SQLException exception) {
|
150 | 150 | throw DatabaseException.sqlException(exception, databaseSession.getAccessor(), databaseSession, false);
|
151 | 151 | }
|
| 152 | + } catch (SQLException e) { |
| 153 | + throw DatabaseException.sqlException(e, databaseSession.getAccessor(), databaseSession, false); |
152 | 154 | } finally {
|
153 | 155 | accessor.decrementCallCount();
|
154 | 156 | }
|
|
0 commit comments