Programming WebLogic Enterprise JavaBeans
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
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.
BEA recommends that you use EJBGen to generate deployment descriptors; this BEA 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 BEA WebLogic Server 9.0 examples, see WL_HOME\samples\server\examples\src\examples\ejb20\ and WL_HOME\samples\server\examples\src\examples\ejb21\
for an application that uses EJBGen.
Use this command to run EJBGen on a bean source file:
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 the ejbgen
ant task, which is also included in weblogic.jar
.
Table E-1 defines EJBGen command options.
Table E-1 EJBGen Command Options
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. |
||
The directory under which all the descriptor files will be created, relative to the output directory specified with the -d [directory] option. |
||
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 |
||
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 |
||
Force the generation of all files regardless of time stamps. |
||
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). |
||
If this flag is set, EJBGen will generate deployment descriptors compatible with the Public Final Draft 1 of the EJB 2.0 specification. You should use this flag if you are using any WebLogic Server version earlier than 6.1. |
||
If this flag is set, EJBGen will generate deployment descriptors compatible with the Public Final Draft 2 of the EJB 2.0 specification. You should use this flag if you are using any WebLogic Server version earlier than 6.1. |
||
The name of a property file that EJBGen reads to define substitution variables. See Using Property Files with EJBGen. |
||
The prefix to use when generating the remote EJB home class. |
||
The suffix to use when generating the remote EJB home class. |
||
If specified, the |
||
Use this flag to specify that EJBGen generate WebLogic Server 7.0 deployment descriptors. |
||
Use this flag to specify that EJBGen generate WebLogic Server 7.0 DTD-based deployment descriptors. |
||
Use this flag to specify that EJBGen generate WebLogic Server 7.1 DTD-based deployment descriptors. |
||
Use this flag to specify that EJBGen generate WebLogic Server 8.1 DTD-based deployment descriptors. |
||
Use this flag to specify that EJBGen generate WebLogic Server 9.0 XSD-based deployment descriptors. |
||
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:
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
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
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 Listing 8-6:
/***
@JndiName(remote = "BaseRemote")
*/
public class BaseAccount implements EntityBean {
// ...
}
/**
*
@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
. All the 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.
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)
* )
Unidirectional relationships are achieved by specifying only the first two parameters of the relation tag (no CMR_field, no joint table).
Many-to-many relationships must specify an extra table (parameter "joint 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:
@JndiName
remote = AccountHome
local = AccountLocalHome
@LocalMethod
tags to any method you want to see appear on the local home interface. A method can have both @LocalMethod
and @RemoteMethod
./
**
* @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:
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:
Valid values for Constant.RefType
are as follows:
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.
This annotation does not have any attributes, other than the array of weblogic.ejbgen.ActivationConfigProperty annotations.
The column where this CMP field will be mapped. See Mapping an Entity Bean to Several Tables with EJBGen. |
|||
If See Constants.Bool for the list of valid values for this attribute. |
Enum (Constants.Bool) |
||
The table(s) where this field should be mapped. Mapping an Entity Bean to Several Tables with EJBGen. |
|||
Comma-delimited names of the groups this field belongs to. Surround the list of group names with double quotes. |
|||
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. |
|||
If See Constants.Bool for the list of valid values for this attribute. |
Enum (Constants.Bool) |
||
The type of this column.Valid values for this attribute are:
|
|||
Whether this field is part of the compound primary key. See Constants.Bool for the list of valid values for this attribute. |
Enum (Constants.Bool) |
||
Whether this field is the default DBMS value. See Constants.Bool for the list of valid values for this attribute. The default value is |
Enum (Constants.Bool) |
If See Constants.Bool for the list of valid values for this attribute. The default value is |
Enum (Constants.Bool) |
||
Comma-delimited names of the groups this field belongs to. Surround the list of group names with double quotes. |
|||
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. |
|||
If True, this field will not be generated in the value object. See Constants.Bool for the list of valid values for this attribute. |
Enum (Constants.Bool) |
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. |
Enum (Constants.Bool) |
||
Whether to disable String trimming. See Constants.Bool for the list of valid values for this attribute. |
Enum (Constants.Bool) |
||
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. |
Enum (Constants.Bool) |
||
Whether to allow read only create and remove. See Constants.Bool for the list of valid values for this attribute. |
Enum (Constants.Bool) |
||
Whether to allow finder methods to return null. See Constants.Bool for the list of valid values for this attribute. |
Enum (Constants.Bool) |
This tag is deprecated; use weblogic.ejbgen.JarSettings instead.
This tag is deprecated; use weblogic.ejbgen.JarSettings instead.
This tag is deprecated; use weblogic.ejbgen.JarSettings instead.
See Constants.RefType for the list of valid values for this attribute. |
Enum (Constants.RefType) |
||
This annotation does not have any attributes, other than the array of weblogic.ejbgen.EjbLocalRef annotations.
See Constants.RefType for the list of valid values for this attribute. |
Enum (Constants.RefType) |
||
This annotation does not have any attributes, other than the array of weblogic.ejbgen.EjbRef annotations.
Names the Java class of the primary key. In case of a compound primary key, this class will be generated by EJBGen. |
|||
Specifies the rows in a table that should be checked when optimistic concurrency is used. |
|||
Specifies whether the clients are collocated with the EJB on the same server. See Constants.Bool for the list of valid values for this attribute. |
Enum (Constants.Bool) |
||
Targets the ejb-name of a read-only entity bean to be invalidated when this container-managed persistence entity EJB is modified. |
|||
Determines whether or not this EJB uses the callers identity. See Constants.Bool for the list of valid values for this attribute. |
Enum (Constants.Bool) |
||
Specifies 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. |
Enum (Constants.Bool) |
||
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 |
|||
Specifies 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. |
Enum (Constants.Bool) |
||
Specifies the column that holds the timestamp for optimistic concurrency. |
|||
Determines whether to sort the database operations. See Constants.Bool for the list of valid values for this attribute. |
Enum (Constants.Bool) |
||
Gives the name of the principal in case the role maps to several principals |
|||
Specifies until when database inserts should be delayed. Valid values for this attribute are as follows: The default value is |
|||
Specifies whether the container will call this EJB by reference. See Constants.Bool for the list of valid values for this attribute. |
Enum (Constants.Bool) |
||
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 |
|||
Sets the database locking order of this bean when a transaction involves multiple beans. |
|||
If set to See Constants.Bool for the list of valid values for this attribute. |
Enum (Constants.Bool) |
||
Defines the concurrency strategy for this bean. See Constants.ConcurrencyStrategy for the list of valid values for this attribute. The default value is |
|||
Sets the type of this Entity bean. |
|||
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. |
Enum (Constants.Bool) |
||
Specifies how optimistic concurrency verifies that the columns have or have not been modified during transactions. |
|||
Sets the maximum duration an EJB should stay in the cache, in seconds. |
|||
Determines whether to perform batch operations. See Constants.Bool for the list of valid values for this attribute. |
Enum (Constants.Bool) |
||
A comma-separated line of warnings to disable when running ejbc. |
|||
Sets the number of seconds between each ejbLoad() call on a read-only Entity bean. |
|||
Specifies the database type of the underlying DBMS. |
|||
See Constants.Bool for the list of valid values for this attribute. |
Enum (Constants.Bool) |
||
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 (Constants.HomeLoadAlgorithm) |
||
Determines whether updates will be sent after the transaction has been committed. See Constants.Bool for the list of valid values for this attribute. |
Enum (Constants.Bool) |
||
Gives the abstract schema name for this EJB. If not specified, the ejb-name value will be used. |
|||
See Constants.Bool for the list of valid values for this attribute. |
Enum (Constants.Bool) |
||
Specifies whether dynamic queries are enabled. See Constants.Bool for the list of valid values for this attribute. |
Enum (Constants.Bool) |
||
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. |
Enum (Constants.Bool) |
||
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. |
Enum (Constants.Bool) |
||
Assigns a custom network channel that the EJB will use for network communications. A network channel defines a set of connection attributes |
|||
The cmp fields to use as the primary key when the primary key is not specified. |
Defines the concurrency strategy for this bean. See Constants.ConcurrencyStrategy for valid values for this attribute. |
|||
The number of seconds between each |
|||
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 |
Enum (Constants.Bool) |
||
The estimated average size of the instances of an entity bean, in bytes. |
This annotation does not have any attributes, other than the array of weblogic.ejbgen.EnvEntry annotations.
Whether to generate the primary key class for this EJB. See Constants.Bool for the list of valid values for this attribute. |
Enum (Constants.Bool) |
||
Specifies whether to generate the value class for this EJB. See Constants.Bool for the list of valid values for this attribute. |
Enum (Constants.Bool) |
||
Specifies whether to generate the remote home interface for this EJB. See Constants.Bool for the list of valid values for this attribute. |
Enum (Constants.Bool) |
||
Specifies whether to generate the remote interface for this EJB. See Constants.Bool for the list of valid values for this attribute. |
Enum (Constants.Bool) |
||
Whether to generate the local home interface for this EJB. See Constants.Bool for the list of valid values for this attribute. |
Enum (Constants.Bool) |
||
Whether to generate the local interface for this EJB. See Constants.Bool for the list of valid values for this attribute. |
Enum (Constants.Bool) |
Specifies the type of transaction isolation for this method. See Constants.IsolationLevel for valid values for this attribute. |
Enum (Constants.IsolationLevel) |
||
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 |
|||
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. |
|||
Defines a comment that will be reproduced above the generated finder Java method. |
|||
Specifies the maximum number of elements that should be returned by a multi-valued query. |
|||
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. |
|||
Determines whether the generated SQL SELECT will contain a DISTINCT qualifier. See Constants.Bool for valid values for this attribute. |
Enum (Constants.Bool) |
||
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. |
Enum (Constants.Bool) |
||
Specifies the EJB QL request as it will appear in the deployment descriptor. |
|||
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. |
This annotation does not have any attributes, other than the array of weblogic.ejbgen.Finder annotations.
Specifies whether to create tables. |
|||
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. |
|||
Determines whether this EJB can be redeployed without redeploying the entire module. See Constants.Bool for valid values for this attribute. |
Enum (Constants.Bool) |
||
A comma-separated line of warnings to disable when running ejbc. |
Specifies the number where this method must appear in the generated class. |
|||
Specifies the type of transaction isolation for this method. See Constants.IsolationLevel for valid values for this attribute. |
Enum (Constants.IsolationLevel) |
||
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 |
|||
Defines a comma-separated list of roles that are allowed to invoke this method. |
|||
Sets whether this method is idempotent. See Constants.Bool for valid values for this attribute. |
Enum (Constants.Bool) |
||
Specifies the number where this method must appear in the generated class. |
|||
Specifies the type of transaction isolation for this method. See Constants.IsolationLevel for valid values for this attribute. |
Enum (Constants.IsolationLevel) |
||
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 |
|||
Defines a comma-separated list of roles that are allowed to invoke this method. |
|||
Sets whether this method is idempotent. See Constants.Bool for valid values for this attribute. |
Enum (Constants.Bool) |
||
This annotation does not have any attributes, other than the array of weblogic.ejbgen.MessageDestinationRef annotations.
This annotation does not have any attributes, other than the array of weblogic.ejbgen.MessageDestination annotations.
Gives the JNDI name of the destination of this message-driven bean. |
|||
If the destinationType is Topic, setting this attribute to True will make the subscription durable. See Constants.Bool for valid values for this attribute. |
Enum (Constants.Bool) |
||
Specifies whether the clients are colocated with the EJB on the same server. See Constants.Bool for valid values for this attribute. |
Enum (Constants.Bool) |
||
The number of seconds between each attempt to reconnect to the JMS destination. |
|||
Names the principal to be used when ejbRemove would otherwise run with an anonymous principal. |
|||
Specifies where the transactions for this EJB are managed. Valid values for this attribute are: The default value is |
|||
Specifies whether this EJB uses callers identity. See Constants.Bool for valid values for this attribute. |
Enum (Constants.Bool) |
||
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 |
|||
Specifies the name of the principal in case the role maps to several principals. |
|||
Names the principal to be used when ejbPassivate would otherwise run with an anonymous principal. |
|||
Specifies the acknowledgement mode of this message-driven bean. Valid values for this attribute are: The default value is |
|||
Names the principal to be used when ejbCreate would otherwise run with an anonymous principal. |
|||
Assigns a custom network channel that the EJB will use for network communications. A network channel defines a set of connection attributes. |
|||
The initial number of seconds to suspend an MDB's JMS connection when the EJB container detects a JMS resource outage. |
|||
Specifies the maximum number of seconds to suspend an MDB's JMS connection when the EJB container detects a JMS resource outage. |
|||
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. |
Enum (Constants.Bool) |
||
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. |
Enum (Constants.Bool) |
||
Specifies the isolation level for the methods specified in the pattern tag. See Constants.IsolationLevel for valid values for this attribute. |
Enum (Constants.IsolationLevel) |
||
Specifies the pattern that matches all methods that will receive this isolation level (e.g. "*"). |
|||
This annotation does not have any attributes, other than the array of weblogic.ejbgen.MethodIsolationLevelPattern annotations.
Specifies the pattern that matches all methods that will receive this method permission (e.g. "*"). |
|||
Specifies the roles for the methods specified in the pattern tag, separated by a comma. |
|||
Specifies the interface to which this permission pattern applies. See Constants.Interface for valid values for this attribute. |
Enum (Constants.Interface) |
||
Specifies whether this pattern will apply to unchecked methods. See Constants.Bool for valid values for this attribute. |
Enum (Constants.Bool) |
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.
Specifies the name of the relationship. Use the same name on both ends of a relationship (this constraint also applies to unidirectional relationships). |
|||
Only needed in a many-to-many relationship. The name of an existing table that will be used to hold the joint table containing the relationships. If you are using a compound primary key, specify a set of corresponding foreign keys separated by a comma. |
|||
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 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. |
|||
Specifies the CMR field where this relationship will be kept. This field is optional. If it not present, the relationship is unidirectional. If it is present, the attribute fk-column must be specified as well. |
|||
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. |
Enum (Constants.Bool) |
||
See Constants.Bool for valid values for this attribute. |
Enum (Constants.Bool) |
||
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. |
|||
This annotation does not have any attributes, other than the array of weblogic.ejbgen.Relation annotations.
Specifies the name of the group to be loaded for the CMR field. |
|||
This annotation does not have any attributes, other than the array of weblogic.ejbgen.RelationshipCachingElement annotations.
Specifies the number where this method must appear in the generated class. |
|||
Specifies the type of transaction isolation for this method. See Constants.IsolationLevel for valid values for this attribute. |
Enum (Constants.IsolationLevel) |
||
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 |
|||
Defines a comma-separated list of roles that are allowed to invoke this method. |
|||
Sets whether this method is idempotent. See Constants.Bool for valid values for this attribute. |
Enum (Constants.Bool) |
||
Specifies the number where this method must appear in the generated class. |
|||
Specifies the type of transaction isolation for this method. See Constants.IsolationLevel for valid values for this attribute. |
Enum (Constants.IsolationLevel) |
||
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 |
|||
Defines a comma-separated list of roles that are allowed to invoke this method. |
|||
Sets whether this method is idempotent. See Constants.Bool for valid values for this attribute. |
Enum (Constants.Bool) |
||
Specifies the type of the environment resource references (e.g., javax.jms.Queue). |
|||
This annotation does not have any attributes, other than the array of weblogic.ejbgen.ResourceEnvRef annotations.
Specifies the type of the resource (e.g., javax.sql.DataSource). |
|||
This annotation does not have any attributes, other than the array of weblogic.ejbgen.ResourceRef annotations.
See Constants.Bool for valid values for this attribute. |
Enum (Constants.Bool) |
||
Comma separated list of the names of the principals in this role. |
|||
This annotation does not have any attributes, other than the array of weblogic.ejbgen.RoleMapping annotations.
This annotation does not have any attributes, other than the array of weblogic.ejbgen.SecurityRoleRef annotations.
Specifies the maximum number of elements that should be returned by a multi-valued query. |
|||
Determines whether the generated SQL SELECT will contain a DISTINCT qualifier. See Constants.Bool for valid values for this attribute. |
Enum (Constants.Bool) |
||
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. |
Enum (Constants.Bool) |
||
Specifies the number where this method must appear in the generated class. |
|||
Specifies the EJB-QL that defines this select method. The method name must start with ejbSelect. |
|||
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. |
|||
Specifies whether the returned objects are mapped to EJBLocalObject or EJBObject. |
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 |
|||
Specifies whether this method accessible by everyone See Constants.Bool for valid values for this attribute. |
Enum (Constants.Bool) |
||
Specifies a comma-separated list of roles that are allowed to invoke this method. |
This annotation does not have any attributes, other than the array of weblogic.ejbgen.ServiceRef annotations.
Sets whether this bean is clusterable. See Constants.Bool for valid values for this attribute. |
Enum (Constants.Bool) |
||
Specifies how to replicate stateful session beans in a cluster. |
|||
Specifies whether the clients are colocated with the EJB on the same server. See Constants.Bool for valid values for this attribute. |
Enum (Constants.Bool) |
||
The fully-qualified name of the enterprise beans web service endpoint interface. |
|||
Specifies whether this EJB uses callers identity. See Constants.Bool for valid values for this attribute. |
Enum (Constants.Bool) |
||
Specifies the directory in which to store the passivated beans. |
|||
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 |
|||
Specifies whether the methods for this stateless session bean are idempotent or not. See Constants.Bool for valid values for this attribute. |
Enum (Constants.Bool) |
||
Specifies the name of the principal when the role maps to several principals. |
|||
Specifies whether the container will call this EJB by reference. See Constants.Bool for valid values for this attribute. |
Enum (Constants.Bool) |
||
Names the principal to be used when ejbPassivate would otherwise run with an anonymous principal. |
|||
Specifies whether remove() can be invoked during a transaction. See Constants.Bool for valid values for this attribute. |
Enum (Constants.Bool) |
||
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. |
|||
Names the principal to be used when ejbRemove would otherwise run with an anonymous principal. |
|||
Specifies who manages the transactions for this EJB. Valid values for this attribute are: The default value |
|||
Specifies whether to allow concurrent calls on that EJB. See Constants.Bool for valid values for this attribute. |
Enum (Constants.Bool) |
||
Specifies the number of seconds an EJB stays alive before being passivated. |
|||
Specifies the algorithm to be used for load-balancing among replicas of this bean. |
|||
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 (Constants.HomeLoadAlgorithm) |
||
Specifies the type of the cache for this stateful Session bean. |
|||
Specifies whether this bean can be deployed from multiple servers in a cluster. See Constants.Bool for valid values for this attribute. |
Enum (Constants.Bool) |
||
Names the principal to be used when ejbCreate would otherwise run with an anonymous principal. |
|||
Assigns a custom network channel that the EJB will use for network communications. A network channel defines a set of connection attributes. |
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. |
|||
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. |
|||
Specifies the maximum number of elements that should be returned by a multi-valued query. |
|||
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. |
Enum (Constants.Bool) |
||
Specifies the type of transaction isolation for this method. See Constants.IsolationLevel for valid values for this attribute. |
Enum (Constants.IsolationLevel) |
||
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. |
Array of weblogic.ejbgen.DBSpecificSQL |
||
Specifies the EJB QL request as it will appear in the deployment descriptor. |
|||
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 |
|||
Determines which Home this finder will be generated on. If unspecified, it will be generated on both. |
|||
Determines whether the generated See Constants.Bool for valid values for this attribute. |
Enum (Constants.Bool) |
||
Controls whether read-only entity EJBs can be cached at the query level. See Constants.Bool for valid values for this attribute. |
Enum (Constants.Bool) |
This annotation does not have any attributes, other than the array of weblogic.ejbgen.SqlFinder annotations.
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. |
|||
Array of weblogic.ejbgen.SqlShapeTable |
|||
This annotation does not have any attributes, other than the array of weblogic.ejbgen.SqlShape annotations.
Specifies what objects the value object class should reference when accessing other EJBs. |
![]() ![]() |
![]() |
![]() |