The PooledConnectionFactory does not extend JNDIBaseStorable neither implements JNDIStorableInterface which makes it impossible to store it in a JNDI tree. It is not a problem when using Spring, but when using for example Tomcat and context.xml as configuration it simply does not work.
Attaching a simple fix on how this can be resolved.