Invoking the Migration Tool

You can run the Migration Tool in GUI or command-line mode.

Invoking the Migration Tool on Solaris and Linux

To start the Migration Tool on Solaris and Linux:

  • From the shell prompt, issue the following command to start the Migration Tool in GUI mode:
% <INSTALL_DIR>/bin/asmigrate.sh -u
  • To start the tool in command-line mode:
% <INSTALL_DIR>/bin/asmigrate.sh -c -S sourceserver -t targetdirectory -T targetserver <OPERAND>

or

% <INSTALL_DIR>/bin/asmigrate.sh -c -S sourceserver -s sourcedirectory-t targetdirectory -T targetserver

The Migration Tool Command-Line Options section provides additional information about parameters that you must use when you are using Migration Tool from the command-line.

Invoking the Migration Tool on Windows

To start the Migration Tool on Windows:
Open a DOS command window.
Change to the directory where you installed the application server. Then change to the bin directory.
To start the Migration Tool in GUI mode, issue the following command at the DOS prompt:

C:> asmigrate.cmd -u

Or, to start the Migration Tool in command-line mode:

C:> asmigrate.cmd -S sourceserver -t targetdirectory -T targetserver <OPERAND>

or

C:> asmigrate.cmd -c -S sourceserver -s sourcedirectory-t targetdirectory -T targetserver

Migration Tool Command-Line Options

The complete asmigrate command syntax is as follows:

asmigrate required_parameter [optional_parameters] [operand]
asmigrate 
  [-h | --help ] 
  [-v | --version ] 
  ( (-c | --commandline) | (-u | --ui) )
  [-q | --quiet ] 
  [-d | --debug ]
  [-s | --sourcedirectory source_directory] 
  [-S | --sourceserversource_application_server] 
  [-t | --targetdirectory target_directory] 
  [-T | --targetserver target_application_server] 
  [-n | --scan-native-apis-only ] 
  [-p | --scan-packages package_list]
  [-j | --java2db create-tables=true, drop-tables=true, db-vendor-name=dbVendorName] 
  [-m | --migrate-cmp comment-pk-modifiers=true, overwriteconflicting-accessors=true] 
  [-f | --file-filter all-files=true, html-files=true, java-files=true, jsp-files=true, xml-files=true, archive-files=true] 
  [-a | --append-logs ]
  [operands]

where:
required_parameter must be one of the following:

  • u|-ui
    invokes the Migration Tool in graphical user interface (GUI) mode. No additional parameters may be specified.
  • c|-commandline
    invokes the Migration Tool in command-line mode. Requires the following additional parameters:
  • S|-sourceserver
    identifes the source application server of the applications to be migrated. Possible servers include:
  • wl51: WebLogic Application Server 5.1
  • wl60: WebLogic Application Server 6.0
  • wl61: WebLogic Application Server 6.1
  • wl81: Weblogic Application Server 8.1
  • as65: Sun ONE Application Server 6.5
  • as70: Sun ONE Application Server 7.0
  • ws40: WebSphere Application Server 4.0
  • ws50: Websphere Application Server 5.1
  • ri13: JavaTMÖ 2 Platform Enterprise Edition 1.3
  • ri14: JavaTMÖ 2 Platform Enterprise Edition 1.4
  • jb30: JBoss Application Server 3.0
  • tc41: Tomcat Application Server 4.1
  • t|-targetdirectory
    identifies the target or output directory where the migrated application should be placed.
  • T|-targetserver
    identifies the target application server to which the application is to be migrated. Required target server is TARGETSERVER_DESIGNATOR, Sun Java System Application Server.
    ((optional_parameters)) can be one or more of the following:
  • h|-help
    displays the arguments for launching the Migration Tool.
  • v|-version
    displays the version of the Migration Tool.
  • q|-quiet
    launches the Migration Tool in quiet mode.
  • d|-debug
    launches the Migration Tool in debug mode.
  • s|-sourcedirectory
    identifes the directory where the source code to migrate or scan is present.
  • n|-scan-native-apis-only
    scans the source code only for the presence of application server-specific proprietary APIs.
  • p|-scan-packages
    comma-separated list of Java packages to scan.
  • j|-java2db
    bypasses the creation of the sun-cmp-mapping.xml file. Instead, introduces the option argument into the sun-ejb-jar.xml file. Optional arguments are:
  • create-tables: if set to true (default), creates tables at deployment time. If set to false tables are not created.
  • drop-tables: if set to true (default), tables are dropped at undeployment time. If set to false tables are not dropped.
  • db-vendor-name: name of the database vendor for the application to be migrated. Supported vendor names include: Oracle, Sybase, DB2, Generic SQL92, JavaDB, and MSSQL.
  • m|-migrate-cmp
    migrates 1.1-compliant CMPs, if any, to 2.0. Optional arguments are:
  • overwrite-conflicting-accessors: if set to true (default), conflicting accessors are overwritten. If set to false, conflicting accessors are not overwritten.
  • comment-pk-modifiers: if set to true (default), setters of primary key are commented. If set to false, setters of primary key are not commented.
  • f|-file-filter
    >selects the type of files to migrate. Optional arguments are:
  • all-files: if specified and set to true (default), migrates all types of files.
  • html-files: if specified and set to true (default), migrates HTML files.
  • java-files: if specified and set to true (default), migrates Java files.
  • jsp-files: if specified and set to true (default), migrates JSP type files.
  • archive-files: if specified and set to true (default), migrates JAR/EAR/WAR/RAR file types.
  • a|-append-logs
    if specified, appends the logging to the existing or previous logs without overwriting them. If not specified, previous logs are overwritten.
  • operand
    identifes the archive file (JAR/EAR/WAR/RAR) to be migrated.

Command-Line Examples

The command that follows migrates a Java EE archive (an EAR file). Note that a source directory was not specified and the pathname to the archive was the operand.

asmigrate.sh -c --sourceserver as65
--targetdirectory /d4/ias6.5/out
--targetserver __TARGETSERVER_DESIGNATOR_CMD__ /d2/apps/HelloWorld.ear

The command that follows migrates the source code of a Java EE application. Note that the source directory was specified but an operand filename was not.

asmigrate.cmd -c --sourcedirectory
/d2/apps/helloWorld/src
--sourceserver as65 --targetdirectory /d4/ias6.5/out --targetserver
__TARGETSERVER_DESIGNATOR_CMD__

Previous Next