title: accessing custom created datasources in JBOSS 7.1
body: <p>Greetings of the day</p>
  
  <p>Generally we define the datasource in standalone.xml and then we will use the same in the application code based on JNDI Name and this is working fine for me. 
    But we have a peculiar functionality where in we create the custom datasources through our application and then create the datasource xml with custom names like oracle.Host_Name-ds.xml, sqlserver.Host_Name-ds.xml, mysql.Host_Name-ds.xml,oracle.Host_Name1-ds.xml etc etc and we use this datasources to connect </p>
  
  <pre><code>        String dsName = oracle.Host_Name;
  
          try
          {
              javax.sql.DataSource ds = DataSourceHelper.getDataSource(dsName);
  
              conn = ds.getConnection();
          }
  </code></pre>
  
  <p>in JBOSS 4.x we used to create these files on fly(through application) and store them in application server/server/default/deploy folder and we used to access the data source with out any problem.</p>
  
  <p>In JBoss 7.X, how to bind the created datasources so that we will access them without change in the code. I don't want to change the code because there are so many instances where we are using it and also it will impact other functionality</p>
  
  <p>Regards
  Srini</p>