This tag specifies the interface, compound primary key, and value classes that are to be auto-generated during build.
Class tag on an entity or session bean.
@ejbgen:file-generation
[local-class="True/False"]
[local-class-name="NameLocalInterface"]
[local-home="True/False"]
[local-home-name="NameLocalHomeInterface"]
[local-home-package="NameLocalHomeInterfacePackage"]
[local-package="NameLocalInterfacePackage"]
[pk-class="True/False"]
[remote-class="True/False"]
[remote-class-name="NameRemoteInterface"]
[remote-home="True/False"]
[remote-home-name="NameRemoteHomeInterface"]
[remote-home-package="NameRemoteHomeInterfacePackage"]
[remote-package="NameRemoteInterfacePackage"]
[value-class="True/False"]
[value-class-name="NameValueClass"]
local-class
Optional. Specifies whether to generate the local interface of the EJB. Valid values are True and False. When left unspecified, it defaults to False. You can set this attribute and local-home together by using the checkbox field Local EJB in the Naming Section of the Property Editor.
local-class-name
Optional. Specifies the name of the local interface. You can set this attribute either directly in Source View or by specifying the Local EJB's Bean class name field in the Naming Section of the Property Editor.
local-home
Optional. Specifies whether to generate the local home interface of the EJB. Valid values are True and False. When left unspecified, it defaults to False. You can set this attribute and local-class together by using the checkbox field Local EJB in the Naming Section of the Property Editor.
local-home-name
Optional. Specifies the name of the local home interface. You can set this attribute either directly in Source View or by specifying the Local EJB's Home class name field in the Naming Section of the Property Editor.
local-home-package
Optional. Specifies the package for the local home interface. When left unspecified, the same package is used as defined in the bean's .ejb file.
local-package
Optional. Specifies the package for the local interface. When left unspecified, the same package is used as defined in the bean's .ejb file.
pk-class
Optional. For an entity bean, specifies whether to generate the primary key class. Valid values are True and False. When left unspecified, it defaults to True. The primary key class name is stored in the prim-key-class attribute of the ejbgen:entity tag.
remote-class
Optional. Specifies whether to generate the remote interface of the EJB. Valid values are True and False. When left unspecified, it defaults to False. You can set this attribute and remote-home together by using the checkbox field Remote EJB in the Naming Section of the Property Editor.
remote-class-name
Optional. Specifies the name of the remote interface. You can set this attribute either directly in Source View or by specifying the Remote EJB's Bean class name field in the Naming Section of the Property Editor.
remote-home
Optional. Specifies whether to generate the remote home interface of the EJB. Valid values are True and False. When left unspecified, it defaults to False. You can set this attribute and remote-class together by using the checkbox field Remote EJB in the Naming Section of the Property Editor.
remote-home-name
Optional. Specifies the name of the remote home interface. You can set this attribute either directly in Source View or by specifying the Remote EJB's Home class name field in the Naming Section of the Property Editor.
remote-home-package
Optional. Specifies the package for the remote home interface. When left unspecified, the same package is used as defined in the bean's .ejb file.
remote-package
Optional. Specifies the package for the remote interface. When left unspecified, the same package is used as defined in the bean's .ejb file.
value-class
Optional. For an entity bean, specifies whether to auto-generate the value class. Valid values are true and false. When left unspecified, it defaults to true. Auto-generated value object classes
value-class-name
Optional. For an entity bean, specifies the name of the value class.
The following rules apply to this tag's use:
* @ejbgen:jndi-name local = "ejb.<name>LocalHome" * * @ejbgen:file-generation local-class = "True" local-class-name = "<name>" * local-home = "True" local-home-name = "<name>Home" * remote-class = "False" remote-home = "False" * remote-home-name = "<name>RemoteHome" * remote-class-name = "<name>Remote" * value-class = "False" * value-class-name = "<name>Value" * pk-class = "True"
Notice that for entity beans, only the local interfaces are auto-generated by default. Also, new CMP fields, CMR fields, component methods, home methods, and finder methods (except for findByPrimaryKey) are by default created in the local interfaces. These default settings encourage the use of local interfaces only to interact with entity beans.
Note. EJB Create methods and the findByPrimaryKey method are always defined in the home interfaces that are auto-generated during build. For instance, if both the local and remote home interface is auto-generated, these methods will be exposed through both interfaces.
* @ejbgen:jndi-name remote = "ejb.<name>RemoteHome" * * @ejbgen:file-generation remote-class = "true" remote-class-name = "<name>Remote" * remote-home = "true" remote-home-name = "<name>Home" * local-class = "false" local-class-name = "<name>Local" * local-home = "false" local-home-name = "<name>LocalHome"
Notice that for session beans, only the remote interfaces are auto-generated by default. Also, component methods are by default created in the remote interface only. These default setting encourage the use of session beans as the intermediary between a client application and entity beans.