The following sections provide an overview of the JBI component types and the administrative tools available from the Sun Java System Application Server (GlassFish V2) and NetBeans to administer these JBI components. This document covers the JBI commands used by these utilities and provides links to additional information. If you have any questions or problems, see the Java CAPS web site at http://www.sun.com/software/javaenterprisesystem/javacaps/index.jsp.
This document covers the following topics:
Using the JBI Manager in the NetBeans IDE to Administer JBI Components
Using the asadmin Administrative Command Line Interface (CLI) to Administer JBI Components
Java Business Integration (JBI) is an implementation of the JSR 208 specification, developed as a way to implement a service-oriented architecture (SOA). JBI defines an environment that offers plug-in components that function as service providers (providers of services), service consumers (consumers of services) or both, and interact using a services model based directly on Web Services Description Language (WSDL) 2.0.
Java CAPS utilizes four types of JBI (Java Business Integration) Components:
Service Engines: Provide or consume services locally within the JBI runtime environment, and enable services such as business logic, processing, transformation, and routing services. For example, one Service Engine might execute long-lived business processes, while others provide data transformation or sophisticated Electronic Data Interchange (EDI) services.
Binding Components: Provide protocol independence for transport or communication. They access remote services using a specific protocol, such as HTTP or SOAP, and place those services onto the JBI Normalized Message Router. The binding component converts messages from their specific protocol to XML, and from XML, back to their specified protocol, a process called normalizing and denormalizing. Normalizing a message allows other JBI components to access these messages from the NMR. Binding components are specialized for theirspecific external protocols, such as HTTP, JMS, and others. This allows any JBI component to communicate over any protocol or transport available from Binding components deployed to the JBI runtime environment. There is no need to implement these protocols separately in business logic.
Binding components are specialized for their specific external protocols. This allows any JBI component to communicate over any protocol or transport available from Binding components deployed to the JBI runtime environment. There is no need to implement these protocols separately in business logic.
Shared Libraries: Provide Java classes that are available to more than one JBI Component. For example, the Sun WSDL Library can be shared by several different binding components.
Service Assemblies: Provide specific application artifacts to configure how the component provides and consumes services. For example, an EAR file can be used to configure a Java EE Service Engine to provide a desired service. A collection of such related artifacts is called a Service Assembly. Each application artifact in the service assembly is a service unit. The service assembly contains configuration information that defines to which JBI component each service unit is deployed. For example, the EAR file mentioned above plus another application artifact, the SOAP Binding configuration data used to make the service available to SOAP clients, constitute service units within a service assembly. Once an assembly is ready for use, it is deployed to the JBI environment. The JBI environment automatically distributes the service units to the appropriate JBI components that use them. Service assemblies are typically created and deployed in a development tools environment, such as that provided by the NetBeans IDE.
For example, the EAR file mentioned above plus another application artifact, the HTTP Binding configuration data used to make the service available to SOAP clients, constitute service units within a service assembly. Once an assembly is ready for use, it is deployed to the JBI environment. The JBI environment automatically distributes the service units to the appropriate JBI components that use them.
For Java CAPS, service assemblies are typically created and deployed in a development tools environment, such as that provided by the NetBeans IDE. The following image displays the expanded NetBeans JBI Manager and the four types of JBI Components.
JBI components, service assemblies, and service units, each have life cycle states that are controlled by JBI administrative tools. The lifecycle states of service units are managed indirectly through the service assembly. These lifecycles can include Installed, Stopped, Started, Shutdown, Deploy, and so forth.
The JBI Runtime server persists the life cycle states of JBI Components. When the application server shuts down and then restarts, JBI Components revert to their state at the time the application server shut down.
The JBI runtime attempts to revert to the “desired” state of a JBI component. For example, suppose you tried to start a JBI component but it did not start due to an error in the component. If you restart the Application Server, the JBI runtime attempts to start the component again.
There are several tools that allow you to administer binding components, service engines, shared libraries, and service assemblies, all of which are considered JBI components as a general term in this documentation.
The primary tools used to manage JBI components are:
NetBeans JBI Manager: The NetBeans JBI Manager is a NetBeans application invoked from the Services window of the NetBeans IDE. You can right-click a JBI component or service assembly to view the administration options available.
Sun Java Systems Application Server (GlassFish) Admin Console: The Sun Java System Application Server's Admin Console is a browser-based administrative tool that features an easy-to-navigate interface and online help. Not only does the Admin Console provide JBI Administration, it also supports system operations.
asadmin Administrative Command Line Interface (asadmin Utility): The Sun Java System (GlassFish) Application Server asadmin Administrative Command Line Interface (CLI) is a command-line tool that is integrated with the JBI Command Line Interface (CLI). The asadmin utility and the commands associated with it perform the same set tasks that can be performed in the Admin Console or JBI Manager. For example, start and stop domains, configure the server, and deploy applications. The asadmin utility also provides advantages for programmers and script writers interested in creating automated or batched applications.
Ant Tool (asant Utility): You can also use the asant utility to administer JBI components. The JSR 208 specification defines a standard set of Ant tasks for administering a JBI components, and are provided as Glassfish Ant extensions. JBI Ant tasks and commands are not covered in this document. For more information about using the asant utility to administer JBI Components, see JBI Ant Task Details.
JConsole: JConsole is a Java(TM) application, included in the Java SE JDK, that allows you to connect to a JMX agent and view the information that is collected by the MBeans that are managed by an MBean Server. For more information on JConsole, see Using JConsole to Monitor Applications by Many Chung.
Scripting: Scripting can be used to write small programs to perform simple management tasks. Scripting goes through the JDK's standard scripting interface, allowing you to use dozens of languages such as JRuby, Groovy, Jython, JACL, to name a few. Scripting for the Java Platform is specified by JSR-223, and describes mechanisms that allow scripting language programs to access information developed in the Java Platform and allow scripting language pages to be used in Java Server-side Applications. For more information, visit http://jcp.org/en/jsr/detail?id=223.
The JBI Manager is a term used for the JBI node (and it's associated functionality), accessed from the Services window of the NetBeans IDE. The JBI node is found under Servers > GlassFish V2 in the Services tree, and is only available when GlassFish is running. To start the GlassFish Application Server, right-click the GlassFish V2 and select Start.
The expanded JBI node contains directories for the JBI components. Right-click the JBI component directory to access the following functions:
Functions |
Description |
Service Engines |
Binding Components |
Shared Libraries |
Service Assemblies |
---|---|---|---|---|---|
Directory Functions: Right-click the directory to access functions |
|||||
Install |
Select and install a new instance of the component. |
YES |
YES |
YES | |
Install and Start |
Select, install, and start a new instance of the component. |
YES |
YES | ||
Deploy |
Select and deploy a new instance of the component. |
YES |
|||
Deploy and Start |
Select, deploy, and start a new instance of the component. |
YES |
|||
Refresh |
Refresh a component directory to update the component with the latest settings and information. |
YES |
YES |
YES |
YES |
Component Functions: Right-click the component to access functions |
|||||
Start |
Start a component causes it to begin processing, such as reading, transforming, or writing data, or seeking, making, or dropping connections. |
YES |
YES |
YES |
|
Stop |
Stop a component to end processing, such as reading, transforming, or writing data, or seeking, making, or dropping connections. |
YES |
YES |
YES |
|
Shutdown |
Shutting down a component keeps it available to the application server, but flags it as not currently processing. |
YES |
YES |
YES |
|
Uninstall |
Uninstalling a component removes it from the set of components that are available to the application server. |
YES |
YES |
YES | |
Upgrade |
Upgrading a component undeploys and uninstalls the current instance of the component and installs and transfers your settings to a new instance of the component. |
YES |
YES | ||
Advanced > Force Shutdown |
Forces the shutdown of a component when circumstances do not allow the component to shutdown. This option instructs the JBI runtime to ignore any failures in the component's method when processing the command. The component's method is still called and given the opportunity to complete, but in the event the method throws an exception, it is ignored (but still logged in the appserver log). |
YES |
YES |
YES |
|
Advanced > Force Uninstall |
Forces the uninstall of a component when circumstances do not allow the component to uninstall. The JBI runtime ignores any failures in the component's method when processing the command. The component's method is still called and given the opportunity to complete, but in the event the method throws an exception, it is ignored (but still logged in the appserver log). |
YES |
YES | ||
Advanced > Force Undeploy |
Forces a Service Assembly to undeploy when circumstances do not allow the component to undeploy. The JBI runtime ignores any failures in the Service Assembly's method when processing the command. The method is still called and given the opportunity to complete, but in the event the method throws an exception, it is ignored (but still logged in the appserver log). |
YES |
|||
Purge Persistence Data |
Purge Persistence Data is enabled (depending on the state of the BPEL SE) when persistence is turned on and data is available. Purges persistence event records. |
For BPEL SE | |||
Monitor Actions > Purge Data |
Purge Data is enabled (depending on the state of the BPEL SE) when persistence is turned on and data is available. Purges monitor event records. |
For BPEL SE | |||
Undeploy |
Undeploying a component removes it from the set of components that are available to the application server. |
YES |
YES |
YES |
|
Properties |
Properties opens the component properties editor. |
YES |
YES |
YES |
YES |
Refresh |
Refreshing a component updates the component with the latest settings and information. |
YES |
YES |
YES |
|
Show Endpoint Statistics |
Opens the Endpoint Statistics window for the component and displays the provisioning and consuming endpoints for that component. The statistics include Received-Done, Errors, and Faults, and Sent-Done, Errors, and Faults. Other available statistics can be viewed from the component properties. |
YES |
YES |
The Sun Java System (GlassFish) Application Server includes a web browser-based administrative tool call the Admin Console. The Admin Console can be used to start and stop domains, configure the server, deploy applications, and so forth. The Admin Console provides context sensitive help to assist you with administration tasks.
To start the Admin Console from NetBeans, right-click the Sun Java System Application Server (or GlassFish V2) node, under Servers in the Services window, and select View Admin Console from the popup menu.
To start the Admin Console from a web browser located on the same computer on which the application server is running, open a web browser and type: http://localhost:4848/. This is the configured default. If another port was specified during the installation of your application server, use that port number.
To launch the Admin Console on a computer that is not hosting the application server, open a web browser and enter the following web address:http://<hostname>:<port>where hostname is the name of the computer on which the application server is running, and port is the port number for the server.
When you successfully connect, enter the username and password specified when the application server was installed. The Admin Console's default username and password are admin (username) and adminadmin (password).
From the left pane of the Admin Console, select the JBI node to view the screens available for JBI administration. By selecting the various JBI nodes in the Application Server tree, you can open JBI administrative screens to perform the tasks listed in the table below.
For more information about using the Admin Console, see the Sun Java System Application Server 9.1 Quick Start Guide at http://docs.sun.com/app/docs/doc/819-3193/gewgw?a=view.
The Sun Java System (GlassFish) Application Server includes a command line administration utility known as asadmin. The asadmin utility can be used to perform any of the application server's administrative tasks, including those for administrating JBI Components.
The asadmin Utility uses the following guidelines:
All asadmin commands and options are case sensitive.
Option arguments are preceded by a single dash (-) or two dashes (--). Double dashes are used to specify long option arguments and a single dash specify the short option argument. Not all arguments will have a short option. Most options require argument values except boolean options which toggle to switch a feature ON or OFF.
For more information on options and their use, see the JBI Command Options and Values Table.
The asadmin utility can be run in interactive and non-interactive modes. Interactive mode will prompt the user for input, and is the default mode.
The command syntax is:
asadmin command [-short_option] [short_option_argument]* [--long_option [long_option_argument]* [operand]* |
JBI command name syntax is:
verb-jbi-noun |
For example: start-jbi-component or deploy-jbi-service-assembly.
This convention distinguishes JBI commands from other application server commands, and provides a name that describes the purpose of the command.
Help can be obtained by issuing the following commands:
asadmin --help (displays general help)
asadmin command --help (displays help for the specified command)
The following table contains JBI CLI commands and options used to administer JBI components. Some of these CLI commands have had options added to them to support the Java CAPS.
Command Name |
Options and Values |
Operand and Example |
|
---|---|---|---|
install-jbi-component: Installs a service engine or binding component into the JBI environment. |
For more information on options and their use, see JBI Command Options and Values Table |
The file path or component name: The archive file that will contain the component attributes, or the name of the component that has been previously installed to the domain. |
|
start-jbi-component: Starts a service engine or binding component on the specified target. If no target is specified, the component is started on the embedded DAS server. |
|
The component name: The name of the binding component or service engine to start. |
|
stop-jbi-component: Stops a service engine or binding component on the specified target. If no target is specified, the component is stopped on the embedded DAS server. |
|
The component name: The name of the binding component or service engine to stop. |
|
shut-down-jbi-component: Shuts down a service engine or binding component on the specified target. If no target is specified, the component is shutdown on the embedded DAS server. |
For more information on options and their use, see JBI Command Options and Values Table |
The component name: The name of the component to shutdown. |
|
uninstall-jbi-component: Uninstalls a service engine or binding component on the specified target. If no target is specified, the component will be uninstalled from the embedded DAS server. |
|
The component name: The name of the component to uninstall. |
|
deploy-jbi-service-assembly: Deploys a service assembly into the JBI Environment. The Target option (--target) is only relevant for Application Server Enterprise Edition. |
|
The file path or service assembly name: The archive file that will contain the service assembly attributes, or the name of the service assembly that has been previously deployed to the domain. |
|
start-jbi-service-assembly: Starts a service assembly on the specified target. If no target is specified, the command is executed against the server instance. |
For more information on options and their use, see JBI Command Options and Values Table |
The service assembly name: The name of the service assembly to start. |
|
stop-jbi-service-assembly: Starts a service assembly on the specified target. If no target is specified, the command is executed against the server instance. |
|
The service assembly name: The name of the service assembly to stop. |
|
shut-down-jbi-service-assembly: Shuts down a service assembly on the specified target. If no target is specified, the command is executed against the server instance. |
|
The service assembly name: The name of the service assembly to shutdown. |
|
undeploy-jbi-service-assembly: Undeploys a service assembly on the specified target. If no target is specified, the command is executed against the server instance. |
For more information on options and their use, see JBI Command Options and Values Table |
The service assembly name: The name of the service assembly to undeploy. |
|
install-jbi-shared-library: Installs a shared library into the JBI Environment. |
|
The file path: The archive file that will contain the shared library. |
|
uninstall-jbi-shared-library: Uninstalls a shared library from the specified target instance or cluster. If no target is specified, the shared library is uninstalled from the embedded DAS server. |
|
The shared library name: The name of the shared library to uninstall. |
|
list-jbi-service-engines: Lists the service engines that are installed in the JBI Environment. If no filters are specified, the list includes all installed service engines. |
For more information on options and their use, see JBI Command Options and Values Table |
None. |
|
list-jbi-binding-components: Lists the binding components that are installed in the JBI Environment. If no filters are specified, the list includes all installed binding components. |
|
None. |
|
list-jbi-shared-libraries: Lists the shared libraries that are installed in the JBI Environment. If no filters are specified, the list includes all installed shared libraries. |
|
None. |
|
list-jbi-service-assemblies: Lists the service assemblies that are installed in the JBI Environment. If no filters are specified, the list includes all installed service assemblies. |
For more information on options and their use, see JBI Command Options and Values Table |
None. |
|
show-jbi-service-engine: Shows detail information about the specified service engine. General information is displayed by default. Additional information is shown if the configuration, loggers, or descriptor options are specified. |
|
The name of the service engine. Example: show-jbi-service-engine sun-javaee-engine |
|
show-jbi-binding-component: Shows detailed information about the specified binding component. General information is displayed by default. Additional information is shown if the configuration, loggers, or descriptor options are specified. |
|
The name of the binding component. Example: show-jbi-binding-component sun-http-binding |
|
show-jbi-shared-library: Shows detailed information about the specified shared library. General information is displayed by default. Descriptor information is shown if the descriptor option is specified. |
For more information on options and their use, see JBI Command Options and Values Table |
The name of the shared library. Example: show-jbi-shared-library cli_test_sns1 |
|
show-jbi-service-assembly: Shows detailed information about the specified service assembly. General information is displayed by default. Descriptor information is shown if the descriptor option is specified. |
|
The name of the service assembly. Example: show-jbi-service-assembly PingApp |
|
upgrade-jbi-component: Upgrades a service engine or binding component that is currently installed in the JBI Environment. |
|
The name of the component that currently installed in the domain. Example: upgrade-jbi-component --upgradefile=cli-test-engine4-1.jar cli_test_engine4 |
|
set-jbi-runtime-logger: Sets the log level for a logger in the JBI runtime. |
For more information on options and their use, see JBI Command Options and Values Table |
Contains name=value pairs separated by a comma, or the name of a file that contains the name=value pairs for the loggers that are set. If the operand contains spaces, it must be placed within double quotes. Spaces or white space inside the quotes is taken literally. The value specified must be text that represents a legal logger level, or the text “DEFAULT” can be specified. If “DEFAULT” is used, the logger is reset to its initial state, which is to inherit the logger level from the parent. Example: set-jbi-runtime-logger com.sun.jbi.messaging=WARNING |
|
set-jbi-component-logger: Sets the log level for a specified component. |
|
Contains name=value pairs separated by a comma, or the name of a file that contains the name=value pairs for the loggers that are set. If the operand contains spaces the operand must be placed within double quotes. Spaces or white space inside the quotes is taken literally. The value specified must be text that represents a legal logger level, or the text “DEFAULT” can be specified. If “DEFAULT” is used, the logger is reset to its initial state, which is to inherit the logger level from the parent. Example: set-jbi-component-logger --component=sun-http-binding sun-http-binding.com.sun.jbi.httpsoapbc.HttpSoapBindingDeployer=INFO |
|
set-jbi-runtime-configuration: Sets the JBI runtime configuration values. |
|
Contains name=value pairs separated by a comma, or a name of a file that contains the name=value pairs for the configuration values that will be set. If the operand contains spaces, the operand must be placed within double quotes. The exact name of the configuration variable must be specified. Use the show-jbi-runtime-configuration command to view the names and current values for the runtime configuration. Example: set-jbi-runtime-configuration heartBeatInterval=6000 |
|
set-jbi-component-configuration: Sets the binding component or service engine configuration values for the given component name . |
For more information on options and their use, see JBI Command Options and Values Table |
Contains name=value pairs separated by a comma, or a name of a file that contains the name=value pairs for the configuration values that will be set. If the operand contains spaces, the operand must be placed within double quotes. The exact name of the configuration variable must be specified. Use the show-jbi-binding-component or show-jbi-service-engine command with the --configuration option to view the names and current values of the component configuration. Example: set-jbi-component-configuration OutboundThreads=5,ProxyPort=2345 |
|
update-jbi-application-configuration: Updates the application configuration for the specified component. |
|
Contains name=value pairs separated by a comma, or a name of a file that contains the name=value pairs for the application configuration values that will be updated. If the operand contains spaces, the operand must be placed within double quotes. Example: update-jbi-application-configuration --component=cli-config-binding --configname=testConfig ConfigData.properties |
|
update-jbi-application-variable: Updates the application variables for the specified component. Application variables are set using the format name=typevalue. If the type is not specified, the default type, String will be used. The valid types are String, Number, Boolean, and Password. When updating a variable, the type of the variable specified must match the type of the variable when it was created. |
|
Contains name=value pairs separated by a comma, or a name of a file that contains the name=value pairs for the application variables that will be updated. If the operand contains spaces or contains the square brackets specifying the type, the operand must be placed within double quotes. The type specified must match what was originally specified in the create command. Example: update-jbi-application-variable --component=cli-config-binding some-property-file.properties |
|
create-jbi-application-configuration: Creates an application configuration for the specified component. |
For more information on options and their use, see JBI Command Options and Values Table |
Contains name=value pairs separated by a comma, or a name of a file that contains the name=value pairs for the application configuration values that will be created. If the operand contains spaces, the operand must be placed within double quotes. Example: create-jbi-application-configuration --component=cli-config-binding --configname=testConfig ConfigData.properties |
|
create-jbi-application-variable: Creates application variables for the specified component. Application variables are set using the format name=[type]value. If the type is not specified, the default type, String will be used. The valid types are String, Number, Boolean, and Password. |
|
Contains name=value pairs separated by a comma, or a name of a file that contains the name=[type]value pairs for the application variables to be updated. If the operand contains spaces or contains square brackets specifying the type, the operand must be placed within double quotes. Example: create-jbi-application-variable --component=cli-config-binding some-property-file.properties |
|
delete-jbi-application-configuration: Deletes an application configuration for a specified component. |
|
The name of the application configuration to be deleted. Example: delete-jbi-application-configuration --component=cli-config-binding testConfig |
|
delete-jbi-application-variable: Deletes an application variable. |
For more information on options and their use, see JBI Command Options and Values Table |
The name or names of the application variables to be deleted. If the operand contains spaces, the operand must be in cased within double quotes. Spaces are taken literally. Example: delete-jbi-application-variable --component cli-config-binding FirstName |
|
list-jbi-application-configurations: Lists the JBI Application Configurations for the specified component. |
|
None. Example: list-jbi-application-configurations --component=cli-config-binding |
|
list-jbi-application-variables: Lists the JBI Application Variables for the specified component. |
|
None. Example: list-jbi-application-variables --component=cli-config-binding |
|
show-jbi-runtime-loggers: Shows the JBI runtime loggers. |
For more information on options and their use, see JBI Command Options and Values Table |
None. Example: show-jbi-runtime-loggers |
|
show-jbi-runtime-configuration: Shows the JBI runtime configuration values. |
|
None. Example: show-jbi-runtime-configuration |
|
show-jbi-statistics: Shows JBI statistics, filtered using the specified option values. To show more then one statistical category the user can specify more then one option value on the command line. |
|
None. Example: show-jbi-statistics --nmr |
The Following table provides a description of the JBI command options.
Option |
Value |
Description |
---|---|---|
Common Options: These options are common to most of the JBI Component asadmin commands. |
||
--echo | -e |
true | false |
true indicates that the command specified on the command line is echoed to system output. |
--interactive| -I |
true | false |
true (default) indicates that only the required password options are prompted. |
--terse | -t |
true | false |
true indicates that the output is reduced to the minimal amount. |
--port | -p |
The port number |
The HTTP/S port for administration. Default port for PE: 4848, default port for EE: 4849 |
--secure | -s |
true | false |
true indicates that SSL/TLS is used to communicate with the domain administration server. |
--host | -H |
localhost |
The machine name where the JBI application is running. The default value is localhost. |
--user | -u |
The admin user |
The authorized domain administration server administrative username. |
--passwordfile |
filename |
The name of a file containing the password entries. |
--target |
target name | [server]|domain |
The name of the target. |
--help |
Displays the help text for the command. |
|
Specialized Options: These options are for specific JBI Component asadmin commands only. |
||
--assemblyname |
service assembly name |
Lists the components that have ASA deployed as part of the service assembly unit with the specified service assembly name. |
--component |
component name |
The name of the referenced component. |
--componentname |
component name |
Lists the shared libraries referenced by the specified component. |
--configuration |
true|[false] |
Displays the component's configuration values. |
--descriptor |
true|[false] |
Displays the component's XML desriptor. |
--enabled |
true|false |
true indicates that the service assembly starts automatically when the system starts up. Users are allowed to access the service assembly. For EE, this option enables the deployment on the specified instance or cluster. This option is ignored when the service assembly is deployed on the target domain. |
--endpoint |
endpoint name |
Displays the endpoint statistics. |
--force| -F |
true|[false] |
true indicates that the component will be forcefully shut down. |
--framework |
true|[false] |
Displays the framework statistics. |
--keeparchive |
true|[false] |
true indicates that the component will remain in the domain. |
--libraryname |
shared library name |
Lists the components that currently use the specified shared library. |
--lifecyclestate |
shutdown|started|stopped |
The list can be filtered on the lifecycle state of the components. |
--loggers |
true|[false] |
Displays the component's loggers and their levels. |
--nmr |
true|[false] |
Displays the NMR (Normalized Message Router) statistics. |
--serviceassembly |
service assembly name |
Displays the component's statistics. |
--upgradefile |
[filepath] |
The new archive file path that is used to update the component. |
--upload |
[true]|false |
true indicates that it uploads the file to the administration server. If the filepath of the installable file is mounted to the server machine, or if the administration server is running locally, set the upload option to false. |
To start the asadmin utility from the command line, go to the install-dir/bin directory, where install-dir is the application server installation directory, and enter the command: asadmin.
For directions on how to configure a Windows Environment to use the asadmin Utility tools, see GlassFish Quick Start Guide.
For more information about using the asadmin Utility, see GlassFish JBICLI Project Plan and JBI ADMIN CLI