Creating a datasource using CLI if-else control flow in EAP6.1.0 and above

Solution Unverified - Updated -

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 CLI scripts? Is it possible to incorporate conditional logic in CLI scripts? For example, a script that creates a data source might execute fine the first time but fail with a duplicate resource error 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.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.