register components, set lifetime.