Monday, October 21, 2013

JNDI DataSource in Spring

There are several ways to configure JNDI based data source in Spring. The following steps explains the JBoss JNDI data-source implementation in spring.I just showing quick way tutorial which save your time and brain :)

Open the mssql-ds.xml file from your JBoss deployment directory(D:\APP_servers\jboss-4.2.0.GA\server\default\deploy).
if file not exist simply create the xml file with that name. the contents inside the file are simple like


Now come to Spring configuration file,I create the hibernate Session Factory bean which required data-source so my spring configuration some thing look like that



So this is very simple way to define and use of JNDI DS in spring. 

Thanks



No comments:

Post a Comment