tanyaofei commented on issue #6568:
URL: 
https://github.com/apache/incubator-seata/issues/6568#issuecomment-2229783999

   > > > > > In my opinion, this code is just to avoid duplicate proxies. 
@wangliang181230 , @slievrly , @xingfudeshi , please help to answer this 
question.
   > > > > 
   > > > > 
   > > > > You already answered the question.
   > > > 
   > > > 
   > > > 这么看来,我们应该缓存bean,而不是beanname,否则多例情况下将不会进行代理 In this case, we should 
cache the bean instead of the bean name. Otherwise, if there are multiple 
instances, no proxy will be created.
   > > 
   > > 
   > > 如果直接缓存bean,那是否失去了多例bean的意义,所以,我只是想知道,这个proxyed_set 
你们在设计时,是考虑到了重复代理的情况,我想知道,在哪种场景下会出现重复代理?
   > 
   > 
我说的缓存bean是将bean缓存起来,只是用来比较bean是否已经被seata所代理过,不过我目前感觉这种方式也不好,针对多例bean反而可能会出现oom,因为被seata一直引用着。大家可以在这讨论出一个合适的方案来解决这个问题。
 What I meant by caching beans is to cache the beans and use them only to check 
whether they have been proxied by Seata. However, I currently feel that this 
approach may not be ideal, as it could potentially lead to out-of-memory errors 
for prototype beans, which are constantly referenced by Seata. Let's discuss 
and come up with a suitable solution to address this issue.
   
   似乎使用弱引用可以解决这个问题?


-- 
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-unsubscr...@seata.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@seata.apache.org
For additional commands, e-mail: notifications-h...@seata.apache.org

Reply via email to