[jboss-user] [Datasource Configuration] - accessing custom created datasources in JBOSS 7.1

Srinivas Reddy Bijjam do-not-reply at jboss.com
Wed Sep 26 00:21:53 EDT 2012


Srinivas Reddy Bijjam [https://community.jboss.org/people/srinivas.bijjam] created the discussion

"accessing custom created datasources in JBOSS 7.1"

To view the discussion, visit: https://community.jboss.org/message/761532#761532

--------------------------------------------------------------
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
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/761532#761532]

Start a new discussion in Datasource Configuration at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2077]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20120926/f109c602/attachment.html 


More information about the jboss-user mailing list