java - is res-type required for JNDI setup in web.xml? -


i met situation jndi provider on different application servers might have different proxy interface/class(like in jms, websphere may have javax.jms.queueconnectionfactory instead of javax.jms.connectionfactory), in web.xml

<resource-ref>     <description>jndi jms access</description>     <res-ref-name>jms/connectionfactory</res-ref-name>     <res-type>javax.jms.queueconnectionfactory</res-type>     <res-auth>container</res-auth> </resource-ref> 

is <res-type>javax.sql.datasource</res-type> must defined make works?

i think jndi name should fine should unique in initial context?

i find something oracle not sure official?

from ee platform spec (emphasis mine):

the res-type element optional if injection target specified for resource; in case res-type defaults type of injection target.

i believe javax.jms.connectionfactory should work on websphere application server if other application server requires different value.


Comments

Popular posts from this blog

ruby on rails - RuntimeError: Circular dependency detected while autoloading constant - ActiveAdmin.register Role -

c++ - OpenMP unpredictable overhead -

javascript - Wordpress slider, not displayed 100% width -