This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Spring and the fly likes Need help on JNDI DataSource in JBOSS? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Need help on JNDI DataSource in JBOSS?" Watch "Need help on JNDI DataSource in JBOSS?" New topic
Author

Need help on JNDI DataSource in JBOSS?

kishore skipper
Greenhorn

Joined: Aug 19, 2009
Posts: 26
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
 
wood burning stoves
 
subject: Need help on JNDI DataSource in JBOSS?
 
Similar Threads
Jboss NameNotFoundException
Spring 2.5 with Hibernate 3.0 error when creating dataSource for Hibernate SessionFactory
Spring configuration for Testing JMS using Junit
unsatisfied Dependancy exception
Jboss NameNotFoundException