AnsweredAssumed Answered

Dynamic models - one more question

Question asked by amenel on Apr 28, 2009
Latest reply on Apr 29, 2009 by janv
Hi,
I have been trying to grab how dynamic models work under Alfresco. And before the question is asked, here is the answer: yes, I did read the wiki page at http://wiki.alfresco.com/wiki/Dynamic_Models.

What I understood is that dynamic models are supposed to be taken into account, without restarting the webapp or the server, as soon as you drop a correctly written xml file in "Data Dictionary > Models" and check its "model active" checkbox. However, I can't create a content of a type defined in the model file: I get a message in red reading "java.lang.IllegalArgumentException: Class {<namespace_uri>}<class_name> has not been defined in the data dictionary"…

I need to stop Tomcat and restart it before I can create the content, which doesn't change much from putting the file in shared/classes/alfresco/extension with the appropriate "*-context.xml" file. Was this intended ? It does not really reflect what I would associate with "dynamic" and ends up being more frustrating than practical. I guess the content types in the model file are not written to the database when activating the model while, at content creation time, the DB is queried for the content type.

My question: is that one shutdown/startup cycle a part of the normal behavior ? or have I missed a step ?

Outcomes