4.4.  Use scripting to perform administrative tasks, for example, scripting libraries, ws_ant, wsadmin


WebSphere Application Server provides a scripting interface based on the Bean Scripting Framework (BSF). This interface is called wsadmin. BSF is an open source project that is used to implement an architecture for incorporating scripting into Java applications and applets. The BSF architecture works as an interface between Java applications and scripting languages. Using this framework allows scripting languages to complete the following tasks:

Because wsadmin uses BSF, it can make various Java objects available through language-specific interfaces to scripts. Figure below shows the major components that are involved in the wsadmin scripting solution.

Figure 4.5. Scripting in wsadmin

Scripting in wsadmin

You can use the following programming languages to write wsadmin scripts:

With WebSphere Application Server V7, the deprecation process for the Jacl syntax began. The script library and the command assistance on the administrative console support only Jython.

If you have existing Jacl scripts and want to start migrating to Jython, you can use the Jacl-to-Jython conversion utility to convert the scripts. This conversion assistant typically achieves 95-98% of a preliminary conversion. In most cases, the resulting conversion is syntactically and runtime equivalent.

However, verify each line to ensure that the code functions as you originally intended. When Jacl and Jython language differences result in lines of code that are difficult to convert automatically, the converted lines are flagged with a #?PROBLEM? tag. This tag provides assistance in finding areas that are most likely in need of manual conversion.

The wsadmin tool management objects

The wsadmin tool has the following administrative objects that provide server configuration and management capabilities:

Professional hosting         Free 'Oracle Certified Expert Web Services Developer 6' Guide     Free SCDJWS 5.0 Guide