📄 ejb-jar_2_0.dtd
字号:
<!ELEMENT message-selector (#PCDATA)><!--The method element is used to denote a method of an enterprisebean's home or component interface, or, in the case of a message-drivenbean, the bean's onMessage method, or a set of methods. The ejb-nameelement must be the name of one of the enterprise beans declared inthe deployment descriptor; the optional method-intf element allows todistinguish between a method with the same signature that is multiplydefined across in both the home and component interfaces; themethod-name element specifies the method name; and the optionalmethod-params elements identify a single method among multiple methodswith an overloaded method name.There are three possible styles of the method element syntax:1.<method> <ejb-name>EJBNAME</ejb-name> <method-name>*</method-name></method> This style is used to refer to all the methods of the specified enterprise bean's home and component interfaces.2.<method> <ejb-name>EJBNAME</ejb-name> <method-name>METHOD</method-name></method>> This style is used to refer to the specified method of the specified enterprise bean. If there are multiple methods with the same overloaded name, the element of this style refers to all the methods with the overloaded name.3.<method> <ejb-name>EJBNAME</ejb-name> <method-name>METHOD</method-name> <method-params> <method-param>PARAM-1</method-param> <method-param>PARAM-2</method-param> ... <method-param>PARAM-n</method-param> </method-params><method> This style is used to refer to a single method within a set of methods with an overloaded name. PARAM-1 through PARAM-n are the fully-qualified Java types of the method's input parameters (if the method has no input arguments, the method-params element contains no method-param elements). Arrays are specified by the array element's type, followed by one or more pair of square brackets (e.g. int[][]). If there are multiple methods with the same overloaded name, this style refers to all of the overloaded methods.Used in: container-transaction, exclude-list, method-permissionExamples:Style 1: The following method element refers to all the methods ofthe EmployeeService bean's home and component interfaces:<method> <ejb-name>EmployeeService</ejb-name> <method-name>*</method-name></method>Style 2: The following method element refers to all the createmethods of the EmployeeService bean's home interface(s).<method> <ejb-name>EmployeeService</ejb-name> <method-name>create</method-name></method>Style 3: The following method element refers to thecreate(String firstName, String LastName) method of theEmployeeService bean's home interface(s).<method> <ejb-name>EmployeeService</ejb-name> <method-name>create</method-name> <method-params> <method-param>java.lang.String</method-param> <method-param>java.lang.String</method-param> </method-params></method>The following example illustrates a Style 3 element withmore complex parameter types. The methodfoobar(char s, int i, int[] iar, mypackage.MyClass mycl,mypackage.MyClass[][] myclaar) would be specified as:<method> <ejb-name>EmployeeService</ejb-name> <method-name>foobar</method-name> <method-params> <method-param>char</method-param> <method-param>int</method-param> <method-param>int[]</method-param> <method-param>mypackage.MyClass</method-param> <method-param>mypackage.MyClass[][]</method-param> </method-params></method>The optional method-intf element can be used when it becomes necessaryto differentiate between a method that is multiply defined across theenterprise bean's home and component interfaces with the same name andsignature.For example, the method element<method> <ejb-name>EmployeeService</ejb-name> <method-intf>Remote</method-intf> <method-name>create</method-name> <method-params> <method-param>java.lang.String</method-param> <method-param>java.lang.String</method-param> </method-params></method>can be used to differentiate the create(String, String) method definedin the remote interface from the create(String, String) method definedin the remote home interface, which would be defined as<method> <ejb-name>EmployeeService</ejb-name> <method-intf>Home</method-intf> <method-name>create</method-name> <method-params> <method-param>java.lang.String</method-param> <method-param>java.lang.String</method-param> </method-params></method>and the create method that is defined in the local home interfacewhich would be defined as<method> <ejb-name>EmployeeService</ejb-name> <method-intf>LocalHome</method-intf> <method-name>create</method-name> <method-params> <method-param>java.lang.String</method-param> <method-param>java.lang.String</method-param> </method-params></method>The method-intf element can be used with all three Styles of themethod element usage. For example, the following method elementexample could be used to refer to all the methods of theEmployeeService bean's remote home interface.<method> <ejb-name>EmployeeService</ejb-name> <method-intf>Home</method-intf> <method-name>*</method-name></method>--><!ELEMENT method (description?, ejb-name, method-intf?, method-name,method-params?)><!--The method-intf element allows a method element to differentiatebetween the methods with the same name and signature that are multiplydefined across the component and home interfaces (e.g, in both anenterprise bean's remote and local interfaces; in both an enterprise bean'shome and remote interfaces, etc.)The method-intf element must be one of the following: <method-intf>Home</method-intf> <method-intf>Remote</method-intf> <method-intf>LocalHome</method-intf> <method-intf>Local</method-intf>Used in: method--><!ELEMENT method-intf (#PCDATA)><!--The method-name element contains a name of an enterprise bean methodor the asterisk (*) character. The asterisk is used when the elementdenotes all the methods of an enterprise bean's component and homeinterfaces.Used in: method, query-method--><!ELEMENT method-name (#PCDATA)><!--The method-param element contains the fully-qualified Java type nameof a method parameter.Used in: method-params--><!ELEMENT method-param (#PCDATA)><!--The method-params element contains a list of the fully-qualified Javatype names of the method parameters.Used in: method, query-method--><!ELEMENT method-params (method-param*)><!--The method-permission element specifies that one or more securityroles are allowed to invoke one or more enterprise bean methods. Themethod-permission element consists of an optional description, a listof security role names or an indicator to state that the method isunchecked for authorization, and a list of method elements.The security roles used in the method-permission element must bedefined in the security-role elements of the deployment descriptor,and the methods must be methods defined in the enterprise bean'scomponent and/or home interfaces.Used in: assembly-descriptor--><!ELEMENT method-permission (description?, (role-name+|unchecked), method+)><!--The multiplicity element describes the multiplicity of the role thatparticipates in a relation.The multiplicity element must be one of the two following: <multiplicity>One</multiplicity> <multiplicity>Many</multiplicity>Used in: ejb-relationship-role--><!ELEMENT multiplicity (#PCDATA)><!--The persistence-type element specifies an entity bean's persistencemanagement type.The persistence-type element must be one of the two following: <persistence-type>Bean</persistence-type> <persistence-type>Container</persistence-type>Used in: entity--><!ELEMENT persistence-type (#PCDATA)><!--The prim-key-class element contains the fully-qualified name of anentity bean's primary key class.If the definition of the primary key class is deferred to deploymenttime, the prim-key-class element should specify java.lang.Object.Used in: entityExamples: <prim-key-class>java.lang.String</prim-key-class> <prim-key-class>com.wombat.empl.EmployeeID</prim-key-class> <prim-key-class>java.lang.Object</prim-key-class>--><!ELEMENT prim-key-class (#PCDATA)><!--The primkey-field element is used to specify the name of the primarykey field for an entity with container-managed persistence.The primkey-field must be one of the fields declared in the cmp-fieldelement, and the type of the field must be the same as the primary keytype.The primkey-field element is not used if the primary key maps tomultiple container-managed fields (i.e. the key is a compound key). Inthis case, the fields of the primary key class must be public, andtheir names must correspond to the field names of the entity beanclass that comprise the key.Used in: entityExample: <primkey-field>EmployeeId</primkey-field>--><!ELEMENT primkey-field (#PCDATA)><!--The query element is used to specify a finder or select query. Itcontains - an optional description of the query - the specification of the finder or select method it is used by - an optional specification of the result type mapping, if the query is for a select method and entity objects are returned. - the EJB QL query string that defines the query.Queries that are expressible in EJB QL must use the ejb-ql element tospecify the query. If a query is not expressible in EJB QL, thedescription element should be used to describe the semantics of thequery and the ejb-ql element should be empty.The result-type-mapping is an optional element. It can only be presentif the query-method specifies a select method that returns entityobjects. The default value for the result-type-mapping element is"Local".Used in: entity--><!ELEMENT query (description?, query-method, result-type-mapping?, ejb-ql)><!--The query-method element is used to specify the method for a finder orselect query.The method-name element specifies the name of a finder or selectmethod in the entity bean's implementation class.Each method-param must be defined for a query-method using themethod-params element.Used in: queryExample:<query> <description>Method finds large orders</description> <query-method> <method-name>findLargeOrders</method-name> <method-params></method-params> </query-method> <ejb-ql>SELECT OBJECT(o) FROM Order o WHERE o.amount > 1000</ejb-ql></query>--><!ELEMENT query-method (method-name, method-params)><!--The reentrant element specifies whether an entity bean is reentrant ornot.The reentrant element must be one of the two following: <reentrant>True</reentrant> <reentrant>False</reentrant>Used in: entity--><!ELEMENT reentrant (#PCDATA)><!--The relationship-role-source element designates the source of a rolethat participates in a relationship. A relationship-role-sourceelement uniquely identifies an entity bean.Used in: ejb-relationship-role--><!ELEMENT relationship-role-source (description?, ejb-name)><!--The relationships element describes the relationships in whichentity beans with container-managed persistence participate. Therelationships element contains an optional description; and a list ofejb-relation elements, which specify the container managedrelationships.Used in: ejb-jar--><!ELEMENT relationships (description?, ejb-relation+)><!--The remote element contains the fully-qualified name of the enterprisebean's remote interface.Used in: ejb-ref, entity, sessionExample:<remote>com.wombat.empl.EmployeeService</remote>--><!ELEMENT remote (#PCDATA)><!--The res-auth element specifies whether the enterprise bean code signson programmatically to the resource manager, or whether the Containerwill sign on to the resource manager on behalf of the enterprise bean. In thelatter case, the Container uses information that is supplied by theDeployer.The value of this element must be one of the two following:
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -