I am trying to configure such a relation in spring:
MyObject myObject = new MyObject(); myObject.setEntity( new Entity(this) ); is it possible?
When I am trying such a configuration:
<bean id="myObject" class="MyObject" scope="request"> <property name="entity"> <bean class="Entity"> <constructor-arg ref="myObject"/> </bean> </property> </bean> It returns: [java] Caused by: org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'myObject': Requested bean is currently in creation: Is there an unresolvable circular reference?
I am thinking about using factory-method for this, but maybe someone has better idea?
ref="com.electrabel.relay.BounceRelay"?