JBoss.orgCommunity Documentation

Appendix A. AdminShell Frequently Asked Questions

A.1. Why won't the adminhelp command work in the Console tool?
A.2. Are there any pre-built scripts available?
A.3. I have written a very useful script to do XYZ, I would like this to be part of the distribution?
A.4. What is different between "connectAsAdmin()" and "connect()"?
A.5. What does "getAdmin()" call do? Why do I need it?
A.6. Is IDE support available for writing the scripts?
A.7. Is debugging support available?

A.1.

Why won't the adminhelp command work in the Console tool?

The Console environment does not understand Shell commands (load, help, adminhelp, etc.), since they are not directly supported by Groovy. In the Console you should use the equivalent functional form / Groovy, e.g. instead of adminhelp, adminHelp()

A.2.

Are there any pre-built scripts available?

Currently no, but we will provide samples in subsequent releases.

A.3.

I have written a very useful script to do XYZ, I would like this to be part of the distribution?

Yes, we would love to hear from users. Please submit the script through the Teiid JIRA, and if this script popular, we will include the script in the scripts library in the following releases.

A.4.

What is different between "connectAsAdmin()" and "connect()"?

The connectAsAdmin methods create a contextual connection to the AdminAPI of the Teiid Server. The connect methods return an extension of the Groovy Sql object to be used for Sql calls to the Teiid Server.

A.5.

What does "getAdmin()" call do? Why do I need it?

"getAdmin()" returns this contextual connection object created when you executed "connectAsAdmin()" method. This object implements the interface "org.teiid.adminapi.Admin" and AdminShell commands provided are wrappers around this API. Advanced users can use this API directly if the provided wrapper commands do not meet their needs.

A.6.

Is IDE support available for writing the scripts?

The Admin Console tool is a light-weight IDE. Full IDE support is available for Groovy, but requires manual manipulation of the class path and script imports. See using AdminShell methods in other environments.

A.7.

Is debugging support available?

The interactive shell and console do have built-in support for inspection of the current state. Performing line based debugging is beyond the scope of this document.