Hi,
What's the difference between ServiceLocator.getService(Class<?>) and
createAndInitialize(Class<?>) methods? I read the Javadoc over and over
but I don't see the difference. Doesn't getService() also inject and
post-construct the returned instance?
I notice one of Jersey's methods does this:
T component = serviceLocator.getService(clazz);
return component == null ?
serviceLocator.createAndInitialize(clazz) : component;
Why would getService() return null but createAndInitialize() work?
Thanks,
Gili