Bug 729304 - ResourceFactoryManager.createResource doesn't throw regardless of any error.
Summary: ResourceFactoryManager.createResource doesn't throw regardless of any error.
Keywords:
Status: NEW
Alias: None
Product: RHQ Project
Classification: Other
Component: CLI
Version: 3.0.1
Hardware: Unspecified
OS: Unspecified
unspecified
medium vote
Target Milestone: ---
: ---
Assignee: RHQ Project Maintainer
QA Contact: Mike Foley
URL:
Whiteboard:
: 727329 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-08-09 12:54 UTC by Ondřej Žižka
Modified: 2015-02-01 23:29 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:


Attachments (Terms of Use)

Description Ondřej Žižka 2011-08-09 12:54:38 UTC
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 14:38:55 UTC
Related to Bug 727329.

Comment 2 Ondřej Žižka 2011-08-10 15:50:56 UTC
*** Bug 727329 has been marked as a duplicate of this bug. ***

Comment 3 Charles Crouch 2012-02-17 22:43:17 UTC
Putting in for consideration for JON3.1.0

Comment 5 Larry O'Leary 2012-11-27 19:48:51 UTC
Resetting for triage in RHQ project.


Note You need to log in before you can comment on or make changes to this bug.