This content has been marked as final.
Show 2 replies
-
1. Re: Setting resource-refs at run-time
adrian.brock Apr 26, 2004 3:33 PM (in response to sumedh)Only if you use the alias mbean
resource-ref -> alias -> datasource
I don't like the idea of changing datasource halfway through a transaction. -
2. Re: Setting resource-refs at run-time
sumedh Apr 27, 2004 4:20 AM (in response to sumedh)Actually I dont mind setting the JDBC source before the component is deployed, but I want to set the "resource params" at run-time, based on the values entered via a UI.
<Resource name="jdbc/test" type="javax.sql.DataSource" auth="SERVLET"/> <ResourceParams name="jdbc/test"> <parameter> <name>driverClassName</name> <value>oracle.jdbc.driver.OracleDriver</value> </parameter> <parameter> <name>url</name> <value>jdbc:oracle:thin:@sumedh:1521:sumedh</value> </parameter> <parameter> <name>username</name> <value>sumedh3</value> </parameter> <parameter> <name>password</name> <value>ADD7 A78C 3020 9D66 36B5 10D 5FCD 689B 5761</value> </parameter> </ResourceParams>
The above is how it is set in a Tomcat 5 XML descriptor.
According to the above snippet, i want to set the "resourceparams" at run time, but have not found something equivalent in JBoss.
Can you help me?
Thanks...