Announcement Announcement Module
Collapse
No announcement yet.
Embedding new bean to existed AOP system programmatically Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Embedding new bean to existed AOP system programmatically

    I have a system where server communicates with clients via rmi. Client is an initiator, he calls remote server method and delivers all connectivity details to it (name at RMI registry). Then server constructs an RMI stub via the code like below:
    Code:
            RmiProxyFactoryBean factoryBean = new RmiProxyFactoryBean();
            factoryBean.setServiceInterface(MyService.class);
            factoryBean.setServiceUrl(rmiServiceUrl);
            factoryBean.setRefreshStubOnConnectFailure(true);
            factoryBean.afterPropertiesSet();
            MyService service = (MyService) factoryBean.getObject();
            // use remote client service
    At the same time there are some configured aspects at server side. I'd like to advice execution of some methods of MyService interface (for RMI proxies too). It's logical that methods of created RMI stub are not advised now because created RMI proxy is not wrapped by AOP proxies.

    The question is - is it possible to create new RMI proxies and spread AOP existing rules to them?

    P.S. I read about ProxyFactory but as far as I see, it allows only from-the-scratch configuring.
Working...
X