On 07/20/2010 12:30 PM, QPID User wrote:
Hi Ken,

Thanks a lot for the response. In the debugger I see the code getting to the
ParentComponent.cpp doMethod...see below

--

if (methodName == "create_child") {

ArgsParentComponentCreate_child ioArgs;

::qpid::types::Variant::Map::const_iterator _i;

if ((_i = inMap.find("childId")) != inMap.end()) {

ioArgs.i_childId = _i->second;

}

status = coreObject->ManagementMethod (METHOD_CREATE_CHILD, ioArgs, text);

outMap["_status_code"] = (uint32_t) status;

outMap["_status_text"] = ::qpid::management::Manageable::StatusText(status,
text);

outMap["childRef"] = ::qpid::types::Variant(ioArgs.o_childRef);

return;

}
--
The line where it says
status = coreObject->ManagementMethod (METHOD_CREATE_CHILD, ioArgs, text);
At this point it returns the status=unknownmethod
Now I see that I'm getting this error because I dont' have an application
level implementation of the create_child method. I have not built any
classes on top of QMF generated managed objects.

I am only trying to model a simple parent child relationship. A single
parent with 0 or more children, and those children also having 0 or more
children. What relationships does QMF model inherently i.e. does not need to
be done by the application?
QMF doesn't model relationships formally. In the example you are using, the child object has a reference to an instance of the parent object. With this structure a "parent" object can have zero or more linked "child" objects. The notion of "parent-child" relationship is informal however. To get a list of the children of a parent, you would query the set of child objects looking for instances that reference the parent.

There have been discussions about introducing a flexible "relationship" concept to the model structure, but nothing concrete has come of it to date.

-Ted


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:[email protected]

Reply via email to