Hi,

As Servicemix 4.x basically is an OSGi container, so you can publish your DataSource as OSGi service and use OSGi style jndi name to refer it, take a look at [1] where you can find more link about the similar discussion.

[1]http://fusesource.com/forums/thread.jspa?messageID=11577&#11577
Freeman
On 2011-9-26, at 下午11:44, skompelly wrote:


Hi,

I am trying to deploy the war file in the servicemix 4.3.1 and getting below
exception.

*Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'j2eeDataSource' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested
exception is javax.naming.NotContextException: java:/MySqlDS*

As i see from forums that says as: keep the jndi.xml file in the conf
directory, but servicemix4.3.1 version there is no conf directory.

Below is my configuration in applicationContext.xml file.

   <bean id="j2eeDataSource"
class="org.springframework.jndi.JndiObjectFactoryBean">
       <property name="jndiName" value="java:/MySqlDS"/>
   </bean>

Please can any one suggest me where i can put jndi.xml file or is there any
other alternatives i have to do.

Thanks in advance

Regards,
Santosh

--
View this message in context: 
http://servicemix.396122.n5.nabble.com/JNDI-configuration-in-apache-servicemix-4-3-1-fuse-01-09-tp4841858p4841858.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

---------------------------------------------
Freeman Fang

FuseSource
Email:[email protected]
Web: fusesource.com
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com









Reply via email to