Hi,
I am facing some problem in creating/adding new components in Merlin.
I have a component named Mycomponent which is already deployed in the container and wants to create/add new components dynamically. I guess the only way to add is to use the merlin composition APIs. (In case there is some other approach, let us know)
Here are the steps which i am trying to do in my MyComponent.
- Get the Containment model from the container. (using context.get("urn:composition:containment.model" ))
- Create a Component Model
- Create an instance of DefaultComponentModel. But the problem is i don't how to create it should it. :)
It's much simpler than that.
You need to invoke ContainmentModel.addModel( ... ). This operation
ComponentProfile profile =
new ComponentProfile(name,Myclass.class.getName());
DeploymentModel model =
m_containmentModel.addModel( profile );Cheers, Stephen.
--
|------------------------------------------------| | Magic by Merlin | | Production by Avalon | | | | http://avalon.apache.org/merlin | | http://dpml.net/merlin/distributions/latest | |------------------------------------------------|
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
