You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@seata.apache.org by "linghengqian (via GitHub)" <gi...@apache.org> on 2024/07/19 10:31:40 UTC
Re: [PR] feature: support `native-image` for `seata-client` [incubator-seata]
linghengqian commented on code in PR #5476:
URL: https://github.com/apache/incubator-seata/pull/5476#discussion_r1684183768
##########
config/seata-config-core/src/main/java/io/seata/config/ConfigurationCache.java:
##########
@@ -101,8 +100,8 @@ public void onChangeEvent(ConfigurationChangeEvent event) {
}
public Configuration proxy(Configuration originalConfiguration) throws Exception {
- return new ByteBuddy().subclass(Configuration.class).method(ElementMatchers.any())
- .intercept(InvocationHandlerAdapter.of((proxy, method, args) -> {
+ return (Configuration)Proxy.newProxyInstance(this.getClass().getClassLoader(), new Class[]{Configuration.class}
+ , (proxy, method, args) -> {
Review Comment:
> > * @funky-eyes
> > * As a solution to [No classes have been predefined during the image build to load from bytecodes at runtime raphw/byte-buddy#1588](https://github.com/raphw/byte-buddy/issues/1588) , can we port the handling of `ConfigurationCache.java` back to the 2.x branch?
> > * Reference https://github.com/apache/incubator-seata/blob/2.x/config/seata-config-core/src/main/java/org/apache/seata/config/ConfigurationCache.java .
>
> #6386 configurationcache will remove bytebuddy proxy in this pr
- @funky-eyes Late reply, I have verified that the relevant PR is enough to make the AT mode of Seata Client 2.1.0-SNAPSHOT work under GraalVM Native Image. I opened https://github.com/apache/incubator-seata/issues/6686 to ask for further comments.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org