rodrigo, olhei a pagina q vc indicou e alterei o arquivo …/conf/context.xml
inclui as linhas:
<Resource name="jndi_postgres" auth="Container"
type="javax.sql.DataSource" driverClassName="org.postgresql.Driver"
url="jdbc:postgresql://10.1.0.9:5432/meuBd"
username="web" password="senha" maxActive="20"
removeAbandoned="true"
removeAbandonedTimeout="60"
maxIdle="10" maxWait="-1"/>
estou utilizando spring
<bean id="dataSourcePg" class="org.springframework.jndi.JndiObjectFactoryBean">
<property name="jndiName">
<value>java:jndi_postgres</value>
</property>
</bean>
quando faco o deploy da aplicacao a seguinte exception
Caused by: javax.naming.NameNotFoundException: Name jndi_postgres is not bound in this Context
at org.apache.naming.NamingContext.lookup(NamingContext.java:770)
at org.apache.naming.NamingContext.lookup(NamingContext.java:153)
at org.apache.naming.SelectorContext.lookup(SelectorContext.java:137)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
oq pode estar faltando configurar ?