[jboss-dev-forums] [Design of Persistence on JBoss] - How to dynamically configure a datasource

alaiseca do-not-reply at jboss.com
Wed Oct 11 14:57:08 EDT 2006


Hi, I have a web application requiring to connect to one of several SQL Server databases. They are all identical in structure; what changes is the IP address, user and password. So far I had configured datasources as -ds.xml files in the deploy directory. But in this case I don't know the connection parameters in advance: they are discovered at runtime depending on the user who logs in. Is there any way in JBoss to dynamically setup a javax.sql.Datasource object and do the JNDI binding at runtime? As additional information, I'm using Spring + Hibernate. Thanks!!!

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3977652#3977652

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3977652



More information about the jboss-dev-forums mailing list