Creating a datasource using CLI if-else control flow in EAP6.1.0 and above
Issue
- Is it possible to check using CLI if the dataSource exist or not?
- Also is it possible to create a fresh datasource if the DataSource does not exist using the CLI if-else flow control ?
- How to incorporate conditional logic in
CLIscripts? Is it possible to incorporate conditional logic inCLIscripts? For example, a script that creates a data source might execute fine the first time but fail with aduplicate resourceerror if run again. How to make the scripts idempotent so that it would check and add data source only if it did not already exist.
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 6.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
