6 Replies Latest reply on Oct 3, 2012 1:07 AM by Srinivas Reddy Bijjam

    accessing custom created datasources in JBOSS 7.1

    Srinivas Reddy Bijjam Newbie

      Greetings of the day

      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

              String dsName = oracle.Host_Name;  try { javax.sql.DataSource ds = DataSourceHelper.getDataSource(dsName);  conn = ds.getConnection(); } 

      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.

      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

      Regards Srini