This issue is probably related to https://bugzilla.redhat.com/show_bug.cgi?id=886119 If you change JNDI name of some Datasource from lets say "foo" to "bar" two things happen 1) Because datasource type resources are being referenced by JNDI instead of Resource Name (key?) the old "foo" resource will become dead but still visible in inventory of EAP server resource. 2) After some time (probably when discovery -f is performed on agent side) new child resource of name "bar" appears in inventory
Till JON runs check for changes the resource with old name (JNDI name) is visible in JON, which makes it confusing for customer. The workaround is to run discovery manually (on the agent run discovery -f, or the agent's manual discovery operation). The datasource resource should be rather associated with its resource name, if it is specified during its creation, it would prevent this kind of errors as having two datasources at the same time when one is invalid and second is valid.
Fixed in master commit 4ab947d9c450a94601055509cb9c4240b0652210 Author: Thomas Segismont <tsegismo> Date: Thu Jul 25 18:06:07 2013 +0200 In EAP5, JNDI name is the key of Datasource and Connection Factory managed components. Consequently, there is no way to change the JNDI name of such components without creating a new managed component, which will in the end be discovered by RHQ. So in RHQ, jndi-name config property is now marked as read-only (it will still be required when creating a Datasource or a Connection Factory).
As this is MODIFIED or ON_QA, setting milestone to ER1.
VERIFIED with JON 3.2.0.ER1 and EAP 5.2.0.GA You can't change JNDI name of DataSource, JNDI Name is read-only attribute