Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Need help on JNDI DataSource in JBOSS?

 
kishore skipper
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,

can somebody help me with datasource configuration?

I am using JBOSS 5.1 ,Spring 2.5

i have the spring configuration file defined as

<bean id="jndiTemplate" class="org.springframework.jndi.JndiTemplate">
<property name="environment">
<props>
<prop key="java.naming.factory.initial">org.jnp.interfac es.NamingContextFactory</prop>
<prop key="java.naming.provider.url">jnp://localhost:1099</prop>
<prop key="java.naming.factory.url.pkgs">org.jboss.namin grg.jnp.interfaces</prop>
<prop key="jnp.disableDiscovery">true</prop>

</props>
</property>
</bean>
<bean id="jndiDataSource" class="org.springframework.jndi.JndiObjectFactoryB ean">
<property name="jndiName">
<value>java:mySource</value>
</property>
<property name="resourceRef">
<value>false</value>
</property>
</bean>

when i tried this i am getting NameNotFound exception...but when i tried to lookup the same using java code it works!!

i am not sure why spring not able catch hold of this JNDI name...i have given enough trials from internet but it did not workout..

Thanks,
kishore
 
He's dead Jim. Grab his tricorder. I'll get his wallet and this tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!