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:
These sections describe how to process an annotated bean file using EJBGen:
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.
Use this command to run EJBGen on a bean source file:
com.bea.wls.ejbgen.EJBGen
Note:
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
Note:
You can also invoke EJBGen via theejbgen
ant task, which is also included in weblogic.jar
.Table E-1 defines EJBGen command options.
Table E-1 EJBGen Command Options
Option | Default | Definition |
---|---|---|
|
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. |
|
N/A |
Specifies the 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: If dependent classes are in .java format, use |
|
N/A |
The directory under which all the files will be created. |
|
0 |
Tells the compiler to generate only the deployment descriptor files. |
|
N/A |
The directory under which all the descriptor files will be created, relative to the output directory specified with the |
|
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 |
|
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 |
|
N/A |
Same as |
|
" " |
The prefix to use when generating the EJB class. |
|
Bean or EJB |
The suffix to use when generating the EJB class. |
|
N/A |
Make EJBGen less verbose. |
|
N/A |
Verbose mode. |
|
N/A |
The path of the file where errors will be redirected. |
|
N/A |
EJBGen should exit in case of an error. |
|
N/A |
The base class for home remote interfaces. |
|
N/A |
The directory where to extract the templates. |
|
N/A |
Force the generation of all files regardless of time stamps. |
|
N/A |
The base class for home remote interfaces. |
|
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). |
|
" " |
The prefix to use for |
|
" " |
The suffix to use for |
|
N/A |
The base class for local interfaces. |
|
N/A |
The base class for local home interfaces. |
|
" " |
The prefix to use when generating the local EJB class. |
|
LocalHome |
The suffix to use when generating the local EJB class. |
|
" " |
The prefix to use when generating the local EJB class. |
|
" " |
The suffix to use when generating the local EJB class. |
|
0 |
The compiler does not generate the deployment descriptor files. |
|
false |
Disable propagation of java imports to generated classes. |
|
N/A |
If specified, local interfaces are not generated. |
|
N/A |
Cancels all redirection performed by EJBGen. |
|
N/A |
If specified, remote interfaces are not generated. |
|
N/A |
The path of the file where notices will be redirected. |
|
N/A |
If specified, value classes will not be generated. |
|
N/A |
The base class for generated primary keys. |
|
N/A |
Prints a diagnostic of all the tags found by EJBGen |
|
N/A |
Display all the tags recognized by EJBGen |
|
N/A |
The name of a property file that EJBGen reads to define substitution variables. See Using Property Files with EJBGen. |
|
N/A |
The base class for remote interfaces. |
|
" " |
The prefix to use when generating the remote EJB home class. |
|
" " |
The suffix to use when generating the remote EJB home class. |
|
" " |
The prefix to use when generating the remote EJB class. |
|
" " |
The suffix to use when generating the remote EJB class. |
|
1.5 |
Version of the JDK to use. |
|
N/A |
Specifies the 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: If dependent classes are in .class format, use |
|
N/A |
The directory where the templates are stored. |
|
N/A |
If specified, the |
|
N/A |
The base class of the value class generated by EJBGen. |
|
N/A |
The prefix to use when generating the value object class. |
|
N/A |
The suffix to use when generating the value object class. |
|
N/A |
Package the value classes belong to. |
|
false |
Display more information. |
|
N/A |
Display the help in Oracle Workshop for WebLogic Platform HTML format. |
|
N/A |
The encoding to use when generating XML files (default: UTF-8). |
These sections describe key EJBGen features and how to use them:
By default, EJBGen generates the following files:
Remote bean and home interfaces (if weblogic.ejbgen.JndiName with "remote" was specified)
Local bean and home interfaces (if weblogic.ejbgen.JndiName with "local" was specified)
Value object classes
Primary key classes (if applicable)
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.
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.
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.
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:
remote.baseClass
If specified, the value of this variable will be used as the base class for all generated remote classes.
home.baseClass
If specified, the value of this variable will be used as the base class for all generated remote home classes.
local.baseClass
If specified, the value of this variable will be used as the base class for all generated local classes.
localHome.baseClass
If specified, the value of this variable will be used as the base class for all generated local home classes.
value.baseClass
If specified, the value of this variable will be used as the base class for all generated value classes.
value.package
If specified, the value of this variable will be used as the package for all generated value classes.
value.interfaces
If specified, the value of this variable will be used as the interfaces the value class should implement. This variable can be a list of interfaces separated by commas.
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
.
When you specify an attribute that contains spaces, surround the attribute value with double quotes. For example:
group-names = "group1, group2"
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 Example E-1:
weblogic.ejbgen.JndiName
@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 { // ...
These sections contain example source code annotated with EJBGen tags.
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.
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.
Example E-2 illustrates specifying relationship caching.
Example E-2 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) )
Unidirectional relationships are achieved by specifying only the first two parameters of the relation tag (no CMR_field, no join table).
Note:
"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.
If you have EJBs based on a version of the EJB 2.0 specification that predates PFD2, you must update them. As of PFD2, relationships must be based on local interfaces, not remote ones. To upgrade your EJBs:
Add a JNDI name for your local home interface:
@JndiName remote = AccountHome local = AccountLocalHome
Add @LocalMethod
tags to any method you want to see appear on the local home interface. A method can have both @LocalMethod
and @RemoteMethod
.
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();
The following enum values are used for many of the EJBGen attributes.
Valid values for Constant.Bool
are as follows:
Constants.Bool.UNSPECIFIED
Constants.Bool.TRUE
Constants.Bool.FALSE
Valid values for Constants.TransactionAttribute
are as follows:
Constants.TransactionAttribute.UNSPECIFIED
Constants.TransactionAttribute.NOT_SUPPORTED
Constants.TransactionAttribute.SUPPORTS
Constants.TransactionAttribute.REQUIRED
Constants.TransactionAttribute.REQUIRES_NEW
Constants.TransactionAttribute.MANDATORY
Constants.TransactionAttribute.NEVER
Valid values for Constants.IsolationLevel
are as follows:
Constants.IsolationLevel.UNSPECIFIED
Constants.IsolationLevel.TRANSACTION_SERIALIZABLE
Constants.IsolationLevel.TRANSACTION_READ_COMMITTED
Constants.IsolationLevel.TRANSACTION_READ_UNCOMMITTED
Constants.IsolationLevel.TRANSACTION_REPEATABLE_READ
Constants.IsolationLevel.TRANSACTION_READ_COMMITTED_FOR_UPDATE
Valid values for Constant.RefType
are as follows:
Constants.RefType.UNSPECIFIED
Constants.RefType.ENTITY
Constants.RefType.SESSION
Valid values for Constants.HomeLoadAlgorithm
are as follows:
Constants.HomeLoadAlgorithm.UNSPECIFIED
Constants.HomeLoadAlgorithm.ROUND_ROBIN
Constants.HomeLoadAlgorithm.RANDOM
Constants.HomeLoadAlgorithm.WEIGHT_BASED
Constants.HomeLoadAlgorithm.ROUND_ROBIN_AFFINITY
Constants.HomeLoadAlgorithm.RANDOM_AFFINITY
Constants.HomeLoadAlgorithm.WEIGHT_BASED_AFFINITY
Valid values for Contants.Interface
are as follows:
Constants.Interface.UNSPECIFIED
Constants.Interface.HOME
Constants.Interface.REMOTE
Constants.Interface.LOCAL_HOME
Constants.Interface.LOCAL
Valid values for Constants.ConcurrencyStrategy
are as follows:
Constants.ConcurrencyStrategy.UNSPECIFIED
Constants.ConcurrencyStrategy.READ_ONLY
Constants.ConcurrencyStrategy.EXCLUSIVE
Constants.ConcurrencyStrategy.DATABASE
Constants.ConcurrencyStrategy.OPTIMISTIC
This section provides a complete reference for the following EJBGen annotations you can use in your bean class file:
The following is a list of container annotations that can only contain an array of annotations.
Note:
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.
Target: Class
This annotation does not have any attributes, other than the array of weblogic.ejbgen.ActivationConfigProperty
annotations.
Target: Class
Target: Class
Table E-3 AutomaticKeyGeneration EJBGen Annotation Attributes
Attribute | Description | Data Type | Required? |
---|---|---|---|
|
The type of the key generator. Valid values for this attribute are:
|
Enum |
Yes |
|
The size of the key cache. The default value of this attribute is |
String |
No (Previously yes) |
|
The name of the generator. The default value of this attribute is |
String |
No |
Target: Method
Table E-4 CmpField EJBGen Annotation Attributes
Attribute | Description | Data Type | Required? |
---|---|---|---|
|
The column where this CMP field will be mapped. See Mapping an Entity Bean to Several Tables with EJBGen. |
String |
Yes |
|
If See Constants.Bool for valid values for this attribute. The default value is |
Enum ( |
No |
|
The table(s) where this field should be mapped. See Mapping an Entity Bean to Several Tables with EJBGen. The default value for this attribute is |
String. |
No |
|
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 |
String |
No |
|
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 |
String |
No |
|
If See Constants.Bool for valid values for this attribute. The default value is |
Enum ( |
No |
|
The type of this column.Valid values for this attribute are:
The default value is |
Enum |
No |
|
Whether this field is part of the compound primary key. See Constants.Bool for valid values for this attribute. The default value is |
Enum ( |
No |
|
Whether this field is the default DBMS value. See Constants.Bool for valid values for this attribute. The default value is |
Enum ( |
No |
Target: Method
Table E-5 CmrField EJBGen Annotation Attributes
Attribute | Description | Data Type | Required? |
---|---|---|---|
|
If See Constants.Bool for valid values for this attribute. The default value is |
Enum ( |
No |
|
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 |
String |
No |
|
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 |
String |
No |
|
If True, this field will not be generated in the value object. See Constants.Bool for valid values for this attribute. The default value is |
Enum ( |
No |
Target: Class
Table E-6 Compatibility EJBGen Annotation Attributes
Attribute | Description | Data Type | Required? |
---|---|---|---|
|
Whether a cmp-field of type See Constants.Bool for valid values for this attribute. The default value is |
Enum ( |
No |
|
Whether to disable String trimming. See Constants.Bool for valid values for this attribute. The default value is |
Enum ( |
No |
|
Whether a cmp-field of type See Constants.Bool for valid values for this attribute. The default value is |
Enum ( |
No |
|
Whether to allow read only create and remove. See Constants.Bool for valid values for this attribute. The default value is |
Enum ( |
No |
|
Whether to allow finder methods to return null. See Constants.Bool for valid values for this attribute. The default value is |
Enum ( |
No |
This tag is deprecated; use weblogic.ejbgen.JarSettings
instead.
This tag is deprecated; use weblogic.ejbgen.JarSettings
instead.
Target: Class, Method, Field
This tag is deprecated; use weblogic.ejbgen.JarSettings
instead.
Note:
This class has been deprecated and will be removed in a future release.Target: Class
Target: Class
Table E-9 EjbLocalRef EJBGen Annotation Attributes
Attributes | Description | Data Type | Required? |
---|---|---|---|
|
Specifies the JNDI name of the reference. The default value of this attribute is |
String |
No |
|
Specifies the reference type. See Constants.RefType for the list of valid values for this attribute. The default value is |
Enum ( |
No |
|
Names the Local class of the bean. The default value of this attribute is |
String |
No |
|
Names the reference. The default value of this attribute is |
String |
No |
|
Names the link of the bean. The default value of this attribute is |
String |
No |
|
The identity of this tag (used for tag inheritance only). The default value of this attribute is |
String |
No |
|
Names the Home class of this bean. The default value of this attribute is |
String |
No |
Target: Class
This annotation does not have any attributes, other than the array of weblogic.ejbgen.EjbLocalRefs annotations.
Target: Class
Table E-10 EjbRef EJBGen Annotation Attributes
Attribute | Description | Data Type | Required? |
---|---|---|---|
|
Specifies the JNDI name of the reference. The default value of this attribute is |
String |
No |
|
Specifies the reference type. See Constants.RefType for the list of valid values for this attribute. The default value is |
Enum ( |
No |
|
Names the Local class of the bean. The default value of this attribute is |
String |
No |
|
Names the reference. The default value of this attribute is |
String |
No |
|
Names the link of the bean. The default value of this attribute is |
String |
No |
|
The identity of this tag (used for tag inheritance only). The default value of this attribute is |
String |
No |
|
Names the Home class of this bean. The default value of this attribute is |
String |
No |
Target: Class
This annotation does not have any attributes, other than the array of weblogic.ejbgen.EjbRef
annotations.
Target: Class
Table E-11 Entity EJBGen Annotation Attributes
Attribute | Description | Data Type | Required? |
---|---|---|---|
|
The name of this entity bean. |
String |
Yes |
|
Names the Java class of the primary key. In case of a compound primary key, this class will be generated by EJBGen. |
String |
Yes |
|
Names the table to which this entity bean is mapped. The default value of this attribute is |
String |
No |
|
Specifies the rows in a table that should be checked when optimistic concurrency is used. The valid values for this attribute are:
The default value is |
Enum |
No |
|
Specifies whether the clients are collocated with the EJB on the same server. See Constants.Bool for valid values for this attribute. The default value is |
Enum ( |
No |
|
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 |
String |
No |
|
Determines whether or not this EJB uses the caller's identity. See Constants.Bool for valid values for this attribute. The default value is |
Enum ( |
No |
|
Specifies whether to cache the persistent data of an entity bean across (between) transactions. See Constants.Bool for valid values for this attribute. The default value is |
Enum ( |
No |
|
Defines the DDL filename. The default value for this attribute is |
String |
No |
|
Sets the default transaction attribute to be applied to all methods that do not have a transaction attribute setting. See Constants.TransactionAttribute for valid values for this attribute. The default value is |
Enum ( |
No |
|
Specifies whether the container checks for the existence of a bean for each method call. See Constants.Bool for valid values for this attribute. The default value is |
Enum ( |
No |
|
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 See Constants.Bool for valid values for this attribute. The default value is |
Enum ( |
No |
|
Specifies the column that holds the timestamp for optimistic concurrency. The default value for this attribute is |
String |
No |
|
Determines whether to sort the database operations. See Constants.Bool for valid values for this attribute. The default value is |
Enum ( |
No |
|
Deprecated. Use |
String |
No |
|
Gives the name of the principal in case the role maps to several principals. The default value for this attribute is |
String |
No |
|
Specifies until when database inserts should be delayed. Valid values for this attribute are as follows:
The default value is |
Enum |
No |
|
Specifies whether the container will call this EJB by reference. See Constants.Bool for valid values for this attribute. The default value is |
Enum ( |
No |
|
Specifies the method used to validate the tables created by the EJB container. Valid values for this attribute are as follows:
The default value is |
Enum |
No |
|
Specifies the dispatch policy queue for this bean. The default value for this attribute is |
String |
No |
|
Specifies the length of time that a remote RMI client will wait before it will time out. The default value of this attribute is |
String |
No |
|
Sets the database locking order of this bean when a transaction involves multiple beans. The default value of this attribute is |
String |
No |
|
If set to See Constants.Bool for valid values for this attribute. The default value is |
Enum ( |
No |
|
Defines the concurrency strategy for this bean. See Constants.ConcurrencyStrategy for the list of valid values for this attribute. The default value is |
Enum ( |
No |
|
Sets the type of this Entity bean. Valid values for this attribute are as follows:
The default value is |
Enum |
No |
|
Sets the maximum number of beans in the cache. The default value of this attribute is |
String |
No |
|
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 valid values for this attribute. The default value is |
Enum ( |
No |
|
Specifies the initial number of beans in the free pool. Default value of this attribute is |
String |
No |
|
Specifies how optimistic concurrency verifies that the columns have or have not been modified during transactions. The valid values for this attribute are:
The default value is |
Enum |
No |
|
Sets the maximum duration an EJB should stay in the cache, in seconds. The default value of this attribute is |
String |
No |
|
Sets the transaction timeout (in seconds). The default value of this attribute is |
String |
No |
|
Determines whether to perform batch operations. See Constants.Bool for valid values for this attribute. The default value is |
Enum ( |
No |
|
Specifies the maximum number of beans in the free pool. The default value of this attribute is |
String |
No |
|
A comma-separated line of warnings to disable when running ejbc. The default value of this attribute is |
String |
No |
|
Sets the number of seconds between each ejbLoad() call on a read-only Entity bean. The default value of this attribute is |
String |
No |
|
Specifies the database type of the underlying DBMS. Valid values for this attribute are:
The default value is |
Enum |
No |
|
See Constants.Bool for valid values for this attribute. The default value is |
Enum ( |
No |
|
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 |
Enum ( |
No |
|
Determines whether updates will be sent after the transaction has been committed. See Constants.Bool for valid values for this attribute. The default value is |
Enum ( |
No |
|
Specifies the role-name for this EJB. The default value of this attribute is |
String |
No |
|
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 |
String |
No |
|
See Constants.Bool for valid values for this attribute. The default value is |
Enum ( |
No |
|
Specifies whether dynamic queries are enabled. See Constants.Bool for valid values for this attribute. The default value is |
Enum ( |
No |
|
Determines 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 |
Enum ( |
No |
|
Names the data source declared in |
String |
No |
|
If true, causes SELECT ... FOR UPDATE to be used whenever the bean is loaded from the database. See Constants.Bool for valid values for this attribute. The default value is |
Enum ( |
No |
|
The locking order for this Entity bean.
The default value is |
Enum |
No |
|
Names the class to be used for routing home method calls. The default value of this attribute is |
String |
No |
|
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 |
String |
No |
|
The cmp fields to use as the primary key when the primary key is not specified. The default value of this attribute is |
String |
No |
Target: Class
Table E-12 EntityCacheRef EJBGen Annotation Attributes
Attribute | Description | Data Type | Required? |
---|---|---|---|
|
Defines the concurrency strategy for this bean. See Constants.ConcurrencyStrategy for valid values for this attribute. |
Enum ( Constants.ConcurrencyStrategy) |
Yes |
|
Names the cache. |
String |
Yes |
|
Maximum duration an EJB should stay in the cache. The default value for this attribute is |
int |
No |
|
The number of seconds between each |
int |
No |
|
Indicates whether to cache the persistent data of an entity bean across (between) transactions. See Constants.Bool for valid values for this attribute. The default value is |
Enum ( |
No |
|
The estimated average size of the instances of an entity bean, in bytes. The default value for this attribute is |
String |
No |
Target: Class
This annotation does not have any attributes, other than the array of weblogic.ejbgen.EnvEntry
annotations.
Target: Class
Table E-13 EnvEntry EJBGen Annotation Attributes
Attribute | Description | Data Type | Required? |
---|---|---|---|
|
Specifies the value for this environment entry. |
String |
Yes |
|
Specifies the Java type for this environment entry (must be fully qualified, even if the type is java.lang). Standard valid values include:
|
String |
Yes |
|
Names this environment entry. |
String |
Yes |
Target: Class
Table E-14 FileGeneration EJBGen Annotation Attributes
Attribute | Description | Data Type | Required? |
---|---|---|---|
|
Whether to generate the primary key class for this EJB. See Constants.Bool for valid values for this attribute. The default value is |
Enum ( |
No |
|
The name of the remote class to be generated. The default value for this attribute is |
String |
No |
|
The package for the remote interface. The default value for this attribute is |
String |
No |
|
Specifies whether to generate the value class for this EJB. See Constants.Bool for valid values for this attribute. The default value is |
Enum ( |
No |
|
The name of the value class to be generated. The default value for this attribute is |
String |
No |
|
The name of the local class to be generated. The default value of this attribute is |
String |
No |
|
The package for the local interface. The default value for this attribute is |
String |
No |
|
Specifies whether to generate the remote home interface for this EJB. See Constants.Bool for valid values for this attribute. The default value is |
Enum ( |
No |
|
The package for the local home interface. The default value for this attribute is |
String |
No |
|
The package for the remote home interface. The default value for this attribute is |
String |
No |
|
Specifies whether to generate the remote interface for this EJB. See Constants.Bool for valid values for this attribute. The default value is |
Enum ( |
No |
|
The name of the local home class to be generated. The default value for this attribute is |
String |
No |
|
Whether to generate the local home interface for this EJB. See Constants.Bool for valid values for this attribute. The default value is |
Enum ( |
No |
|
The name of the remote home class to be generated. The default value for this attribute is |
String |
No |
|
Whether to generate the local interface for this EJB. See Constants.Bool for valid values for this attribute. The default value is |
Enum ( |
No |
Target: Class
Table E-15 Finder EJBGen Annotation Attributes
Attribute | Description | Data Type | Required? |
---|---|---|---|
|
Specifies the type of transaction isolation for this method. See The default value is |
Enum ( |
No |
|
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 |
Enum ( |
No |
|
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 follows:
The default value is |
Enum |
No |
|
Defines a comment that will be reproduced above the generated finder Java method. The default value for this attribute is |
String |
No |
|
The identity of this tag (used for tag inheritance only). The default value for this attribute is |
String |
No |
|
Specifies the name of an eager relationship caching. The default value for this attribute is |
String |
No |
|
Names the group for the WebLogic Server query. The default value for this attribute is |
String |
No |
|
Specifies the maximum number of elements that should be returned by a multi-valued query. The default value for this attribute is |
String |
No |
|
Specifies exactly the signature to be generated on the Home class. EJBGen will add the conformant exceptions, but you must specify the fully-qualified type of each parameter, even if it belongs to java.lang. The default value for this attribute is |
String |
No |
|
Determines whether the generated SQL SELECT will contain a DISTINCT qualifier. See Constants.Bool for valid values for this attribute. The default value is |
Enum ( |
No |
|
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 |
Enum ( |
No |
|
Specifies the EJB QL request as it will appear in the deployment descriptor. The default value for this attribute is |
String |
No |
|
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 for this attribute is |
String |
No |
Target: Class
This annotation does not have any attributes, other than the array of weblogic.ejbgen.Finder
annotations.
Target: Class
Table E-16 ForeignJmsProvider EJBGen Annotation Attributes
Attribute | Description | Data Type | Required? |
---|---|---|---|
|
Specifies the connection factory JNDI name. The default value for this attribute is |
String |
No |
|
Specifies the provider URL. The default value for this attribute is |
String |
No |
|
Specifies the initial JNDI context factory. The default value for this attribute is |
String |
No |
Target: Class
Table E-17 JarSettings EJBGen Annotation Attributes
Attribute | Description | Data Type | Required? |
---|---|---|---|
|
Specifies whether to create tables. Valid values for this attribute are:
The default value is |
Enum |
No |
|
Specifies the 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 |
String |
No |
|
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 |
Enum ( |
No |
|
A comma-separated line of warnings to disable when running ejbc. The default value of this attribute is |
String |
No |
Target: Class
Table E-18 JndiName EJBGen Annotation Attributes
Attribute | Description | Data Type | Required? |
---|---|---|---|
local |
Specifies the 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 |
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 |
String |
No |
Target: Method
Table E-19 LocalHomeMethod EJBGen Annotation Attributes
Attribute | Description | Data Type | Required? |
---|---|---|---|
|
Specifies the number where this method must appear in the generated class. The default value of this attribute is |
String |
No |
|
Specifies the type of transaction isolation for this method. See Constants.IsolationLevel for valid values for this attribute. The default value is |
Enum ( |
No |
|
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 |
Enum ( |
No |
|
Defines a comma-separated list of roles that are allowed to invoke this method. The default value of this attribute is |
String |
No |
|
Sets whether this method is idempotent. See Constants.Bool for valid values for this attribute. The default value is |
Enum ( |
No |
|
The number of retries for this method on a rollback. The default value of this attribute is |
int |
No |
Target: Method
Table E-20 LocalMethod EJBGen Annotation Attributes
Attribute | Description | Data Type | Required? |
---|---|---|---|
|
Specifies the number where this method must appear in the generated class. The default value of this attribute is |
String |
No |
|
Specifies the type of transaction isolation for this method. See Constants.IsolationLevel for valid values for this attribute. The default value is |
Enum ( |
No |
|
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 |
Enum ( |
No |
|
Defines a comma-separated list of roles that are allowed to invoke this method. The default value of this attribute is |
String |
No |
|
Sets whether this method is idempotent. See Constants.Bool for valid values for this attribute. The default value is |
Enum ( |
No |
|
The number of retries for this method on a rollback. The default value of this attribute is |
int |
No |
Target: Class
Table E-21 MessageDestination EJBGen Annotation Attributes
Attribute | Description | Data Type | Required? |
---|---|---|---|
|
Logical name of the message destination. |
String |
Yes |
|
The JNDI name of the physical message destination. The default value of this attribute is |
String |
No |
|
The URL of the provider. The default value of this attribute is |
String |
No |
|
The initial context factory. The default value of this attribute is |
String |
No |
Target: Class
Table E-22 MessageDestinationRef EJBGen Annotation Attributes
Attribute | Description | Data Type | Required? |
---|---|---|---|
|
The reference type. |
String |
Yes |
|
Link to the message destination. |
String |
Yes |
|
Name of the reference. |
String |
Yes |
|
Usage of the reference. |
String |
Yes |
Target: Class
This annotation does not have any attributes, other than the array of weblogic.ejbgen.MessageDestinationRef
annotations.
Target: Class
This annotation does not have any attributes, other than the array of weblogic.ejbgen.MessageDestination
annotations.
Target: Class
Table E-23 MessageDriven EJBGen Annotation Attributes
Attribute | Description | Data Type | Required? |
---|---|---|---|
|
Specifies the name of this Message-Driven bean. |
String |
Yes |
|
Gives the JNDI name of the destination of this message-driven bean. The default value of this attribute is |
String |
No |
|
Valid values are |
String |
Yes |
|
The JMS message selector. The default value of this attribute is |
String |
No |
|
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 |
Enum ( |
No |
|
Specifies the initial number of beans in the free pool. The default value of this attribute is |
String |
No |
|
Specifies whether the clients are collocated with the EJB on the same server. See Constants.Bool for valid values for this attribute. The default value is |
Enum ( |
No |
|
The number of seconds between each attempt to reconnect to the JMS destination. The default value of this attribute is |
String |
No |
|
Names the principal to be used when ejbRemove would otherwise run with an anonymous principal. The default value of this attribute is |
String |
No |
|
Specifies where the transactions for this EJB are managed. Valid values for this attribute are:
The default value is |
Enum |
No |
|
Specifies the transaction timeout (in seconds). The default value of this attribute is |
String |
No |
|
Specifies whether this EJB uses callers identity. See Constants.Bool for valid values for this attribute. The default value is |
Enum ( |
No |
|
Specifies the maximum number of beans in the free pool. The default value of this attribute is |
String |
No |
|
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:
The default value is |
Enum |
No |
|
Deprecated. Use |
String |
No |
|
Gives the name of the principal in case the role maps to several principals. The default value for this attribute is |
String |
No |
|
Specifies the dispatch policy queue for this bean. The default value of this attribute is |
String |
No |
|
Specifies the length of time that a remote RMI client will wait before it will time out. The default value of this attribute is |
String |
No |
|
Names the principal to be used when ejbPassivate would otherwise run with an anonymous principal. The default value of this attribute is |
String |
No |
|
Specifies the acknowledgement mode of this message-driven bean. Valid values for this attribute are:
The default value is |
Enum |
No |
|
Specifies the role-name for this EJB. The default value of this attribute is |
String |
No |
|
The client ID of this EJB. The default value of this attribute is |
String |
No |
|
Names the principal to be used when ejbCreate would otherwise run with an anonymous principal. The default value of this attribute is |
String |
No |
|
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 |
String |
No |
|
The default value of this attribute is |
String |
No |
|
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 |
int |
No |
|
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 |
int |
No |
|
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 |
Enum ( |
No |
|
Specifies 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 |
Enum ( |
No |
|
The maximum number of messages in the transaction. The default value of this attribute is |
int |
No |
|
The resource adapter JNDI name. The default value of this attribute is |
String |
No |
Target: Class
Table E-24 MethodIsolationLevelPattern EJBGen Annotation Attributes
Attribute | Description | Data Type | Required? |
---|---|---|---|
|
Specifies the isolation level for the methods specified in the pattern tag. See |
Enum ( |
Yes |
|
Specifies the pattern that matches all methods that will receive this isolation level (e.g. "*"). |
String |
Yes |
|
The identity of this tag (used for tag inheritance only). The default value for this attribute is |
String |
No |
Target: Class
This annotation does not have any attributes, other than the array of weblogic.ejbgen.MethodIsolationLevelPattern
annotations.
Target: Class
Table E-25 MethodPermissionPattern EJBGen Annotation Attributes
Attribute | Description | Data Type | Required? |
---|---|---|---|
|
Specifies the pattern that matches all methods that will receive this method permission (e.g. "*"). |
String |
Yes |
|
Specifies the roles for the methods specified in the pattern tag, separated by a comma. |
String |
Yes |
|
Specifies the interface to which this permission pattern applies. See Constants.Interface for valid values for this attribute. The default value is |
Enum ( |
No |
|
The identity of this tag (used for tag inheritance only). The default value for this attribute is |
String |
No |
|
Specifies whether this pattern will apply to unchecked methods. See Constants.Bool for valid values for this attribute. The default value is |
Enum ( |
No |
Target: Class
This annotation does not have any values, other than the array of weblogic.ejbgen.MethodPermissionPattern
annotations.
This tag is deprecated, use the attribute primkeyField on weblogic.ejbgen.CmpField
.
Target: Class
Table E-26 Relation EJBGen Annotation Attributes
Attribute | Description | Data Type | Required? |
---|---|---|---|
|
Sets the multiplicity of the relationship. Valid values for this attribute are:
|
Enum |
Yes |
|
Specifies the name of the relationship. Use the same name on both ends of a relationship (this constraint also applies to unidirectional relationships). |
String |
Yes |
|
Deprecated. Oracle recommends that you use |
String |
No |
|
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 |
String |
No |
|
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 |
String |
No |
|
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 |
String |
No |
|
The name of a DBMS table that contains a foreign-key. The default value of this attribute is |
String |
No |
|
The name of a DBMS table that contains a primary-key. The default value of this attribute is |
String |
No |
|
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 |
String |
No |
|
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 |
Enum ( |
No |
|
See Constants.Bool for valid values for this attribute. The default value is |
Enum ( |
No |
|
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 |
String |
No |
|
The identity of this tag (used for tag inheritance only). The default value of this attribute is |
String |
No |
Target: Class
This annotation does not have any attributes, other than the array of weblogic.ejbgen.Relation
annotations.
Target: Class
Table E-27 RelationshipCachingElement EJBGen Annotation Attributes
Attribute | Description | Data Type | Required? |
---|---|---|---|
|
Specifies the name of an eager relationship caching. |
String |
Yes |
|
Specifies a comma-separated list of CMR field names. |
String |
Yes |
|
Specifies the name of the group to be loaded for the CMR field. The default value of this attribute is |
String |
No |
|
Specifies the parent ID of this element. The default value of this attribute is |
String |
No |
|
The identity of this tag (used for tag inheritance only). The default value of this attribute is |
String |
No |
Target: Class
This annotation does not have any attributes, other than the array of weblogic.ejbgen.RelationshipCachingElement
annotations.
Target: Method
Table E-28 RemoteHomeMethod EJBGen Annotation Attributes
Attribute | Description | Data Type | Required? |
---|---|---|---|
|
Specifies the number where this method must appear in the generated class. The default value of this attribute is |
String |
No |
|
Specifies the type of transaction isolation for this method. See Constants.IsolationLevel for valid values for this attribute. The default value is |
Enum ( |
No |
|
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 |
Enum ( |
No |
|
Defines a comma-separated list of roles that are allowed to invoke this method. The default value of this attribute is |
String |
No |
|
Sets whether this method is idempotent. See Constants.Bool for valid values for this attribute. The default value is |
Enum ( |
No |
|
The number of retries for this method on a rollback. The default value of this attribute is |
int |
No |
Target: Method
Table E-29 RemoteMethod EJBGen Annotation Attributes
Attribute | Description | Data Type | Required? |
---|---|---|---|
|
Specifies the number where this method must appear in the generated class. The default value of this attribute is |
String |
No |
|
Specifies the type of transaction isolation for this method. See Constants.IsolationLevel for valid values for this attribute. The default value is |
Enum ( |
No |
|
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 |
Enum ( |
No |
|
Defines a comma-separated list of roles that are allowed to invoke this method. The default value of this attribute is |
String |
No |
|
Sets whether this method is idempotent. See Constants.Bool for valid values for this attribute. The default value is |
Enum ( |
No |
|
The number of retries for this method on a rollback. The default value of this attribute is |
int |
No |
Target: Class
Table E-30 ResourceEnvRef EJBGen Annotation Attributes
Attribute | Description | Data Type | Required? |
---|---|---|---|
|
Specifies the type of the environment resource references (e.g., |
String |
Yes |
|
Names the resource environment reference. |
String |
Yes |
|
Gives the JNDI name of the resource. The default value of this attribute is |
String |
No |
|
The identity of this tag (used for tag inheritance only). The default value of this attribute is |
String |
No |
Target: Class
This annotation does not have any attributes, other than the array of weblogic.ejbgen.ResourceEnvRef
annotations.
Target: Class
Table E-31 ResourceRef EJBGen Annotation Attributes
Attribute | Description | Data Type | Required? |
---|---|---|---|
|
Specifies the JNDI name of the resource. |
String |
Yes |
|
Specifies the type of the resource (e.g., javax.sql.DataSource). |
String |
Yes |
|
Valid values for this attribute are:
The default value |
Enum |
No |
|
Names the resource. |
String |
Yes |
|
Defines the sharing scope. Valid values for this attribute are:
The default value |
Enum |
No |
|
The identity of this tag (used for tag inheritance only). The default value of this attribute is |
String |
No |
Target: Class
This annotation does not have any attributes, other than the array of weblogic.ejbgen.ResourceRef
annotations.
Target: Class
Table E-32 RoleMapping EJBGen Annotation Attributes
Attribute | Description | Data Type | Required? |
---|---|---|---|
|
Specifies the name of the role. |
String |
Yes |
|
See Constants.Bool for valid values for this attribute. The default value is Note: The |
Enum ( |
(See description) |
|
Comma separated list of the names of the principals in this role. The default value of this attribute is Note: The |
String |
(See description |
|
The identity of this tag (used for tag inheritance only). The default value of this attribute is |
String |
No |
Target: Class
This annotation does not have any attributes, other than the array of weblogic.ejbgen.RoleMapping
annotations.
Target: Class
Table E-33 SecurityRoleRef EJBGen Annotation Attributes
Attribute | Description | Data Type | Required? |
---|---|---|---|
|
Specifies the name of the security role. |
String |
Yes |
|
The identity of this tag (used for tag inheritance only). The default value of this attribute is |
String |
No |
|
References a defined security role. The default value of this attribute is |
String |
No |
Target: Class
This annotation does not have any attributes, other than the array of weblogic.ejbgen.SecurityRoleRef
annotations.
Target: Method
Table E-34 Select EJBGen Annotation Attributes
Attribute | Description | Data Type | Required? |
---|---|---|---|
|
Specifies the name of an eager relationship caching. The default value of this attribute is |
String |
No |
|
Names the group for the WebLogic Server query. The default value of this attribute is |
String |
No |
|
Specifies the maximum number of elements that should be returned by a multi-valued query. The default value of this attribute is |
String |
No |
|
Determines whether the generated SQL SELECT will contain a DISTINCT qualifier. See Constants.Bool for valid values for this attribute. The default value is |
Enum ( |
No |
|
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 |
Enum ( |
No |
|
Specifies the number where this method must appear in the generated class. The default value of this attribute is |
String |
No |
|
Specifies the EJB-QL that defines this select method. The method name must start with ejbSelect. The default value of this attribute is |
String |
No |
|
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 |
String |
No |
|
Specifies whether the returned objects are mapped to EJBLocalObject or EJBObject. Valid values for this attribute are:
The default value is |
Enum |
No |
Target: Method
Table E-35 ServiceEndpointMethod EJBGen Annotation Attributes
Attribute | Description | Data Type | Required? |
---|---|---|---|
|
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 |
Enum ( |
No |
|
Specifies whether this method accessible by everyone See Constants.Bool for valid values for this attribute. The default value is |
Enum ( |
No |
|
Specifies a comma-separated list of roles that are allowed to invoke this method. The default value for this attribute is |
String |
No |
Target: Class
Target: Class
This annotation does not have any attributes, other than the array of weblogic.ejbgen.ServiceRef
annotations.
Target: Class
Table E-37 Session EJBGen Annotation Attributes
Attribute | Description | Data Type | Required? |
---|---|---|---|
|
Names this session bean. |
String |
Yes |
|
Sets whether this bean is clusterable. See Constants.Bool for valid values for this attribute. The default value is |
Enum ( |
No |
|
Specifies how to replicate stateful session beans in a cluster. Valid values for this attribute are:
The default value |
Enum |
No |
|
Specifies whether the clients are collocated with the EJB on the same server. See Constants.Bool for valid values for this attribute. The default value is |
Enum ( |
No |
|
The fully-qualified name of the enterprise beans web service endpoint interface. The default value of this attribute is |
String |
No |
|
Specifies whether this EJB uses callers identity. See Constants.Bool for valid values for this attribute. The default value is |
Enum ( |
No |
|
Specifies the directory in which to store the passivated beans. The default value of this attribute is |
String |
No |
|
Gives class name to be used for routing home method calls. The default value of this attribute is |
String |
No |
|
Specifies the transaction 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 |
Enum ( |
No |
|
Specifies 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 |
Enum ( |
No |
|
Deprecated. Use |
String |
No |
|
Gives the name of the principal in case the role maps to several principals. The default value for this attribute is |
String |
No |
|
Specifies whether the container will call this EJB by reference. See Constants.Bool for valid values for this attribute. The default value is |
Enum ( |
No |
|
Specifies the dispatch policy queue for this bean. The default value of this attribute is |
String |
No |
|
Specifies the length of time that a remote RMI client will wait before it will time out. The default value of this attribute is |
String |
No |
|
Names the principal to be used when ejbPassivate would otherwise run with an anonymous principal. The default value of this attribute is |
String |
No |
|
Specifies the maximum number of beans in the cache. The default value of this attribute is |
String |
No |
|
Specifies the initial number of beans in the free pool. The default value of this attribute is |
String |
No |
|
Specifies whether See Constants.Bool for valid values for this attribute. The default value is |
Enum ( |
No |
|
Specifies the maximum duration an EJB remains cached. The default value of this attribute is |
String |
No |
|
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:
The default value |
Enum |
No |
|
Names the principal to be used when The default value of this attribute is |
String |
No |
|
Specifies the transaction timeout (in seconds). The default value of this attribute is |
String |
No |
|
Specifies who manages the transactions for this EJB. Valid values for this attribute are:
The default value |
Enum |
No |
|
Specifies whether to allow concurrent calls on that EJB. See Constants.Bool for valid values for this attribute. The default value is |
Enum ( |
No |
|
Specifies the maximum number of beans in the free pool. The default value of this attribute is |
String |
No |
|
Specifies the number of seconds an EJB stays alive before being passivated. The default value of this attribute is |
String |
No |
|
Specifies the algorithm to be used for load-balancing among replicas of this bean. The default value of this attribute is |
String |
No |
|
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 |
Enum ( |
No |
|
Specifies the type of the cache for this stateful Session bean. Valid values for this attribute are:
The default value |
Enum |
No |
|
Specifies the role-name for this EJB. The default value of this attribute is |
String |
No |
|
Specifies 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 |
Enum ( |
No |
|
Names class to be used for routing home method calls. The default value of this attribute is |
String |
No |
|
Names the principal to be used when ejbCreate would otherwise run with an anonymous principal. The default value of this attribute is |
String |
No |
|
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 |
String |
No |
Target: Class
Table E-38 SqlFinder EJBGen Annotation Attributes
Attribute | Description | Data Type | Required? |
---|---|---|---|
|
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. |
String |
Yes |
|
Specifies exactly the signature to be generated on the Home class. EJBGen will add the conformant exceptions, but you must specify the fully qualified type of each parameter, even if it belongs to java.lang. |
String |
Yes |
|
Specifies the maximum number of elements that should be returned by a multi-valued query. The default value of this attribute is |
String |
No |
|
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 |
Enum ( |
No |
|
Specifies the type of transaction isolation for this method. See Constants.IsolationLevel for valid values for this attribute. The default value is |
Enum ( |
No |
|
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 |
No |
|
Specifies the EJB QL request as it will appear in the deployment descriptor. The default value of this attribute is |
String |
No |
|
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 |
Enum ( |
No |
|
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 |
Enum |
No |
|
Determines whether the generated See Constants.Bool for valid values for this attribute. The default value is |
Enum ( |
No |
|
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 |
Enum ( |
No |
Target: Class
This annotation does not have any attributes, other than the array of weblogic.ejbgen.SqlFinder
annotations.
Target: Class
Table E-39 SqlShape EJBGen Annotation Attributes
Attribute | Description | Data Type | Required? |
---|---|---|---|
|
Specifies exactly the signature to be generated on the Home class. EJBGen will add the conformant exceptions, but you must specify the fully-qualified type of each parameter, even if it belongs to java.lang. |
String |
Yes |
|
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 |
|
Name of the SQL Shape to use for this finder query. The default value of this attribute is an empty array. |
Array of |
No |
|
Name of the SQL Shape to use for this finder query. The default value of this attribute is |
int |
No |
Target: Class, Method, Field
Table E-40 SqlShapeTable EJBGen Annotation Attributes
Attribute | Description | Data Type | Required? |
---|---|---|---|
|
The name of the SQL shape table. |
String |
Yes |
|
The name of the relationship role. The default value of this attribute is |
String |
No |
|
Database columns. |
Array of String |
Yes |
Target: Class
This annotation does not have any attributes, other than the array of weblogic.ejbgen.SqlShape
annotations.
Target: Class
Table E-41 ValueObject EJBGen Annotation Attribute
Attribute | Description | Data Type | Required? |
---|---|---|---|
|
Specifies what objects the value object class should reference when accessing other EJBs. Valid values for this attribute are:
Default value is |
Enum |
No |
Target: Class, Method, Field