Bug 729304

Summary: ResourceFactoryManager.createResource doesn't throw regardless of any error.
Product: [Other] RHQ Project Reporter: Ondřej Žižka <ozizka>
Component: CLIAssignee: RHQ Project Maintainer <rhq-maint>
Status: NEW --- QA Contact: Mike Foley <mfoley>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 3.0.1CC: hbrock, hrupp, loleary
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:

Description Ondřej Žižka 2011-08-09 08:54:38 EDT
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 );
Comment 1 Ondřej Žižka 2011-08-09 10:38:55 EDT
Related to Bug 727329.
Comment 2 Ondřej Žižka 2011-08-10 11:50:56 EDT
*** Bug 727329 has been marked as a duplicate of this bug. ***
Comment 3 Charles Crouch 2012-02-17 17:43:17 EST
Putting in for consideration for JON3.1.0
Comment 5 Larry O'Leary 2012-11-27 14:48:51 EST
Resetting for triage in RHQ project.