Improve ref appearance and logs
authorMathieu Baudier <mbaudier@argeo.org>
Tue, 28 Jul 2009 12:53:06 +0000 (12:53 +0000)
committerMathieu Baudier <mbaudier@argeo.org>
Tue, 28 Jul 2009 12:53:06 +0000 (12:53 +0000)
git-svn-id: https://svn.argeo.org/slc/trunk@2821 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc

demo/site/org.argeo.slc.demo.basic/conf/canonic.xml
runtime/org.argeo.slc.core/src/main/java/org/argeo/slc/core/execution/DefaultExecutionFlowDescriptorConverter.java

index a38526dff66562824508f531bd1c8c1f2ba22374..092953fabd2654125159692d2e4473ff9ea7c27e 100644 (file)
                                        <bean parent="specAttr.ref" p:targetClass="org.argeo.slc.core.test.BasicTestData"\r
                                                p:isParameter="false" p:isFrozen="false" />\r
                                </entry>\r
+                               <entry key="refWithoutValueFrozen">\r
+                                       <bean parent="specAttr.ref" p:targetClass="org.argeo.slc.core.test.BasicTestData"\r
+                                               p:isParameter="true" p:isFrozen="true">\r
+                                               <property name="value">\r
+                                                       <bean class="org.argeo.slc.core.test.BasicTestData">\r
+                                                               <aop:scoped-proxy />\r
+                                                               <property name="expected" value="tata" />\r
+                                                               <property name="reached" value="tata" />\r
+                                                       </bean>\r
+                                               </property>\r
+                                       </bean>\r
+                               </entry>\r
                        </map>\r
                </property>\r
        </bean>\r
index 968debcb7ca25f7a992dcc0d15ae2e81a2c76755..0e51cfeaa9b959b624f9c6e815e73c3334d9d7b2 100644 (file)
@@ -28,7 +28,7 @@ public class DefaultExecutionFlowDescriptorConverter implements
        public final static String REF_VALUE_TYPE_BEAN_NAME = "beanName";
 
        /** Workaround for https://www.spartadn.com/bugzilla/show_bug.cgi?id=206 */
-       private final static String REF_VALUE_IS_FROZEN = "__frozen";
+       private final static String REF_VALUE_IS_FROZEN = "[internal]";
 
        private final static Log log = LogFactory
                        .getLog(DefaultExecutionFlowDescriptorConverter.class);
@@ -177,12 +177,14 @@ public class DefaultExecutionFlowDescriptorConverter implements
                                }
                        }
                        if (ref == null) {
-                               if (log.isTraceEnabled())
-                                       log.warn("Cannot define reference for ref spec attribute "
+                               log.warn("Cannot define reference for ref spec attribute "
+                                               + key + " in " + executionFlow + " (" + rsa + ")."
+                                               + " If it is an inner bean consider put it frozen.");
+                       } else {
+                               if (log.isDebugEnabled())
+                                       log.debug(ref + " is the reference for ref spec attribute "
                                                        + key + " in " + executionFlow + " (" + rsa + ")");
-                       } else if (log.isDebugEnabled())
-                               log.debug(ref + " is the reference for ref spec attribute "
-                                               + key + " in " + executionFlow + " (" + rsa + ")");
+                       }
                        refValue.setRef(ref);
                }
                return refValue;