STR: 0) Prepare stuff var appTypeName = "No Tx Datasource"; var appType = ResourceTypeManager.getResourceTypeByNameAndPlugin( appTypeName, "JBossAS5" ); // TODO: Assert.assertNotNull( appType, " Could not find application type: " + appTypeName); // Create deployConfig. Properties taken from $RHQ_SRC/modules/plugins/jboss-as-5/src/main/resources/META-INF/rhq-plugin.xml var deployConfig = new Configuration(); deployConfig.put( new PropertySimple("jndi-name", "cliTestDS")); deployConfig.put( new PropertySimple("driver-class", "org.hsqldb.jdbc.JDBCDriver")); deployConfig.put( new PropertySimple("connection-url", "jdbc:hsqldb:mem:.")); 1) This works fine - DS is created: ResourceFactoryManager.createResource( as.id, appType.id, "cliTestDS-res", null, deployConfig ) %cliTestDS-res", null, deployConfig ); 2) Do it again. No exception thrown, returns null like at first time. Should throw because JNDI is the same. DS not created of course. 3) This doesn't throw either: deployConfig.put( new PropertySimple("jndi-name", "!:\\(@*^$*%///: !)(%~_")); ResourceFactoryManager.createResource( as.id, appType.id, "cliTestDS-crap", null, deployConfig cliTestDS-res", null, deployConfig );
Related to Bug 727329.
*** Bug 727329 has been marked as a duplicate of this bug. ***
Putting in for consideration for JON3.1.0
Resetting for triage in RHQ project.