Hi,
I'm implementing my custom namespace:AKKA (like Typesafe AKKA), but I've some questions:
1) I want to populate some bean properties which are not directly exposed by FactoryBean, i.e. "injectableBean" property.
I used BeanWrapper, but seems little elegant
This is the code of my ActorFactoryBean:
Code:if ( !Collections.isEmpty( beanProperties ) ) { final BeanWrapper wrapper = new BeanWrapperImpl( instance ); for ( final PropertyValue propertyValue : beanProperties) { if ( propertyValue.isReference() ) { final PropertyDescriptor propertyDescriptor = BeanUtils.getPropertyDescriptor( instance.getClass(), propertyValue.getName() ); if ( isNotNull( propertyDescriptor ) ) { final Method writeMethodOfProperty = propertyDescriptor.getWriteMethod(); try { writeMethodOfProperty.invoke( instance, getBeanFactory().getBean( (String) propertyValue.getValue() ) ); } catch ( Exception e ) { ... } } } else { wrapper.setPropertyValue( propertyValue ); } } }2) STS Content-assist doesn't work with "interface" attribute. How can i make it work, if feasible!Code:<akka:typed-actor id="serviceActor" interface="com.altran.spring.akka.test.config.ServiceActor" implementation="com.altran.spring.akka.test.config.ServiceExecutorActor" actors-context="defaultActorSystem"> <property name="injectableBean" ref="injectableBean" /> </akka:typed-actor>
Thanks in advance.



Reply With Quote