« Some shots of Mount Fuji in Japan | Main | JProfiler 3.0 still a star »

February 25, 2004

WebSphere 5.0: Making new DataSources or WorkManagers available to a running app without a restart

Some customers want to use JMX to make a DataSource or WorkManager and then without restarting the JVM, look these new objects up in JNDI. This does work normally. Such changes are typically only 'detectd' when the JVM restarts or when a new application is deployed to a running JVM.

You can trigger this rebinding at any time using JMX.

wsadmin> set dsh [$AdminControl queryNames type=DataSourceCfgHelper,process=server1]
wsadmin> $AdminControl invoke $dsh reload

The above snippet will cause server1 to reload the JNDI bindings. Now, you may still see some latency. You can make the DataSource etc on the DM but remember that until those changes are replicated to the node with server1 the above call will do nothing. Replication normally happens quickly and there are wsadmin commands to force a sync now but I don't have them handy. But, once the changes make their way to the server, this JMX call will allow you to access those resources without a restart.

February 25, 2004 in WebSphere JMX | Permalink


Post a comment