We no longer need the shared library approach for our own components because we will leverage the OSGi classloading mechanisms for that. You will still be able to deploy SL to ESB4 if you want, ESB 4 will remain compatible with JBI.
For your own codebase, if you add a bundle to provide the shared code (i.e. it has an Export-Packages for the right packages), this will be available from within a JBI service/component as well. Using OSGi packaging instead of JBI packaging will allow you to use even more fine-grained control over imports (e.g. for using multiple library versions).