@Override
	protected Command getCreateCommand(CreateRequest request) {
		
		Command retVal = null;
		Object object = request.getNewObject();
		
		if (object instanceof XMLElement) {
			
			XMLElement temp = (XMLElement) object;
			
			// provider
			if (temp.getAddress().startsWith("/jbossesb/providers")) {
				CreateProviderCommand command = new CreateProviderCommand();
				command.setLocation(request.getLocation());
				command.setParent((XMLDocument) (getHost().getModel()));
				command.setThing((XMLElement) (request.getNewObject()));
				retVal = command;
			}
			
			// service
			else if (temp.getAddress().startsWith("/jbossesb/services")) {
				CreateServiceCommand command = new CreateServiceCommand();
				command.setLocation(request.getLocation());
				command.setDocument((XMLDocument) (getHost().getModel()));
				command.setService((XMLElement) (request.getNewObject()));
				retVal = command;
			}
		}
		
		return retVal;
	}