In an EJB project, specifies JAR and table management settings. Typically the attributes on this tag are set in the JAR Settings and Deployment sections of the Property Editor. The various settings are stored in the build.properties file. Some other settings stored in this file are discussed below.
The EJB Project.
@ejbgen:jar-settings
[create-tables="CreateTableOption"]
[disable-warning="IgnoreWarningsList"]
[ejb-client-jar="ClientJarList"]
[enable-bean-class-redeploy="True/False"]
create-tables
Optional. Set this attribute to enable automatic table creation for CMP entity beans. For details, see Automatic Table Creation below.
disable-warning
Optional. Provide a comma-separated list of warnings that will be suppressed during EJB deployment. The following warnings can be suppressed (for more information on deployment errors and warning messages, see the WebLogic Server documentation topic EJB Subsystem Messages). To suppress the warning, specify the warning message code in this attribute:
- BEA-010054. The <ejbName> has a class <className> that is in the classpath. This class should only be located in the ejb-jar file.
- BEA-010202. Call-by-reference is not enabled for the EJB <ejbName>. The server will have better performance if it is enabled. To enable call-by-reference, set the enable-call-by-reference property, located in the Tuning section of the Property Editor, to True.
- BEA-010001. While deploying EJB <ejbName>, class <className> was loaded from the system classpath. As a result, this class cannot be reloaded while the server is running. To prevent this behavior in the future, make sure the class is not located in the server classpath.
- BEA-010200. The EJB Module <moduleName> has a class <className> that contains a member. To update this class or any of its superclasses, you must redeploy the entire EJB Module. You cannot update these classes using the dynamic EJB impl class update feature.
ejb-client-jar
Optional. Specify the name of the client JAR to be generated. An EJB client JAR contains the EJB's home and remote interface classes and any other classes necessary for a client program to access the EJB.
enable-bean-class-redeploy
Optional. Specifies whether the EJBs in the EJB project (that is, the EJB JAR file) can be redeployed without redeploying the entire application (that is, the EAR file). When left unspecified, this settings defaults to False.
When you are developing a new entity bean, you can make iterative development easier by enabling automatic table creation. Any changes a database table are made immediately after a build when the EJBs are redeployed. The following options are available for the create-tables attribute:
Note. Do not use the AlterOrCreate setting when you have changed the definition of a primary key. For instance, if you added a primary key CMP field and use this setting, the updated table will not accurately represent the added column as a primary key. You must DropAndCreate the table instead.
The build.properties file stores additional build settings in addition to the attributes of the @ejbgen:jar-settings annotiation. Some of these settings are: