gen_skels  gen_stubsandskels

Chapter 12: Using jagtool and jagant

gen_stubs

Description

Generates stubs for a package or component.

Syntax

Local mode support: Yes.

Command line:

gen_stubs 
[ connect-args | local-args ]
[-javastubs true|false] 
[-cppstubs true|false] 
[-javastubtype CORBA|EJB|Jaguar1.1] 
[-javastubjarname filename]
[-javastubcodebase path] 
[-cppstubcodebase path]
[-compilejavastubs true|false] 
[-pseudostubs true|false] 
[-jdkversion 1.1|1.2] 
entity

Ant build file:

<jag_gen_stubs 
[ javastubs="true|false" ]
[ cppstubs="true|false" ]
[ javastubtype="CORBA|EJB|Jaguar1.1" ]
[ javastubjarname="filename" ]
[ javastubcodebase="path" ]
[ cppstudcodebase="path" ]
[ pseudostubs="true|false" ]
[ compilejavastubs="true|false" ]
[ jdkversion="1.1|1.2" ]
entity=”entity” />

Option

Description

Default

Required

connect-args | local-args

Arguments to specify a connection to the server or to run in local mode. See “Local versus connected mode”.

-

Yes

javastubs

Indicates whether to generate Java stubs.

true

No

cppstubs

Indicates whether to generate C++ stubs.

true

No

javastubstype

The type of Java stubs used. Options are:

  • CORBA

  • EJB

  • Jaguar1.1

CORBA

No

javastubjarname

If this flag is used, the generated Java stubs are placed in a JAR file with the specified file name on the server host. The full path for the file name must be specified.

-

No

javastubcodebase

The code base for Java stubs, on the server host.

$JAGUAR/html/classes

No

cppstubcodebase

The code base for C++ stubs, on the server host.

$JAGUAR/include

No

compilejavastubs

Indicates whether to compile Java stubs.

true

No

pseudostubs

Indicates whether to generate direct-access stubs for C++ and Java/CORBA pseudocomponents. Use this option if the target components run as EAServer pseudocomponents.

false

No

jdkversion

Indicates the JDK version to use for compiling Java skeletons. Options are:

  • 1.1 – JDK 1.1

  • 1.2 – JDK 1.2 or later

1.2

No

entity

The name of the entity for which stubs are generated, in the form EntityType:EntityName, where EntityType must be either Package or Component.

-

Yes

Returns

Return value

Indicates

0

The command ran successfully; the result is true/success.

1

The command ran successfully; the result is false/failure.

2

The command did not run successfully; an exception was thrown.

Examples

Example 1

This example generates EJB stubs for Package:SVU. The stubs are automatically compiled and added to the JAR file svustubs.jar:

See also

gen_skels, gen_stubsandskels





Copyright © 2005. Sybase Inc. All rights reserved. gen_stubsandskels