You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(Some might be rewritten to call `executeServicesOperation` instead.)
35
+
(Some can be rewritten to call `executeServicesOperation` instead.)
36
36
37
37
== Decision
38
38
@@ -53,16 +53,18 @@ Initially, we'll only add one accessor:
53
53
`String operation()`:::
54
54
The operation name.
55
55
56
+
The use of the `ServiceRequestContext` object instead of passing the operation name directly allows for future extension without changing the method signature.
57
+
56
58
`ServiceManager` receives a property for the `ServiceRequestCustomizer`, and implementations call the customizer before starting the service action.
57
59
Implementations that previously did not call `executeServicesOperation` are either rewritten to call it, or are changed to call the customizer themselves.
58
60
59
61
The operation name is generally the name of the API method initiating the operation.
60
-
For example, it reports the method name of the caller of `executeServicesOperation`.
61
-
Bar bugs, like deeper callstacks than assumed, the operation names are stable as these are the methods defined in the API of the various service manager interfaces.
62
+
For example, it reports the entry point method name into the service manager (i.e. the first method called on the service manager by user code).
63
+
For example, calling `BackupManager.backupDatabase()` or `backupDatabase(int)` reports `backupDatabase`, while calling `backupMetadata()` reports operation `backupMetadata` (even though that method calls `backupDatabase(int)`).
62
64
63
-
Alternatively, a customizer can look at the first argument in the service request buffer (the action), or use solutions like `java.lang.StackWalker` to look at the callstack.
65
+
Bar bugs, the operation names are stable as these are the methods defined in the API of the various service manager interfaces.
64
66
65
-
The use of the `ServiceRequestContext` object instead of passing the operation name directly allows for future extension without changing the method signature.
67
+
Alternatively, a customizer can look at the first argument in the service request buffer (the action), or use solutions like `java.lang.StackWalker` to look at the callstack.
66
68
67
69
For example, the gbak `-INCLUDE_DATA` support added to Jaybird 7 by https://github.com/FirebirdSQL/jaybird/issues/944[#944] can also be realized with:
(Above example is tentative, and might differ from actual implementation.)
82
-
83
83
== Consequences
84
84
85
-
The addition of `ServiceRequestCustomizer` will provide users with an escape hatch for missing features.
85
+
The addition of `ServiceRequestCustomizer` provides users with an escape hatch for missing features.
86
86
As we consider this a feature of last resort, it is only documented in the API docs, and receives minimal coverage in the release notes.
87
87
It will not be documented in the Jaybird manual.
88
88
This decision may be revisited in the future.
89
89
90
90
The customizer gives full control over the service request buffer.
91
-
This means that users can change the action performed or make other additions or changes that can can result in errors from the server if wrong information is put in the request buffer.
91
+
This means that users can also change the action performed or make other additions or changes.
92
+
This can can result in errors from the server if wrong information is put in the request buffer.
92
93
Jaybird may also produce errors if the changes result in different service output than expected by the implementation in Jaybird.
93
94
94
95
Providing this customization feature may result in users implementing their own workarounds, and never reporting an improvement request.
0 commit comments