Programming WebLogic Enterprise JavaBeans

      

EJBGen Reference

EJBGen is an Enterprise JavaBeans 2.x code generator. If you annotate your Bean class file with JDK 1.5 annotations, you can use EJBGen to generate the Remote and Home classes and the deployment descriptor files for an EJB application.

Oracle recommends that you use EJBGen to generate deployment descriptors; this Oracle best practice allows for easier and simpler maintenance of EJBs. If you use EJBGen, you need to write and annotate only one bean class file, which simplifies writing, debugging, and maintenance. The following sections provide instructions on using EJBGen and define EJBGen command options and annotations:

 


Running EJBGen

These sections describe how to process an annotated bean file using EJBGen:

 

EJBGen Distribution and Examples

In this release of WebLogic Server, EJBGen and associated classes are included in weblogic.jar in the WL_HOME/server/lib of the WebLogic Server distribution. To use EJBGen, make sure weblogic.jar is in your CLASSPATH. EJBGen annotations can be found in the weblogic.ejbgen package.

If you have installed Oracle WebLogic Server examples, see WL_HOME\samples\server\examples\src\examples\ejb\ejb20\ and WL_HOME\samples\server\examples\src\examples\ejb\ejb21\ for an application that uses EJBGen.

 

Invoking EJBGen

Use this command to run EJBGen on a bean source file:

com.bea.wls.ejbgen.EJBGen

To run this command, weblogic.jar must be in your CLASSPATH.

If you are invoking EJBGen for an EJB that has relationships with other EJBs, invoke the related EJBs by naming them, following your EJB, in the invocation, as follows:

com.bea.wls.ejbgen.EJBGen (YourBean).java (RelatedBean).java

You can also invoke EJBGen via the ejbgen ant task, which is also included in weblogic.jar.

EJBGen Command Options

Table E-1 defines EJBGen command options.

Table E-1 EJBGen Command Options
Option Default Definition
-checkTags N/A If invoked with this option, EJBGen will not generate any classes but will search the classes supplied on the command line for tags that are not valid EJBGen tags.
-classPath [directory] N/A Directory where the class loader can find dependent classes that are in .class format. To specify more than one class path, separate paths with a semicolon (;).For instance: -classpath /dir1;/dir2 If dependent classes are in .java format, use -sourcePath instead.
-d [directory] N/A The directory under which all the files will be created.
-ddOnlyGen [boolean] 0 Tells the compiler to generate only the deployment descriptor files.
-descriptorDir [directory] N/A The directory under which all the descriptor files will be created, relative to the output directory specified with the -d [directory] option.
-docTag tagName N/A If specified, EJBGen prints out the detailed documentation for this tag, including all the recognized attributes. Note that even though this option does not need any source file, you still need to specify an existing .java class on the command line, or Javadoc will emit an error message even though it recognized the flag.
-docTags N/A Print out all the tags known by EJBGen. Note that even though this option does not need any source file, you still need to specify an existing .java class on the command line, or Javadoc will emit an error message even though it recognized the flag.
-docTagsHtml N/A Same as -docTags, but generates an HTML document.
-ejbPrefix [string] " " The prefix to use when generating the EJB class.
-ejbSuffix [string] Bean or EJB The suffix to use when generating the EJB class.
-ejbgenQuiet [boolean] N/A Make EJBGen less verbose.
-ejbgenVerbose [boolean] N/A Verbose mode.
-errorFile N/A The path of the file where errors will be redirected.
-exitOnError [boolean] N/A EJBGen should exit in case of an error.
-homeBaseClass [string (className)] N/A The base class for home remote interfaces.
-extractTemplates [directory] N/A The directory where to extract the templates.
-forceGeneration [boolean] N/A Force the generation of all files regardless of time stamps.
-homeBaseClass [string (className)] N/A The base class for home remote interfaces.
-ignorePackage N/A If this flag is set, EJBGen ignores the package name of the Java files it generates and creates those in the output directory as specified by the -d flag (or in the current directory if no -d was specified).
-jndiPrefix [string] " " The prefix to use for @remoteJndiName and @localJndiName
-jndiSuffix [string] " " The suffix to use for @remoteJndiName and @localJndiName
-localBaseClass [string (className)] N/A The base class for local interfaces.
-localHomeBaseClass [className] N/A The base class for local home interfaces.
-localHomePrefix [string] " " The prefix to use when generating the local EJB class.
-localHomeSuffix [string] LocalHome The suffix to use when generating the local EJB class.
-localPrefix [string] " " The prefix to use when generating the local EJB class.
-localSuffix [string] ( " " The suffix to use when generating the local EJB class.
-noDDGen [boolean] 0 The compiler does not generate the deployment descriptor files.
-noImports [boolean] false Disable propagation of java imports to generated classes.
-noLocalInterfaces N/A If specified, local interfaces are not generated.
-noRedirection noRedirection ejbgen.noRedirection [boolean] N/A Cancels all redirection performed by EJBGen.
-noRemoteInterfaces [boolean] N/A If specified, remote interfaces are not generated.
-noticeFile [file] N/A The path of the file where notices will be redirected.
-noValueClasses [boolean] N/A If specified, value classes will not be generated.
-primaryKeyBaseClass [string (class name)] N/A The base class for generated primary keys.
-printDiagnostic [boolean] N/A Prints a diagnostic of all the tags found by EJBGen
-printTags [boolean] N/A Display all the tags recognized by EJBGen
-propertyFile [fileName] N/A The name of a property file that EJBGen reads to define substitution variables. See Using Property Files with EJBGen.
-remoteBaseClass [string (className)] N/A The base class for remote interfaces.
-remoteHomePrefix [string] " " The prefix to use when generating the remote EJB home class.
-remoteHomeSuffix [string] " " The suffix to use when generating the remote EJB home class.
-remotePrefix [string] " " The prefix to use when generating the remote EJB class.
-remoteSuffix [string] " " The suffix to use when generating the remote EJB class.
-source [version number] 1.5 Version of the JDK to use.
-sourcepath [directory] N/A Directory where the class loader can find dependent classes that are in .java format. To specify more than one source path, separate paths with a semicolon (;).For instance: -sourcePath /dir1;/dir2 If dependent classes are in .class format, use -classPath instead.
-templateDir [directory] N/A The directory where the templates are stored.
-toStringForPrimitivesOnly N/A If specified, the toString() methods of value objects only display container-managed persistence fields that are primitives. This flag fixes the problem of circular references between value objects (AValue.toString() invoking BValue.toString() invoking AValue.toString(), etcetera).
-valueBaseClass [string (class name)] N/A The base class of the value class generated by EJBGen.
-valueObjectPrefix [string] N/A The prefix to use when generating the value object class.
-valueObjectSuffix [string] N/A The suffix to use when generating the value object class.
-valuePackage [string (package name)] N/A Package the value classes belong to.
-verbose [boolean] false Display more information.
-workshopDocTags [boolean] N/A Display the help in Oracle Workshop for WebLogic Platform HTML format.
-xmlEncoding [string] N/A The encoding to use when generating XML files (default: UTF-8).

 

Using Key EJBGen Features

These sections describe key EJBGen features and how to use them:

Controlling the Files EJBGen Generates

By default, EJBGen generates the following files:

You can selectively disable the generation of these files by using the weblogic.ejbgen.FileGeneration tag. This can be done on a per-bean basis.

Using Property Files with EJBGen

EJBGen can gather information for generation from property files, as discussed in this section.

Use the -propertyFile option to tell EJBGen to parse a properties file.

Use the following syntax to invoke EJBGen with the -propertyFile option:

com.bea.wls.ejbgen.EJBGen -propertyFile property-file AccountBean.java

EJBGen recognizes two kinds of variables in a properties file: user variables and predefined variables.

Using User Variables

EJBGen tags can use variables instead of strings. These variables must be enclosed with "${" and "}".

Variables can be used anywhere after an EJBGen tag, so they can contain whole tag definitions.

Using Predefined Variables

EJBGen recognizes a number of predefined variables. These variables are not supposed to be used in tags but EJBGen will use them at various places depending on their role. Recognized variables are:

You can make these variables more specific by prefixing them with an EJBName. For example, consider the following property file.

#

# property-file
#
Account.home.baseClass = BaseAccountHome
home.baseClass = BaseHome
value.package = value
containerManaged.value.package=valuePackageForContainerManaged

All homes generated by EJBGen extend the class BaseHome except the home of EJB “Account”, which extends BaseAccountHome.

Surround Attributes that Contain Spaces With Double Quotes

When you specify an attribute that contains spaces, surround the attribute value with double quotes. For example:

group-names = "group1, group2"

EJBGen Supports Tag Inheritance

One of the main features in EJBGen 2.x is tag inheritance. You inherit EJBGen annotations the same way you do in Java. For example, assume that you have an EJB named AccountEJB with a base class BaseAccount, as in Listing 8-6:

weblogic.ejbgen.JndiName Listing 8-6 Tag Inheritance

@JndiName(remote = "BaseRemote")

public class BaseAccount implements EntityBean {

// ...
}
Now, define your EJB class:
@Entity(ejbName = containerManaged,

tableName = ejbAccounts,
datasourceJndiName = examples-dataSource-demoPool)

//Note that we inherit the JNDI name defined in BaseAccount

public class AccountEJB extends BaseAccount {
// ...

 


Examples of EJBGen Tag Usage

These sections contain example source code annotated with EJBGen tags.

 

Mapping an Entity Bean to Several Tables with EJBGen

By default, entity beans are mapped to one table, with the attribute tableName on the tag @Entity. If you want to map your entity bean to more than one table, you can use the table-name attribute on individual @CmpFields provided the CMP fields are primary key fields that are mapped to corresponding primary key columns in each table. Any container-managed persistence fields that do not have a tableName attribute will use the table specified on @Entity (which can therefore be considered as the “default” table).

If you want to map an entity bean to several tables, you need to specify a comma-separated list of tables in the tableName attribute (and also on a column). Make sure that the number of tables matches the number of columns, and that the columns exist in the corresponding table.

 

Specifying Relationship Caching with EJBGen Tags

You can specify relationship caching elements with the @RelationshipCaching tag. This element can be nested (recursive). In other words, you can specify a tree representing all the relationship elements that you want to see cached.

In order to support this tree structure, @RelationshipCaching has two attributes, id and parentId. These attributes do not correspond to any XML, they simply allow you to specify your tree structure.

For example, if a cachingElement A needs to have two children elements B and C, all you need to specify is an id for A (say “root0”) and a parentId for B and C equal to that name.

Listing 8-7 illustrates specifying relationship caching. Listing 8-7 Specifying Relationship Caching

@RelationshipCachingElements(

@RelationshipCachingElement(cachingName = cacheMoreBeans,
cmrField = employee,
groupName = emp-group,
id = A),
@RelationshipCachingElement(cachingName = cacheMoreBeans,

cmrField = employee_ssn,
groupName = emp-group,
parentId = A),
@RelationshipCachingElement(cachingName = cacheMoreBeans,

cmrField = employee_zip,
groupName = emp-group,
parentId = A)
)

 

Specifying Relationships with EJBGen Tags

Unidirectional relationships are achieved by specifying only the first two parameters of the relation tag (no CMR_field, no join table).

"Join table" was called "joint table" in pre-9.0 releases of WebLogic Server.

Many-to-many relationships must specify an extra table (parameter "join table") which must contain at least two columns. The names of these columns must match the names of the columns containing the foreign keys of the two beans being joined.

Upgrading Relationships to Use Local Interfaces

If you have EJBs based on a version of the EJB 2.0 specification that predates PFD2, update them. As of PFD2, relationships must be based on local interfaces, not remote ones. To upgrade your EJBs:

  1. Add a JNDI name for your local home interface:
    @JndiName
    
    remote = AccountHome
    local = AccountLocalHome

  2. Add @LocalMethod tags to any method you want to see appear on the local home interface. A method can have both @LocalMethod and @RemoteMethod.

  3. Change the return type of your container-managed relationship (CMP) accessing methods to that of the local EJB object (this only applies to single-valued CMR fields since multi-valued CMR fields are collections. Keep in mind that these collections contain Local EJB objects):

    @CmrField

    @RemoteMethod
    @LocalMethod

    abstract public LocalCustomer getCustomer();

 


Enum Attribute Constant Values

The following enum values are used for many of the EJBGen attributes.

 

Constants.Bool

Valid values for Constant.Bool are as follows:

 

Constants.TransactionAttribute

Valid values for Constants.TransactionAttribute are as follows:

 

Constants.IsolationLevel

Valid values for Constants.IsolationLevel are as follows:

 

Constants.RefType

Valid values for Constant.RefType are as follows:

 

Constants.HomeLoadAlgorithm

Valid values for Constants.HomeLoadAlgorithm are as follows:

 

Constants.Interface

Valid values for Contants.Interface are as follows:

 

Constants.ConcurrencyStrategy

Valid values for Constants.ConcurrencyStrategy are as follows:

 


EJBGen Annotation Reference

This section provides a complete reference for the following EJBGen annotations you can use in your bean class file:

 


EJB Container Annotations

The following is a list of container annotations that can only contain an array of annotations.

A single class or method can be annotated by no more than one instance of any annotation.

For more information on an annotation, including the array of annotations it can contain, click the annotation name.

 

weblogic.ejbgen.ActivationConfigProperties

Target: Class

This annotation does not have any attributes, other than the array of weblogic.ejbgen.ActivationConfigProperty annotations.

 

weblogic.ejbgen.ActivationConfigProperty

Target: Class

Attributes

Table E-2 ActivationConfigProperty EJBGen Annotation Attributes
Name Description Data Type Required?
value Property Value. String Yes
name Property name. String Yes

 

weblogic.ejbgen.AutomaticKeyGeneration

Target: Class

Attributes

Table E-3 AutomaticKeyGeneration EJBGen Annotation Attributes
Attribute Description Data Type Required?
type The type of the key generator. Valid values for this attribute are:

  • AutomaticKeyGeneration.AutomaticKeyGenerationType.UNSPECIFIED

  • AutomaticKeyGeneration.AutomaticKeyGenerationType.IDENTITY

  • AutomaticKeyGeneration.AutomaticKeyGenerationType.SEQUENCE

  • AutomaticKeyGeneration.AutomaticKeyGenerationType.SEQUENCE_TABLE
Enum Yes
cacheSize The size of the key cache. The default value of this attribute is UNSPECIFIED. String No (Previously yes)
name The name of the generator. The default value of this attribute is UNSPECIFIED. String No

 

weblogic.ejbgen.CmpField

Target: Method

Attributes

Table E-4 CmpField EJBGen Annotation Attributes
Attribute Description Data Type Required?
column The column where this CMP field will be mapped. See Mapping an Entity Bean to Several Tables with EJBGen. String Yes
readOnlyInValueObject If True, only the getter will be generated for this field in the value object. See Constants.Bool for the list of valid values for this attribute. The default value is Constants.Bool.UNSPECIFIED. Enum ( Constants.Bool) No
tableName The table(s) where this field should be mapped. Mapping an Entity Bean to Several Tables with EJBGen. The default value for this attribute is UNSPECIFIED. String. No
groupNames Comma-delimited names of the groups this field belongs to. Surround the list of group names with double quotes. The default value for this attribute is UNSPECIFIED. String No
orderingNumber The number where this field must appear in signatures and constructors. For this ordering to work, all cmr and cmp fields must set this attribute to a distinct numeric value. The default value for this attribute is 0. String No
excludeFromValueObject If True, this field will not be generated in the value object. See Constants.Bool for the list of valid values for this attribute. The default value is Constants.Bool.UNSPECIFIED. Enum ( Constants.Bool) No
columnType The type of this column.Valid values for this attribute are: CmpField.ColumnType.UNSPECIFIED CmpField.ColumnType.CLOB CmpField.ColumnType.BLOB CmpField.ColumnType.LONG_STRING CmpField.ColumnType.SYBASE_BINARY The default value is CmpField.ColumnType.UNSPECIFIED. Enum No
primkeyField Whether this field is part of the compound primary key. See Constants.Bool for the list of valid values for this attribute. The default value is Constants.Bool.UNSPECIFIED. Enum ( Constants.Bool) No
dbmsDefaultValue Whether this field is the default DBMS value. See Constants.Bool for the list of valid values for this attribute. The default value is Constants.Bool.UNSPECIFIED. Enum ( Constants.Bool) No

 

weblogic.ejbgen.CmrField

Target: Method

Attributes

Table E-5 CmrField EJBGen Annotation Attributes
Attribute Description Data Type Required?
readOnlyInValueObject If True, only the getter will be generated for this field in the value object. See Constants.Bool for the list of valid values for this attribute. The default value is Constants.Bool.UNSPECIFIED. Enum ( Constants.Bool) No
groupNames Comma-delimited names of the groups this field belongs to. Surround the list of group names with double quotes. The default value for this attribute is UNSPECIFIED. String No
orderingNumber The number where this field must appear in signatures and constructors. For this ordering to work, all cmr and cmp fields must have this attribute to a distinct numeric value. The default value for this attribute is UNSPECIFIED. String No
excludeFromValueObject If True, this field will not be generated in the value object. See Constants.Bool for the list of valid values for this attribute. The default value is Constants.Bool.UNSPECIFIED. Enum ( Constants.Bool) No

 

weblogic.ejbgen.Compatibility

Target: Class

Attributes

Table E-6 Compatibility EJBGen Annotation Attributes
Attribute Description Data Type Required?
serializeCharArrayToBytes Whether a cmp-field of type byte[] mapped to a Blob in an Oracle database should be serialized. See Constants.Bool for the list of valid values for this attribute. The default value is Constants.Bool.UNSPECIFIED. Enum ( Constants.Bool) No
disableStringTrimming Whether to disable String trimming. See Constants.Bool for the list of valid values for this attribute. The default value is Constants.Bool.UNSPECIFIED. Enum ( Constants.Bool) No
serializeByteArrayToOracleBlob Whether a cmp-field of type byte[] mapped to an OracleBlob should be serialized. See Constants.Bool for the list of valid values for this attribute. The default value is Constants.Bool.UNSPECIFIED. Enum ( Constants.Bool) No
allowReadonlyCreateAndRemove Whether to allow read only create and remove. See Constants.Bool for the list of valid values for this attribute. The default value is Constants.Bool.UNSPECIFIED. Enum ( Constants.Bool) No
findersReturnNulls Whether to allow finder methods to return null. See Constants.Bool for the list of valid values for this attribute. The default value is Constants.Bool.UNSPECIFIED. Enum ( Constants.Bool) No

 

weblogic.ejbgen.CreateDefaultDbmsTables

This tag is deprecated; use weblogic.ejbgen.JarSettings instead.

 

weblogic.ejbgen.CreateDefaultRdbmsTables

This tag is deprecated; use weblogic.ejbgen.JarSettings instead.

 

weblogic.ejbgen.DBSpecificSQL

Target: Class, Method, Field

Attributes

Table E-7 DBSpecificSQL EJBGen Annotation Attributes
Attribute Description Data Type Required?
databaseType The database type. String Yes
sql The SQL statement. String. Yes

 

weblogic.ejbgen.EjbClientJar

This tag is deprecated; use weblogic.ejbgen.JarSettings instead.

 

weblogic.ejbgen.EjbInterface (deprecated)

This class has been deprecated and will be removed in a future release.

Target: Class

Attributes

Table E-8 EjbInterface EJBGen Annotation Attributes
Attributes Description Data Type Required?
ejbType Specifies the type of this EJB. This tag is not normally used. Valid values are:

  • javax.ejb.MessageDrivenBean

  • javax.ejb.EntityBean

  • javax.ejb.SessionBean
String Yes

 

weblogic.ejbgen.EjbLocalRef

Target: Class

Attributes

Table E-9 EjbLocalRef EJBGen Annotation Attributes
Attributes Description Data Type Required?
jndiName Specifies the JNDI name of the reference. The default value of this attribute is UNSPECIFIED. String No
type Specifies the reference type. See Constants.RefType for the list of valid values for this attribute. The default value is Constants.RefType.UNSPECIFIED. Enum ( Constants.RefType) No
local Names the Local class of the bean. The default value of this attribute is UNSPECIFIED. String No
name Names the reference. The default value of this attribute is UNSPECIFIED. String No
link Names the link of the bean. The default value of this attribute is UNSPECIFIED. String No
id The identity of this tag (used for tag inheritance only). The default value of this attribute is UNSPECIFIED. String No
home Names the Home class of this bean. The default value of this attribute is UNSPECIFIED. String No

 

weblogic.ejbgen.EjbLocalRefs

Target: Class

This annotation does not have any attributes, other than the array of weblogic.ejbgen.EjbLocalRef annotations.

 

weblogic.ejbgen.EjbRef

Target: Class

Attributes

Table E-10 EjbRef EJBGen Annotation Attributes
Attribute Description Data Type Required?
jndiName Specifies the JNDI name of the reference. The default value of this attribute is UNSPECIFIED. String No
type Specifies the reference type. See Constants.RefType for the list of valid values for this attribute. The default value is Constants.RefType.UNSPECIFIED. Enum ( Constants.RefType) No
remote Names the Local class of the bean. The default value of this attribute is UNSPECIFIED. String No
name Names the reference. The default value of this attribute is UNSPECIFIED. String No
link Names the link of the bean. The default value of this attribute is UNSPECIFIED. String No
id The identity of this tag (used for tag inheritance only) The default value of this attribute is UNSPECIFIED. String No
home Names the Home class of this bean. The default value of this attribute is UNSPECIFIED. String No

 

weblogic.ejbgen.EjbRefs

Target: Class

This annotation does not have any attributes, other than the array of weblogic.ejbgen.EjbRef annotations.

 

weblogic.ejbgen.Entity

Target: Class

Attributes

Table E-11 Entity EJBGen Annotation Attributes
Attribute Description Data Type Required?
ejbName The name of this entity bean. String Yes
primKeyClass Names the Java class of the primary key. In case of a compound primary key, this class will be generated by EJBGen. String Yes
tableName Names the table to which this entity bean is mapped. The default value of this attribute is UNSPECIFIED. String No
verifyRows Specifies the rows in a table that should be checked when optimistic concurrency is used. The valid values for this attribute are:

  • Entity.VerifyRows.UNSPECIFIED

  • Entity.VerifyRows.READ

  • Entity.VerifyRows.MODIFIED
The default value is Entity.VerifyRows.UNSPECIFIED.
Enum No
clientsOnSameServer Whether the clients are collocated with the EJB on the same server. See Constants.Bool for the list of valid values for this attribute. The default value is Constants.Bool.UNSPECIFIED. Enum ( Constants.Bool) No
invalidationTarget Targets the ejb-name of a read-only entity bean to be invalidated when this container-managed persistence entity EJB is modified. The default value of this attribute is UNSPECIFIED. String No
useCallerIdentity Determines whether or not this EJB uses the caller's identity. See Constants.Bool for the list of valid values for this attribute. The default value is Constants.Bool.UNSPECIFIED. Enum ( Constants.Bool) No
cacheBetweenTransactions Whether to cache the persistent data of an entity bean across (between) transactions. See Constants.Bool for the list of valid values for this attribute. The default value is Constants.Bool.UNSPECIFIED. Enum ( Constants.Bool) No
defaultDbmsTablesDdl Defines the DDL filename The default value for this attribute is UNSPECIFIED. String No
defaultTransaction Sets the default transaction attribute to be applied to all methods that do not have a transaction attribute setting. See Constants.TransactionAttribute for the list of valid values for this attribute. The default value is Constants.TransactionAttribute.UNSPECIFIED. Enum ( Constants.TransactionAttribute) No
checkExistsOnMethod Whether the container checks for the existence of a bean for each method call. See Constants.Bool for the list of valid values for this attribute. The default value is Constants.Bool.UNSPECIFIED. Enum ( Constants.Bool) No
clusterInvalidationDisabled For an EJB that uses Optimistic or ReadOnly concurrency, specifies whether the EJB is invalidated when it is updated by a member of a cluster to which it is deployed. When true, the container does not send out multicast invalidation messages when such EJBs are updated. See Constants.Bool for the list of valid values for this attribute. The default value is Constants.Bool.UNSPECIFIED Enum ( Constants.Bool) No
optimisticColumn Specifies the column that holds the timestamp for optimistic concurrency. The default value for this attribute is UNSPECIFIED. String No
orderDatabaseOperations Determines whether to sort the database operations. See Constants.Bool for the list of valid values for this attribute. The default value is Constants.Bool.UNSPECIFIED. Enum ( Constants.Bool) No
runAsIdentityPrincipal Deprecated. Use runAsPrincipalName instead. String No
runAsPrincipalName Gives the name of the principal in case the role maps to several principals. The default value for this attribute is UNSPECIFIED. String No
delayDatabaseInsertUntil Specifies until when database inserts should be delayed. Valid values for this attribute are as follows:

  • Entity.DelayDatabaseInsertUntil.UNSPECIFIED

  • Entity.DelayDatabaseInsertUntil.EJB_CREATE

  • Entity.DelayDatabaseInsertUntil.EJB_POST_CREATE
The default value is Entity.DelayDatabaseInsertUntil.UNSPECIFIED.
Enum No
enableCallByReference Whether the container will call this EJB by reference. See Constants.Bool for the list of valid values for this attribute. The default value is Constants.Bool.UNSPECIFIED. Enum ( Constants.Bool) No
validateDbSchemaWith Specifies the method used to validate the tables created by the EJB container. Valid values for this attribute are as follows:

  • Entity.ValidateDBSchemaWith.UNSPECIFIED

  • Entity.ValidateDBSchemaWith.META_DATA

  • Entity.ValidateDBSchemaWith.TABLE_QUERY
The default value is Entity.ValidateDBSchemaWith.UNSPECIFIED.
Enum No
dispatchPolicy Dispatch policy queue for this bean. The default value for this attribute is UNSPECIFIED. String No
remoteClientTimeout Length of time that a remote RMI client will wait before it will time out. The default value of this attribute is UNSPECIFIED String No
lockOrder Sets the database locking order of this bean when a transaction involves multiple beans. The default value of this attribute is UNSPECIFIED. String No
findersLoadBean If set to True, the beans will immediately be loaded into the cache by the finder. See Constants.Bool for the list of valid values for this attribute. The default value is Constants.Bool.UNSPECIFIED. Enum ( Constants.Bool) No
concurrencyStrategy Defines the concurrency strategy for this bean. See Constants.ConcurrencyStrategy for the list of valid values for this attribute. The default value is Constants.ConcurrencyStrategy.UNSPECIFIED. Enum ( Constants.ConcurrencyStrategy) No
persistenceType Sets the type of this Entity bean. Valid values for this attribute are as follows:

  • Entity.PersistenceType.UNSPECIFIED

  • Entity.PersistenceType.CMP

  • Entity.PersistenceType.BMP
The default value is Entity.PersistenceType.UNSPECIFIED
Enum No
maxBeansInCache Sets the maximum number of beans in the cache. Default value of this attribute is UNSPECIFIED String No
primKeyClassNogen If this keyword is specified, EJBGen will not generate the primary key class (it is assumed that you are providing it). See Constants.Bool for the list of valid values for this attribute. The default value is Constants.Bool.UNSPECIFIED. Enum ( Constants.Bool) No
initialBeansInFreePool Specifies the initial number of beans in the free pool. Default value of this attribute is UNSPECIFIED String No
verifyColumns Specifies how optimistic concurrency verifies that the columns have or have not been modified during transactions. The valid values for this attribute are:

  • Entity.VerifyColumns.UNSPECIFIED

  • Entity.VerifyColumns.READ

  • Entity.VerifyColumns.MODIFIED

  • Entity.VerifyColumns.VERSION

  • Entity.VerifyColumns.TIMESTAMP
The default value is Entity.VerifyColumns.UNSPECIFIED.
Enum No
idleTimeoutSeconds Sets the maximum duration an EJB should stay in the cache, in seconds. The default value of this attribute is UNSPECIFIED String No
transTimeoutSeconds Sets the transaction timeout (in seconds). The default value of this attribute is UNSPECIFIED String No
enableBatchOperations Determines whether to perform batch operations. See Constants.Bool for the list of valid values for this attribute. The default value is Constants.Bool.UNSPECIFIED Enum ( Constants.Bool) No
maxBeansInFreePool Specifies the maximum number of beans in the free pool. The default value of this attribute is UNSPECIFIED String No
disableWarning A comma-separated line of warnings to disable when running ejbc. The default value of this attribute is UNSPECIFIED String No
readTimeoutSeconds Sets the number of seconds between each ejbLoad() call on a read-only Entity bean. The default value of this attribute is UNSPECIFIED String No
databaseType Database type of the underlying DBMS. Valid values for this attribute are:

  • Entity.DatabaseType.UNSPECIFIED

  • Entity.DatabaseType.DB2

  • Entity.DatabaseType.INFORMIX

  • Entity.DatabaseType.ORACLE

  • Entity.DatabaseType.SQL_SERVER

  • Entity.DatabaseType.SYBASE

  • Entity.DatabaseType.POINTBASE

  • Entity.DatabaseType.SQL_SERVER200
The default value is Entity.DatabaseType.UNSPECIFIED.
Enum No
reentrant See Constants.Bool for the list of valid values for this attribute. The default value is Constants.Bool.UNSPECIFIED. Enum ( Constants.Bool) No
homeLoadAlgorithm Specifies the algorithm to use for load-balancing between replicas of this home.

See Constants.HomeLoadAlgorithm for the list of valid values for this attribute.

The default value is Constants.HomeLoadAlgorithm.UNSPECIFIED.

Enum ( Constants.HomeLoadAlgorithm) No
delayUpdatesUntilEndOfTx Determines whether updates will be sent after the transaction has been committed. See Constants.Bool for the list of valid values for this attribute. The default value is Constants.Bool.UNSPECIFIED. Enum ( Constants.Bool) No
runAs Specifies the role-name for this EJB. The default value of this attribute is UNSPECIFIED String No
abstractSchemaName Gives the abstract schema name for this EJB. If not specified, the ejb-name value will be used. The default value of this attribute is UNSPECIFIED String No
dbIsShared See Constants.Bool for the list of valid values for this attribute. The default value is Constants.Bool.UNSPECIFIED. Enum ( Constants.Bool) No
enableDynamicQueries Whether dynamic queries are enabled. See Constants.Bool for the list of valid values for this attribute. The default value is Constants.Bool.UNSPECIFIED. Enum ( Constants.Bool) No
homeIsClusterable Determines whether this bean can be deployed from multiple servers in a cluster. See Constants.Bool for the list of valid values for this attribute. The default value is Constants.Bool.UNSPECIFIED. Enum ( Constants.Bool) No
dataSourceName Names the data source declared in config.xml. The default value of this attribute is UNSPECIFIED String No
useSelectForUpdate If true, causes SELECT ... FOR UPDATE to be used whenever the bean is loaded from the database. See Constants.Bool for the list of valid values for this attribute. The default value is Constants.Bool.UNSPECIFIED. Enum ( Constants.Bool) No
instanceLockOrder The locking order for this Entity bean.

  • Valid values for this attribute are:

  • Entity.InstanceLockOrder.UNSPECIFIED

  • Entity.InstanceLockOrder.ACCESS_ORDER

  • Entity.InstanceLockOrder.VALUE_ORDER
The default value is Entity.InstanceLockOrder.UNSPECIFIED.
Enum No
homeCallRouterClassName Names the class to be used for routing home method calls. The default value of this attribute is UNSPECIFIED String No
networkAccessPoint Assigns a custom network channel that the EJB will use for network communications. A network channel defines a set of connection attributes The default value of this attribute is UNSPECIFIED String No
unknownPrimaryKeyField The cmp fields to use as the primary key when the primary key is not specified. The default value of this attribute is UNSPECIFIED String No

 

weblogic.ejbgen.EntityCacheRef

Target: Class

Attributes

Table E-12 EntityCacheRef EJBGen Annotation Attributes
Attribute Description Data Type Required?
concurrencyStrategy Defines the concurrency strategy for this bean. See Constants.ConcurrencyStrategy for valid values for this attribute. Enum ( Constants.ConcurrencyStrategy) Yes
name Names the cache String Yes
idleTimeoutSeconds Maximum duration an EJB should stay in the cache. The default value for this attribute is 0. int No
readTimeoutSeconds The number of seconds between each ejbLoad() call on a read-only entity bean. Default value for this attribute is 0. int No
cacheBetweenTransactions Indicates whether to cache the persistent data of an entity bean across (between) transactions.

See Constants.Bool for the list of valid values for this attribute. The default value is Constants.Bool.UNSPECIFIED.

Enum ( Constants.Bool) No
estimatedBeanSize The estimated average size of the instances of an entity bean, in bytes. Default value for this attribute is UNSPECIFIED. String No

 

weblogic.ejbgen.EnvEntries

Target: Class

This annotation does not have any attributes, other than the array of weblogic.ejbgen.EnvEntry annotations.

 

weblogic.ejbgen.EnvEntry

Target: Class

Attributes

Table E-13 EnvEntry EJBGen Annotation Attributes
Attribute Description Data Type Required?
value Specifies the value for this environment entry. String Yes
type Specifies the Java type for this environment entry (must be fully qualified, even if the type is java.lang). Standard valid values include: java.lang.Boolean, java.lang.String, java.lang.Character, java.lang.Integer, java.lang.Double, java.lang.Byte, java.lang.Short, java.lang.Long, java.lang.Float. String Yes
name Names this environment entry. String Yes

 

weblogic.ejbgen.FileGeneration

Target: Class

Attributes

Table E-14 FileGeneration EJBGen Annotation Attributes
Attribute Description Data Type Required?
pkClass Whether to generate the primary key class for this EJB. See Constants.Bool for the list of valid values for this attribute. The default value is Constants.Bool.TRUE. Enum ( Constants.Bool) No
remoteClassName The name of the remote class to be generated. The default value for this attribute is UNSPECIFIED. String No
remotePackage The package for the remote interface. The default value for this attribute is UNSPECIFIED. String No
valueClass Whether to generate the value class for this EJB. See Constants.Bool for the list of valid values for this attribute. The default value is Constants.Bool.UNSPECIFIED. Enum ( Constants.Bool) No
valueClassName The name of the value class to be generated. The default value for this attribute is UNSPECIFIED. String No
localClassName The name of the local class to be generated. The default value of this attribute is UNSPECIFIED. String No
localPackage The package for the local interface. The default value for this attribute is UNSPECIFIED. String No
remoteHome Whether to generate the remote home interface for this EJB. See Constants.Bool for the list of valid values for this attribute. The default value is Constants.Bool.UNSPECIFIED. Enum ( Constants.Bool) No
localHomePackage The package for the local home interface. The default value for this attribute is UNSPECIFIED. String No
remoteHomePackage The package for the remote home interface. The default value for this attribute is UNSPECIFIED. String No
remoteClass Whether to generate the remote interface for this EJB. See Constants.Bool for the list of valid values for this attribute. The default value is Constants.Bool.UNSPECIFIED. Enum ( Constants.Bool) No
localHomeName The name of the local home class to be generated. The default value for this attribute is UNSPECIFIED. String No
localHome Whether to generate the local home interface for this EJB. See Constants.Bool for the list of valid values for this attribute. The default value is Constants.Bool.UNSPECIFIED. Enum ( Constants.Bool) No
remoteHomeName The name of the remote home class to be generated. The default value for this attribute is UNSPECIFIED. String No
localClass Whether to generate the local interface for this EJB. See Constants.Bool for the list of valid values for this attribute. The default value is Constants.Bool.UNSPECIFIED. Enum ( Constants.Bool) No

 

weblogic.ejbgen.Finder

Target: Class

Attributes

Table E-15 Finder EJBGen Annotation Attributes
Attribute Description Data Type Required?
isolationLevel Specifies the type of transaction isolation for this method. See Constants.IsolationLevel for valid values for this attribute. The default value is Constants.IsolationLevel.UNSPECIFIED. Enum ( Constants.IsolationLevel) No
transactionAttribute Specifies the transaction attribute for this local method. If not specified, the default transaction attribute will be used. Methods with this tag will be generated on the Local class. See Constants.TransactionAttribute for valid values for this attribute. The default value is Constants.TransactionAttribute.UNSPECIFIED. Enum ( Constants.TransactionAttribute) No
generateOn Determines which Home this finder will be generated on. If the value of this attribute is unspecified, the finder will be generated on both the Remote and Local Home. Valid values for this attribute are as folows:

  • Finder.GenerateOn.UNSPECIFIED

  • Finder.GenerateOn.LOCAL

  • Finder.GenerateOn.REMOTE
The default value is Finder.GenerateOn.UNSPECIFIED.
Enum No
comment Defines a comment that will be reproduced above the generated finder Java method. The default value for this attribute is UNSPECIFIED. String No
id The identity of this tag (used for tag inheritance only). The default value for this attribute is UNSPECIFIED. String No
cachingName Name of an eager relationship caching. The default value for this attribute is UNSPECIFIED. String No
groupName Names the group for the WebLogic Server query. The default value for this attribute is UNSPECIFIED. String No
maxElements Specifies the maximum number of elements that should be returned by a multi-valued query. The default value for this attribute is UNSPECIFIED. String No
signature Specifies exactly the signature to be generated on the Home class. EJBGen will add the conformant exceptions, but specify the fully-qualified type of each parameter, even if it belongs to java.lang. The default value for this attribute is UNSPECIFIED. String No
sqlSelectDistinct Determines whether the generated SQL SELECT will contain a DISTINCT qualifier. See Constants.Bool for valid values for this attribute. The default value is Constants.Bool.UNSPECIFIED. Enum ( Constants.Bool) No
includeUpdates Determines whether updates made during the current transaction must be reflected in the result of a query. See Constants.Bool for valid values for this attribute. The default value is Constants.Bool.UNSPECIFIED. Enum ( Constants.Bool) No
ejbQL Specifies the EJB QL request as it will appear in the deployment descriptor. The default value for this attribute is UNSPECIFIED. String No
weblogicEjbQl Specifies the Weblogic Server EJB QL request as it will appear in the deployment descriptor.

If this request is needed, enclose both EJB-QL and Weblogic Server EJB-QL within double quotes.

The default value for this attribute is UNSPECIFIED. String No

 

weblogic.ejbgen.Finders

Target: Class

This annotation does not have any attributes, other than the array of weblogic.ejbgen.Finder annotations.

 

weblogic.ejbgen.ForeignJmsProvider

Target: Class

Attributes

Table E-16 ForeignJmsProvider EJBGen Annotation Attributes
Attribute Description Data Type Required?
connectionFactoryJndiName Specifies the connection factory JNDI name. The default value for this attribute is UNSPECIFIED. String No
providerUrl Specifies the provider URL. Default value for this attribute is UNSPECIFIED. String No
initialContextFactory Specifies the initial JNDI context factory. Default value for this attribute is UNSPECIFIED. String No

 

weblogic.ejbgen.JarSettings

Target: Class

Attributes

Table E-17 JarSettings EJBGen Annotation Attributes
Attribute Description Data Type Required?
createTables Whether to create tables. Valid values for this attribute are:

  • JarSettings.CreateTables.UNSPECIFIED

  • JarSettings.CreateTables.CREATE_ONLY

  • JarSettings.CreateTables.DISABLED

  • JarSettings.CreateTables.DROP_AND_CREATE

  • JarSettings.CreateTables.DROP_AND_CREATE_ALWAYS

  • JarSettings.CreateTables.ALTER_OR_CREATE
The default value is arSettings.CreateTables.UNSPECIFIED.
Enum No
ejbClientJar Name of the client JAR to be generated. If multiple EJBs have this tag, only one of the specified JAR files will be included in the deployment descriptor. The default value of this attribute is UNSPECIFIED. String No
enableBeanClassRedeploy Determines whether this EJB can be redeployed without redeploying the entire module. See Constants.Bool for valid values for this attribute. The default value is Constants.Bool.UNSPECIFIED. Enum ( Constants.Bool) No
disableWarning A comma-separated line of warnings to disable when running ejbc. The default value of this attribute is UNSPECIFIED. String No

 

weblogic.ejbgen.JndiName

Target: Class

Attributes

Table E-18 JndiName EJBGen Annotation Attributes
Attribute Description Data Type Required?
local Local JNDI name of this EJB. If a local JNDI name is not specified, no local interfaces will be generated. The default value of this attribute is UNSPECIFIED. String No
remote Specifies the remote JNDI name of this EJB. If a remote JNDI name is not specified, no remote interfaces will be generated. The default value of this attribute is UNSPECIFIED. String No

 

weblogic.ejbgen.LocalHomeMethod

Target: Method

Attributes

Table E-19 LocalHomeMethod EJBGen Annotation Attrributes
Attribute Description Data Type Required?
orderingNumber Number where this method must appear in the generated class. The default value of this attribute is UNSPECIFIED. String No
isolationLevel Specifies the type of transaction isolation for this method. See Constants.IsolationLevel for valid values for this attribute. The default value is Constants.IsolationLevel.UNSPECIFIED. Enum ( Constants.IsolationLevel) No
transactionAttribute Specifies the transaction attribute for this local method. If not specified, the default transaction attribute will be used. Methods with this tag will be generated on the Local class. See Constants.TransactionAttribute for valid values for this attribute. The default value is Constants.TransactionAttribute.UNSPECIFIED. Enum ( Constants.TransactionAttribute) No
roles Defines a comma-separated list of roles that are allowed to invoke this method. The default value of this attribute is UNSPECIFIED. String No
isIdempotent Sets whether this method is idempotent. See Constants.Bool for valid values for this attribute. The default value is Constants.Bool.UNSPECIFIED. Enum ( Constants.Bool) No
retryCount The number of retries for this method on a rollback. The default value of this attribute is 0. int No

 

weblogic.ejbgen.LocalMethod

Target: Method

Attributes

Table E-20 LocalMethod EJBGen Annotation Attributes
Attribute Description Data Type Required?
orderingNumber Number where this method must appear in the generated class. The default value of this attribute is UNSPECIFIED. String No
isolationLevel Specifies the type of transaction isolation for this method. See Constants.IsolationLevel for valid values for this attribute. The default value is Constants.IsolationLevel.UNSPECIFIED. Enum ( Constants.IsolationLevel) No
transactionAttribute Specifies the transaction attribute for this local method. If not specified, the default transaction attribute will be used. Methods with this tag will be generated on the Local class. See Constants.TransactionAttribute for valid values for this attribute. The default value is Constants.TransactionAttribute.UNSPECIFIED. Enum ( Constants.TransactionAttribute) No
roles Defines a comma-separated list of roles that are allowed to invoke this method. The default value of this attribute is UNSPECIFIED. String No
isIdempotent Sets whether this method is idempotent. See Constants.Bool for valid values for this attribute. The default value is Constants.Bool.UNSPECIFIED. Enum ( Constants.Bool) No
retryCount The number of retries for this method on a rollback. The default value of this attribute is 0. int No

 

weblogic.ejbgen.MessageDestination

Target: Class

Attributes

Table E-21 MessageDestination EJBGen Annotation Attributes
Attribute Description Data Type Required?
name Logical name of the message destination. String Yes
destinationJndiName The JNDI name of the physical message destination The default value of this attribute is UNSPECIFIED. String No
providerUrl The URL of the provider The default value of this attribute is UNSPECIFIED. String No
initialContextFactory The initial context factory The default value of this attribute is UNSPECIFIED. String No

 

weblogic.ejbgen.MessageDestinationRef

Target: Class

Attributes

Table E-22 MessageDestinationRef EJBGen Annotation Attributes
Attribute Description Data Type Required?
messageDestinationType The reference type. String Yes
messageDestinationLink Link to the message destination String Yes
name Name of the reference. String Yes
messageDestinationUsage Usage of the reference. String Yes

 

weblogic.ejbgen.MessageDestinationRefs

Target: Class

This annotation does not have any attributes, other than the array of weblogic.ejbgen.MessageDestinationRef annotations.

 

weblogic.ejbgen.MessageDestinations

Target: Class

This annotation does not have any attributes, other than the array of weblogic.ejbgen.MessageDestination annotations.

 

weblogic.ejbgen.MessageDriven

Target: Class

Attributes

Table E-23 MessageDriven EJBGen Annotation Attributes
Attribute Description Data Type Required?
ejbName Name of this Message-Driven bean. String Yes
destinationJndiName Gives the JNDI name of the destination of this message-driven bean. The default value of this attribute is UNSPECIFIED. String No
destinationType Valid values are javax.jms.Queue and javax.jms.Topic. The default value of this attribute is UNSPECIFIED. String Yes
messageSelector The JMS message selector. The default value of this attribute is UNSPECIFIED. String No
durable If the destinationType is Topic, setting this attribute to True will make the subscription durable. See Constants.Bool for valid values for this attribute. The default value is Constants.Bool.UNSPECIFIED. Enum ( Constants.Bool) No
initialBeansInFreePool Specifies the initial number of beans in the free pool. The default value of this attribute is UNSPECIFIED. String No
clientsOnSameServer Whether the clients are colocated with the EJB on the same server. See Constants.Bool for valid values for this attribute. The default value is Constants.Bool.UNSPECIFIED. Enum ( Constants.Bool) No
jmsPollingIntervalSeconds The number of seconds between each attempt to reconnect to the JMS destination. The default value of this attribute is UNSPECIFIED. String No
removeAsPrincipalName Names the principal to be used when ejbRemove would otherwise run with an anonymous principal. The default value of this attribute is UNSPECIFIED. String No
transactionType Specifies where the transactions for this EJB are managed. Valid values for this attribute are:

  • MessageDriven.MessageDrivenTransactionType.UNSPECIFIED

  • MessageDriven.MessageDrivenTransactionType.BEAN

  • MessageDriven.MessageDrivenTransactionType.CONTAINER
The default value is MessageDriven.MessageDrivenTransactionType.UNSPECIFIED.
Enum No
transTimeoutSeconds Specifies the transaction timeout (in seconds). The default value of this attribute is UNSPECIFIED. String No
useCallerIdentity Whether this EJB uses callers identity. See Constants.Bool for valid values for this attribute. The default value is Constants.Bool.UNSPECIFIED. Enum ( Constants.Bool) No
maxBeansInFreePool Specifies the maximum number of beans in the free pool. The default value of this attribute is UNSPECIFIED. String No
defaultTransaction Specifies the transaction attribute to be applied to all methods that do not have a specific transaction attribute setting. Valid values for this attribute are:

  • MessageDriven.DefaultTransaction.UNSPECIFIED

  • MessageDriven.DefaultTransaction.NOT_SUPPORTED

  • MessageDriven.DefaultTransaction.REQUIRED
The default value is MessageDriven.DefaultTransaction.UNSPECIFIED.
Enum No
runAsIdentityPrincipal Deprecated. Use runAsPrincipalName instead. String No
runAsPrincipalName Gives the name of the principal in case the role maps to several principals. The default value for this attribute is UNSPECIFIED. String No
dispatchPolicy Dispatch policy queue for this bean. The default value of this attribute is UNSPECIFIED. String No
remoteClientTimeout Length of time that a remote RMI client will wait before it will time out. The default value of this attribute is UNSPECIFIED String No
passivateAsPrincipalName Names the principal to be used when ejbPassivate would otherwise run with an anonymous principal. The default value of this attribute is UNSPECIFIED. String No
acknowledgeMode Specifies the acknowledgement mode of this message-driven bean. Valid values for this attribute are:

  • MessageDriven.AcknowledgeMode.UNSPECIFIED

  • MessageDriven.AcknowledgeMode.AUTO_ACKNOWLEDGE

  • MessageDriven.AcknowledgeMode.DUPS_OK_ACKNOWLEDGE
The default value is MessageDriven.AcknowledgeMode.UNSPECIFIED.
Enum No
runAs Specifies the role-name for this EJB. The default value of this attribute is UNSPECIFIED. String No
jmsClientId The client ID of this EJB. The default value of this attribute is UNSPECIFIED. String No
createAsPrincipalName Names the principal to be used when ejbCreate would otherwise run with an anonymous principal. The default value of this attribute is UNSPECIFIED. String No
networkAccessPoint Assigns a custom network channel that the EJB will use for network communications. A network channel defines a set of connection attributes. The default value of this attribute is UNSPECIFIED. String No
messagingType The default value of this attribute is UNSPECIFIED. String No
initSuspendSeconds The initial number of seconds to suspend an MDB's JMS connection when the EJB container detects a JMS resource outage. The default value of this attribute is 0. int No
maxSuspendSeconds Specifies the maximum number of seconds to suspend an MDB's JMS connection when the EJB container detects a JMS resource outage. The default value of this attribute is 0. int No
generateUniqueJmsClientId Indicates whether or not you want the EJB container to generate a unique client-id for every instance of an MDB which makes is easier to deploy durable MDBs to multiple server instances in a WebLogic Server cluster. See Constants.Bool for valid values for this attribute. The default value is Constants.Bool.UNSPECIFIED. Enum ( Constants.Bool) No
durableSubscriptionDeletion Whether you want durable topic subscriptions to be automatically deleted when an MDB is undeployed or removed. See Constants.Bool for valid values for this attribute. The default value is Constants.Bool.UNSPECIFIED. Enum ( Constants.Bool) No
maxMessagesInTransaction The maximum number of messages in the transaction. The default value of this attribute is 0. int No
resourceAdapterJndiName The resource adapter JNDI name. The default value of this attribute is UNSPECIFIED. String No

 

weblogic.ejbgen.MethodIsolationLevelPattern

Target: Class

Attributes

Table E-24 MethodIsolationLevelPattern EJBGen Annotation Attributes
Attribute Description Data Type Required?
isolationLevel Specifies the isolation level for the methods specified in the pattern tag. See Constants.IsolationLevel for valid values for this attribute. Enum ( Constants.IsolationLevel) Yes
pattern Specifies the pattern that matches all methods that will receive this isolation level (e.g. "*"). String Yes
id The identity of this tag (used for tag inheritance only). The default value for this attribute is UNSPECIFIED. String No

 

weblogic.ejbgen.MethodIsolationLevelPatterns

Target: Class

This annotation does not have any attributes, other than the array of weblogic.ejbgen.MethodIsolationLevelPattern annotations.

 

weblogic.ejbgen.MethodPermissionPattern

Target: Class

Attributes

Table E-25 MethodPermissionPattern EJBGen Annotation Attributes
Attribute Description Data Type Required?
pattern Specifies the pattern that matches all methods that will receive this method permission (e.g. "*"). String Yes
roles Specifies the roles for the methods specified in the pattern tag, separated by a comma. String Yes
itf Specifies the interface to which this permission pattern applies. See Constants.Interface for valid values for this attribute. The default value is Constants.Interface.UNSPECIFIED. Enum ( Constants.Interface) No
id The identity of this tag (used for tag inheritance only). The default value for this attribute is UNSPECIFIED. String No
unchecked Whether this pattern will apply to unchecked methods. See Constants.Bool for valid values for this attribute. The default value is Constants.Bool.UNSPECIFIED. Enum ( Constants.Bool) No

 

weblogic.ejbgen.MethodPermissionPatterns

Target: Class

This annotation does not have any values, other than the array of weblogic.ejbgen.MethodPermissionPattern annotations.

 

weblogic.ejbgen.PrimKeyField

This tag is deprecated, use the attribute primkeyField on weblogic.ejbgen.CmpField.

 

weblogic.ejbgen.Relation

Target: Class

Attributes

Table E-26 Relation EJBGen Annotation Attributes
Attribute Description Data Type Required?
multiplicity Sets the multiplicity of the relationship. Valid values for this attribute are:

  • Relation.Multiplicity.UNSPECIFIED

  • Relation.Multiplicity.ONE

  • Relation.Multiplicity.MANY
Enum Yes
name Name of the relationship. Use the same name on both ends of a relationship (this constraint also applies to unidirectional relationships). String Yes
jointTable Deprecated. Oracle recommends that you use joinTable instead. String No
joinTable Only needed in a many-to-many relationship. The name of an existing table that will be used to hold the join table containing the relationships. If you are using a compound primary key, specify a set of corresponding foreign keys separated by a comma. The default value of this attribute is UNSPECIFIED. String No
fkColumn Needed only in a relationship having at least one One side. The non-One side EJB must declare the column that it will use to store the primary key of its counterpart. The default value of this attribute is UNSPECIFIED. String No
roleName The name of this role (such as "ParentHasChildren"). If no role name is given, EJBGen will generate one for you. You must specify a role-name in order to inherit relations. The default value of this attribute is UNSPECIFIED. String No
foreignKeyTable The name of a DBMS table that contains a foreign-key. The default value of this attribute is UNSPECIFIED. String No
primaryKeyTable The name of a DBMS table that contains a primary-key. The default value of this attribute is UNSPECIFIED. String No
cmrField Specifies the CMR field where this relationship will be kept. This field is optional. If it not present, the relationship is unidirectional. The default value of this attribute is UNSPECIFIED. String No
dbCascadeDelete Determines whether a cascade delete will use the built-in cascade delete facilities of the underlying DBMS. See Constants.Bool for valid values for this attribute. The default value is Constants.Bool.UNSPECIFIED. Enum ( Constants.Bool) No
cascadeDelete See Constants.Bool for valid values for this attribute. The default value is Constants.Bool.UNSPECIFIED. Enum ( Constants.Bool) No
targetEjb Specifies the EJB name of the target of this relationship, which is used t generate the role name. If not supplied, a unique string will be generated. The default value of this attribute is UNSPECIFIED. String No
id The identity of this tag (used for tag inheritance only). The default value of this attribute is UNSPECIFIED. String No

 

weblogic.ejbgen.Relations

Target: Class

This annotation does not have any attributes, other than the array of weblogic.ejbgen.Relation annotations.

 

weblogic.ejbgen.RelationshipCachingElement

Target: Class

Attributes

Table E-27 RelationshipCachingElement EJBGen Annotation Attributes
Attribute Description Data Type Required?
cachingName Name of an eager relationship caching. String Yes
cmrField Specifies a comma-separated list of CMR field names. String Yes
groupName Name of the group to be loaded for the CMR field. The default value of this attribute is UNSPECIFIED. String No
parentId Specifies the parent ID of this element. The default value of this attribute is UNSPECIFIED. String No
id The identity of this tag (used for tag inheritance only) The default value of this attribute is UNSPECIFIED. String No

 

weblogic.ejbgen.RelationshipCachingElements

Target: Class

This annotation does not have any attributes, other than the array of weblogic.ejbgen.RelationshipCachingElement annotations.

 

weblogic.ejbgen.RemoteHomeMethod

Target: Method

Attributes

Table E-28 RemoteHomeMethod EJBGen Annotation Attributes
Attribute Description Data Type Required?
orderingNumber Number where this method must appear in the generated class. The default value of this attribute is UNSPECIFIED. String No
isolationLevel Specifies the type of transaction isolation for this method. See Constants.IsolationLevel for valid values for this attribute. The default value is Constants.IsolationLevel.UNSPECIFIED. Enum ( Constants.IsolationLevel) No
transactionAttribute Specifies the transaction attribute for this remote method. If not specified, the default transaction attribute will be used. Methods with this tag will be generated on the Remote class. See Constants.TransactionAttribute for valid values for this attribute. The default value is Constants.TransactionAttribute.UNSPECIFIED. Enum ( Constants.TransactionAttribute) No
roles Defines a comma-separated list of roles that are allowed to invoke this method. The default value of this attribute is UNSPECIFIED. String No
isIdempotent Sets whether this method is idempotent. See Constants.Bool for valid values for this attribute. The default value is Constants.Bool.UNSPECIFIED. Enum ( Constants.Bool) No
retryCount The number of retries for this method on a rollback. The default value of this attribute is 0. int No

 

weblogic.ejbgen.RemoteMethod

Target: Method

Attributes

Table E-29 RemoteMethod EJBGen Annotation Attributes
Attribute Description Data Type Required?
orderingNumber Number where this method must appear in the generated class. The default value of this attribute is UNSPECIFIED. String No
isolationLevel Specifies the type of transaction isolation for this method. See Constants.IsolationLevel for valid values for this attribute. The default value is Constants.IsolationLevel.UNSPECIFIED. Enum ( Constants.IsolationLevel) No
transactionAttribute Specifies the transaction attribute for this remote method. If not specified, the default transaction attribute will be used. Methods with this tag will be generated on the Remote class. See Constants.TransactionAttribute for valid values for this attribute. The default value is Constants.TransactionAttribute.UNSPECIFIED. Enum ( Constants.TransactionAttribute) No
roles Defines a comma-separated list of roles that are allowed to invoke this method. The default value of this attribute is UNSPECIFIED. String No
isIdempotent Sets whether this method is idempotent. See Constants.Bool for valid values for this attribute. The default value is Constants.Bool.UNSPECIFIED. Enum ( Constants.Bool) No
retryCount The number of retries for this method on a rollback. The default value of this attribute is 0. int No

 

weblogic.ejbgen.ResourceEnvRef

Target: Class

Attributes

Table E-30 ResourceEnvRef EJBGen Annotation Attributes
Attribute Description Data Type Required?
type Specifies the type of the environment resource references (e.g., javax.jms.Queue). String Yes
name Names the resource environment reference. String Yes
jndiName Gives the JNDI name of the resource. The default value of this attribute is UNSPECIFIED. String No
id The identity of this tag (used for tag inheritance only). The default value of this attribute is UNSPECIFIED. String No

 

weblogic.ejbgen.ResourceEnvRefs

Target: Class

This annotation does not have any attributes, other than the array of weblogic.ejbgen.ResourceEnvRef annotations.

 

weblogic.ejbgen.ResourceRef

Target: Class

Attributes

Table E-31 ResourceRef EJBGen Annotation Attributes
Attribute Description Data Type Required?
jndiName Specifies the JNDI name of the resource. String Yes
type Specifies the type of the resource (e.g., javax.sql.DataSource). String Yes
auth Valid values for this attribute are:

  • ResourceRef.Auth.UNSPECIFIED

  • ResourceRef.Auth.APPLICATION

  • ResourceRef.Auth.CONTAINER
The default value ResourceRef.Auth.UNSPECIFIED.
Enum No
name Names the resource. String Yes
sharingScope Defines the sharing scope. Valid values for this attribute are:

  • ResourceRef.SharingScope.UNSPECIFIED

  • ResourceRef.SharingScope.SHAREABLE

  • ResourceRef.SharingScope.UNSHAREABLE
The default value ResourceRef.SharingScope.UNSPECIFIED.
Enum No
id The identity of this tag (used for tag inheritance only). The default value of this attribute is UNSPECIFIED. String No

 

weblogic.ejbgen.ResourceRefs

Target: Class

This annotation does not have any attributes, other than the array of weblogic.ejbgen.ResourceRef annotations.

 

weblogic.ejbgen.RoleMapping

Target: Class

Attributes

Table E-32 RoleMapping EJBGen Annotation Attributes
Attribute Description Data Type Required?
roleName Name of the role. String Yes
externallyDefined True if this role is defined externally. See Constants.Bool for valid values for this attribute. The default value is Constants.Bool.UNSPECIFIED.

The externallyDefined attribute must be specified if the principals attribute is not specified.

Enum ( Constants.Bool) (See description) principals Comma separated list of the names of the principals in this role. The default value of this attribute is UNSPECIFIED.

The principals attribute must be specified if the externallyDefined attribute is not specified. String (See description id The identity of this tag (used for tag inheritance only). The default value of this attribute is UNSPECIFIED. String No

 

weblogic.ejbgen.RoleMappings

Target: Class

This annotation does not have any attributes, other than the array of weblogic.ejbgen.RoleMapping annotations.

 

weblogic.ejbgen.SecurityRoleRef

Target: Class

Attributes

Table E-33 SecurityRoleRef EJBGen Annotation Attributes
Attribute Description Data Type Required?
roleName Name of the security role. String Yes
id The identity of this tag (used for tag inheritance only). The default value of this attribute is UNSPECIFIED. String No
roleLink References a defined security role. The default value of this attribute is UNSPECIFIED. String No

 

weblogic.ejbgen.SecurityRoleRefs

Target: Class

This annotation does not have any attributes, other than the array of weblogic.ejbgen.SecurityRoleRef annotations.

 

weblogic.ejbgen.Select

Target: Method

Attributes

Table E-34 Select EJBGen Annotation Attributes
Attribute Description Data Type Required?
cachingName Name of an eager relationship caching. The default value of this attribute is UNSPECIFIED. String No
groupName Names the group for the WebLogic Server query. The default value of this attribute is UNSPECIFIED. String No
maxElements Specifies the maximum number of elements that should be returned by a multi-valued query. The default value of this attribute is UNSPECIFIED. String No
sqlSelectDistinct Determines whether the generated SQL SELECT will contain a DISTINCT qualifier. See Constants.Bool for valid values for this attribute. The default value is Constants.Bool.UNSPECIFIED Enum ( Constants.Bool) No
includeUpdates Determines whether updates made during the current transaction must be reflected in the result of a query. See Constants.Bool for valid values for this attribute. The default value is Constants.Bool.UNSPECIFIED Enum ( Constants.Bool) No
orderingNumber Number where this method must appear in the generated class. The default value of this attribute is UNSPECIFIED. String No
ejbQl Specifies the EJB-QL that defines this select method. The method name must start with ejbSelect. The default value of this attribute is UNSPECIFIED. String No
weblogicEjbQl Specifies the Weblogic Server EJB-QL request as it will appear in the deployment descriptor. Note: if this request is needed, enclose both EJB-QL and Weblogic Server EJB-QL within double quotes. The default value of this attribute is UNSPECIFIED. String No
resultTypeMapping Whether the returned objects are mapped to EJBLocalObject or EJBObject. Valid values for this attribute are:

  • Select.ResultTypeMapping.UNSPECIFIED

  • Select.ResultTypeMapping.LOCAL

  • Select.ResultTypeMapping.REMOTE
The default value is Select.ResultTypeMapping.UNSPECIFIED.
Enum No

 

weblogic.ejbgen.ServiceEndpointMethod

Target: Method

Attributes

Table E-35 ServiceEndpointMethod EJBGen Annotation Attributes
Attribute Description Data Type Required?
transactionAttribute Specifies the Transaction Attribute for a Service Endpoint method of a Stateless Session Bean See Constants.TransactionAttribute for valid values for this attribute. The default value is Constants.TransactionAttribute.UNSPECIFIED Enum ( Constants.TransactionAttribute) No
unchecked Whether this method accessible by everyone See Constants.Bool for valid values for this attribute. The default value is Constants.Bool.UNSPECIFIED Enum ( Constants.Bool) No
roles Specifies a comma-separated list of roles that are allowed to invoke this method. The default value for this attribute is UNSPECIFIED. String No

 

weblogic.ejbgen.ServiceRef

Target: Class

Attributes

Table E-36 ServiceRef EJBGen Annotation Attribute
Attribute Description Data Type Required?
serviceInterface Name of this service in the WSDL file. String Yes

 

weblogic.ejbgen.ServiceRefs

Target: Class

This annotation does not have any attributes, other than the array of weblogic.ejbgen.ServiceRef annotations.

 

weblogic.ejbgen.Session

Target: Class

Attributes

Table E-37 Session EJBGen Annotation Attributes
Attribute Description Data Type Required?
ejbName Names this session bean. String Yes
isClusterable Sets whether this bean is clusterable. See Constants.Bool for valid values for this attribute. The default value is Constants.Bool.UNSPECIFIED Enum ( Constants.Bool) No
replicationType Specifies how to replicate stateful session beans in a cluster. Valid values for this attribute are:

  • Session.ReplicationType.UNSPECIFIED

  • Session.ReplicationType.IN_MEMORY

  • Session.ReplicationType.NONE
The default value Session.ReplicationType.UNSPECIFIED.
Enum No
clientsOnSameServer Whether the clients are colocated with the EJB on the same server. See Constants.Bool for valid values for this attribute. The default value is Constants.Bool.UNSPECIFIED Enum ( Constants.Bool) No
serviceEndpoint The fully-qualified name of the enterprise beans web service endpoint interface. The default value of this attribute is UNSPECIFIED. String No
useCallerIdentity Whether this EJB uses callers identity. See Constants.Bool for valid values for this attribute. The default value is Constants.Bool.UNSPECIFIED. Enum ( Constants.Bool) No
persistentStoreDir Directory in which to store the passivated beans. The default value of this attribute is UNSPECIFIED. String No
callRouterClassName Gives class name to be used for routing home method calls. The default value of this attribute is UNSPECIFIED. String No
defaultTransaction Specifies thetransaction attribute to be applied to all methods that do not have a specific transaction attribute setting. See Constants.TransactionAttribute for valid values for this attribute. The default value is Constants.TransactionAttribute.UNSPECIFIED. Enum ( Constants.TransactionAttribute) No
methodsAreIdempotent Whether the methods for this stateless session bean are idempotent or not. See Constants.Bool for valid values for this attribute. The default value is Constants.Bool.UNSPECIFIED. Enum ( Constants.Bool) No
runAsIdentityPrincipal Deprecated. Use runAsPrincipalName instead. String No
runAsPrincipalName Gives the name of the principal in case the role maps to several principals. The default value for this attribute is UNSPECIFIED. String No
enableCallByReference Whether the container will call this EJB by reference. See Constants.Bool for valid values for this attribute. The default value is Constants.Bool.UNSPECIFIED. Enum ( Constants.Bool) No
dispatchPolicy Dispatch policy queue for this bean. The default value of this attribute is UNSPECIFIED. String No
remoteClientTimeout Length of time that a remote RMI client will wait before it will time out. The default value of this attribute is UNSPECIFIED String No
passivateAsPrincipalName Names the principal to be used when ejbPassivate would otherwise run with an anonymous principal. The default value of this attribute is UNSPECIFIED. String No
maxBeansInCache Specifies the maximum number of beans in the cache. The default value of this attribute is UNSPECIFIED. String No
initialBeansInFreePool Specifies the initial number of beans in the free pool. The default value of this attribute is UNSPECIFIED. String No
allowRemoveDuringTransaction Whether remove() can be invoked during a transaction. See Constants.Bool for valid values for this attribute. The default value is Constants.Bool.UNSPECIFIED. Enum ( Constants.Bool) No
idleTimeoutSeconds Specifies the maximum duration an EJB remains cached. The default value of this attribute is UNSPECIFIED. String No
type Specifies the type of the Session bean. If this attribute is not specified, EJBGen will guess the right type by looking at the ejbCreate() methods on your class. Valid values for this attribute are:

  • Session.SessionType.UNSPECIFIED

  • Session.SessionType.STATELESS

  • Session.SessionType.STATEFUL
The default value Session.SessionType.UNSPECIFIED.
Enum No
removeAsPrincipalName Names the principal to be used when ejbRemove would otherwise run with an anonymous principal. The default value of this attribute is UNSPECIFIED. String No
transTimeoutSeconds Specifies the transaction timeout (in seconds). The default value of this attribute is UNSPECIFIED. String No
transactionType Specifies who manages the transactions for this EJB. Valid values for this attribute are:

  • Session.SessionTransactionType.UNSPECIFIED

  • Session.SessionTransactionType.BEAN

  • Session.SessionTransactionType.CONTAINER
The default value Session.SessionTransactionType.UNSPECIFIED.
Enum No
allowConcurrentCalls Whether to allow concurrent calls on that EJB. See Constants.Bool for valid values for this attribute. The default value is Constants.Bool.UNSPECIFIED. Enum ( Constants.Bool) No
maxBeansInFreePool Specifies the maximum number of beans in the free pool. The default value of this attribute is UNSPECIFIED. String No
sessionTimeoutSeconds Number of seconds an EJB stays alive before being passivated. The default value of this attribute is UNSPECIFIED. String No
beanLoadAlgorithm Specifies the algorithm to be used for load-balancing among replicas of this bean. The default value of this attribute is UNSPECIFIED. String No
homeLoadAlgorithm Specifies the algorithm to use for load-balancing between replicas of this home. See Constants.HomeLoadAlgorithm for valid values for this attribute. The default value is Constants.HomeLoadAlgorithm.UNSPECIFIED. Enum ( Constants.HomeLoadAlgorithm) No
cacheType Specifies the type of the cache for this stateful Session bean. Valid values for this attribute are:

  • Session.CacheType.UNSPECIFIED

  • Session.CacheType.N_R_U

  • Session.CacheType.L_R_U
The default value Session.CacheType.UNSPECIFIED.
Enum No
runAs Specifies the role-name for this EJB. The default value of this attribute is UNSPECIFIED. String No
homeIsClusterable Whether this bean can be deployed from multiple servers in a cluster. See Constants.Bool for valid values for this attribute. The default value is Constants.Bool.UNSPECIFIED. Enum ( Constants.Bool) No
homeCallRouterClassName Names class to be used for routing home method calls. The default value of this attribute is UNSPECIFIED. String No
createAsPrincipalName Names the principal to be used when ejbCreate would otherwise run with an anonymous principal. The default value of this attribute is UNSPECIFIED. String No
networkAccessPoint Assigns a custom network channel that the EJB will use for network communications. A network channel defines a set of connection attributes. The default value of this attribute is UNSPECIFIED. String No

 

weblogic.ejbgen.SqlFinder

Target: Class

Attributes

Table E-38 SqlFinder EJBGen Annotation Attributes
Attribute Description Data Type Required?
sql Specifies the Weblogic Server EJB QL request as it will appear in the deployment descriptor.

If this request is needed, enclose both EJB-QL and Weblogic Server EJB-QL within double quotes.

String Yes signature Specifies exactly the signature to be generated on the Home class. EJBGen will add the conformant exceptions, but specify the fully qualified type of each parameter, even if it belongs to java.lang. String Yes maxElements Specifies the maximum number of elements that should be returned by a multi-valued query. The default value of this attribute is UNSPECIFIED. String No includeUpdates Determines whether updates made during the current transaction must be reflected in the result of a query. See Constants.Bool for valid values for this attribute. The default value is Constants.Bool.UNSPECIFIED. Enum ( Constants.Bool) No isolationLevel Specifies the type of transaction isolation for this method. See Constants.IsolationLevel for valid values for this attribute. The default value is Constants.IsolationLevel.UNSPECIFIED. Enum ( Constants.IsolationLevel) No dbSpecificSql Specifies the Weblogic Server EJB QL request as it will appear in the deployment descriptor. Note: if this request is needed, enclose both EJB-QL and Weblogic Server EJB-QL within double quotes. Valid value for this attribute is an array of weblogic.ejbgen.DBSpecificSQL annotations. The default value is an empty array. Array of weblogic.ejbgen.DBSpecificSQL No sqlShapeName Specifies the EJB QL request as it will appear in the deployment descriptor. The default value of this attribute is UNSPECIFIED. String No transactionAttribute Specifies thetransaction attribute for this local method. If not specified, the default transaction attribute will be used. Methods with this tag will be generated on the Local class. See Constants.TransactionAttribute for valid values for this attribute. The default value is Constants.TransactionAttribute.UNSPECIFIED. Enum ( Constants.TransactionAttribute) No generateOn Determines which Home this finder will be generated on. If unspecified, it will be generated on both. Valid values for this attribute are:

The default value SqlFinder.GenerateOn.UNSPECIFIED. Enum No sqlSelectDistinct Determines whether the generated SQL SELECT will contain a DISTINCT qualifier. See Constants.Bool for valid values for this attribute. The default value is Constants.Bool.UNSPECIFIED. Enum ( Constants.Bool) No enableQueryCaching Controls whether read-only entity EJBs can be cached at the query level. See Constants.Bool for valid values for this attribute. The default value is Constants.Bool.UNSPECIFIED. Enum ( Constants.Bool) No

 

weblogic.ejbgen.SqlFinders

Target: Class

This annotation does not have any attributes, other than the array of weblogic.ejbgen.SqlFinder annotations.

 

weblogic.ejbgen.SqlShape

Target: Class

Attributes

Table E-39 SqlShape EJBGen Annotation Attributes
Attribute Description Data Type Required?
name Specifies exactly the signature to be generated on the Home class. EJBGen will add the conformant exceptions, but specify the fully-qualified type of each parameter, even if it belongs to java.lang. String Yes
relationNames Name of the SQL Shape to use for this finder query The default value of this attribute is an empty array. Array of String No
tables Name of the SQL Shape to use for this finder query. The default value of this attribute is an empty array. Array of weblogic.ejbgen.SqlShapeTable No
passThroughColumns Name of the SQL Shape to use for this finder query The default value of this attribute is 0. int No

 

weblogic.ejbgen.SqlShapeTable

Target: Class, Method, Field

Attributes

Table E-40 SqlShapeTable EJBGen Annotation Attributes
Attribute Description Data Type Required?
name The name of the SQL shape table. String Yes
ejbRelationshipRoleName The name of the relationship role. The default value of this attribute is UNSPECIFIED. String No
columns Database columns. Array of String Yes

 

weblogic.ejbgen.SqlShapes

Target: Class

This annotation does not have any attributes, other than the array of weblogic.ejbgen.SqlShape annotations.

 

weblogic.ejbgen.ValueObject

Target: Class

Attributes

Table E-41 ValueObject EJBGen Annotation Attribute
Attribute Description Data Type Required?
reference Specifies what objects the value object class should reference when accessing other EJBs. Valid values for this attribute are:

  • ValueObject.Reference.UNSPECIFIED

  • ValueObject.Reference.UNSPECIFIED

  • ValueObject.Reference.UNSPECIFIED
Default value is ValueObject.Reference.UNSPECIFIED.
Enum No

 

weblogic.ejbgen.ValueObjectField

Target: Class, Method, Field

Attributes

Table E-42 ValueObjectField EJBGen Annotation Attributes
Attribute Description Data Type Required?
int The default value of this attribute is 0. int No