分享
 
 
 

J2EE deployment files(ejb-jar2.0.xml)(2)

王朝java/jsp·作者佚名  2006-01-09
窄屏简体版  字體: |||超大  

<ejb-ref>

The ejb-ref element is used for the declaration of a reference to another enterprise bean's home. The declaration consists of an optional description; the EJB reference name used in the code of the referencing enterprise bean; the expected type of the referenced enterprise bean; the expected home and remote interfaces of the referenced enterprise bean; and an optional ejb-link information. The optional ejb-link element is used to specify the referenced enterprise bean. It is used typically in ejb-jar files that contain an assembled application.

<description>A short description</description>

A short description.

<ejb-ref-name>ejb/Payroll</ejb-ref-name>

The ejb-ref-name element contains the name of an EJB reference. The EJB reference is an entry in the enterprise bean's environment. It is recommended that name is prefixed with "ejb/".

<ejb-ref-type>Entity|Session</ejb-ref-type>

The ejb-ref-type element contains the expected type of the referenced enterprise bean. The ejb-ref-type element must be one of the following: Entity Session

<home>com.aardvark.payroll.PayrollHome</home>

The home element contains the fully-qualified name of the enterprise bean's home interface.

<remote>com.wombat.empl.EmployeeService</remote>

The remote element contains the fully-qualified name of the enterprise bean's remote interface.

<ejb-link>EmployeeRecord</ejb-link>

The ejb-link element is used in the ejb-ref element to specify that an EJB reference is linked to another enterprise bean in the ejb-jar file. The value of the ejb-link element must be the ejb-name of an enterprise bean in the same ejb-jar file, or in another ejb-jar file in the same J2EE application unit.

<security-role-ref>

The security-role-ref element contains the declaration of a security role reference in the enterprise bean's code. The declaration consists of an optional description, the security role name used in the code, and an optional link to a defined security role. The value of the role-name element must be the String used as the parameter to the EJBContext.isCallerInRole(String roleName) method. The value of the role-link element must be the name of one of the security roles defined in the security-role elements.

<description>A short description</description>

A short description.

<role-name>name</role-name>

The role-name element contains the name of a security role. The name must conform to the lexical rules for an NMTOKEN.

<role-link>name</role-link>

The role-link element is used to link a security role reference to a defined security role. The role-link element must contain the name of one of the security roles defined in the security-role elements.

<security-identity>

The security-identity element specifies whether the caller's security identity is to be used for the execution of the methods of the enter-prise bean or whether a specific run-as identity is to be used.

<description>A short description</description>

A short description.

<use-caller-identity>myRole</use-caller-identity>

The use-caller-identity element specifies that the caller's security identity be used as the security identity for the execution of the enterprise bean's methods.

<run-as-specified-identity>

The run-as-specified-identity element specifies the run-as identity to be used for the execution of the methods of an enterprise bean.

<description>A short description</description>

A short description.

<role-name>name</role-name>

The role-name element contains the name of a security role. The name must conform to the lexical rules for an NMTOKEN.

<resource-ref>

The resource-ref element contains a declaration of enterprise bean's reference to an external resource. It consists of an optional description, the resource factory reference name, the indication of the resource factory type expected by the enterprise bean code, and the type of authentication (bean or container).

<description>A short description</description>

A short description.

<res-ref-name>name</res-ref-name>

The res-ref-name element specifies the name of a resource factory reference.

<res-type>javax.sql.DataSource</res-type>

The res-type element specifies the type of the data source. The type is specified by the Java interface (or class) expected to be implemented by the data source.

<res-auth>Application/Container</res-auth>

The res-auth element specifies whether the enterprise bean code signs on programmatically to the resource manager, or whether the Container will sign on to the resource manager on behalf of the bean. In the latter case, the Container uses information that is supplied by the Deployer. The value of this element must be one of the two following: Application or Container

<resource-env-ref>

The resource-env-ref element contains a declaration of an enterprise bean's reference to an administered object associated with a resource in the enterprise bean's environment. It consists of an optional description, the resource environment reference name, and an indica-tion of the resource environment reference type expected by the enter-prise bean code. Used in: entity, message-driven and session Examples: jms/StockQueue javax.jms.Queue

<description>A short description</description>

A short description.

<resource-env-ref-name>theName</resource-env-ref-name>

The resource-env-ref-name element specifies the name of a resource environment reference; its value is the environment entry name used in the enterprise bean code.

<resource-env-ref-type>com.the.Type</resource-env-ref-type>

The resource-env-ref-type element specifies the type of a resource environment reference.

<query>

The query element is used to specify a finder or select query. It con-tains an optional description of the query, the specification of the finder or select method it is used by, and the EJB QL query string or query specification that defines the query.

<description>A short description</description>

A short description.

<query-method>

The query-method element is used to specify the method for finder or a select query. The method-name element specifies the name of a finder or select method in the entity bean's implementation class. Each method-param must be defined for a query-method within the method-params element. Used in: query Example: Method finds large orders ejbFindLargeOrders WHERE amount > 1000

<method-name>nameOfMethod</method-name>

The method-name element contains a name of an enterprise bean method, or the asterisk (*) character. The asterisk is used when the element denotes all the methods of an enterprise bean's remote and home interfaces.

<method-params>

The method-params element contains a list of the fully-qualified Java type names of the method parameters.

<method-param>int[]</method-param>

The method-param element contains the fully-qualified Java type name of a method parameter.

<ejb-ql>QUERY</ejb-ql>

The ejb-ql element contains the EJB QL finder or select query string that defines a finder or select query. This element is defined within the scope of a query element whose contents specify the finder or the select method that uses the query. The content must be a valid EJB QL query string for the entity bean for which the query is specified. If ejb-ql element is not specified, the query-spec element must be used to specify the semantics of the query. Used in: query Example: ejbSelectPendingLineitemsInEntity SELECT l FROM l in lineitems WHERE shipped is FALSE

<query-spec>SPEC</query-spec>

The query-spec element is used to specify a finder or select query. It contains a precise description of the semantics of the query. The query-spec element should only be used to specify queries whose seman- tics cannot be captured in EJB QL.

<message-driven>

The message-driven element declares a message-driven bean. The declaration consists of: an optional description; optional display name; optional small icon file name; optional large icon file name; a name assigned to the enterprise bean in the deployment descriptor; the mes-sage- driven bean's implementation class; the message-driven bean's transaction management type; an optional declaration as to whether distributed or local transactions should be used for the bean's onMes-sage method; an optional declaration of the message-driven bean's message selector; an optional declaration of the acknowledgment mode for the message-driven bean if bean-managed transaction demarcation is used; an optional declaration of the message-driven bean's intended destination type; an optional declaration of the bean's environment entries; an optional declaration of the bean's EJB refer-ences; an optional declaration of the security identity to be used for the execution of the bean's methods; an optional declaration of the bean's resource factory references; and an optional declaration of the bean's resource environment references.

<description>A short description</description>

A short description.

<display-name>A name</display-name>

The display-name element contains a short name that is intended to be display by tools.

<small-icon>employee-service-icon16x16.jpg</small-icon>

The small-icon element contains the name of a file containing a small (16 x 16) icon image. The file name is relative path within the ejb-jar file. The image must be either in the JPEG or GIF format, and the file name must end with the suffix ".jpg" or ".gif" respectively. The icon can be used by tools.

<large-icon>employee-service-icon32x32.jpg</large-icon>

The large-icon element contains the name of a file containing a large (32 x 32) icon image. The file name is relative path within the ejb-jar file. The image must be either in the JPEG or GIF format, and the file name must end with the suffix ".jpg" or ".gif" respectively. The icon can be used by tools.

<ejb-name>EmployeeService</ejb-name>

The ejb-name element specifies an enterprise bean's name. This name is assigned by the ejb-jar file producer to name the enterprise bean in the ejb-jar file's deployment descriptor. The name must be unique among the names of the enterprise beans in the same ejb-jar file. The enterprise bean code does not depend on the name; therefore the name can be changed during the application-assembly process without breaking the enterprise bean's function. There is no architected relationship between the ejb-name in the deployment descriptor and the JNDI name that the Deployer will assign to the enterprise bean's home. The name must conform to the lexical rules for an NMTOKEN.

<ejb-class>com.wombat.empl.EmployeeServiceBean</ejb-class>

The ejb-class element contains the fully-qualified name of the enterprise bean's class.

<transaction-type>Bean/Container</transaction-type>

The transaction-type element must be one of the two following: Bean or Container.

<transaction-scope>Local|Distributed</transaction-scope>

The transaction-scope element specifies whether an enterprise bean requires that distributed transactions must be used for its methods of whether the local transaction optimization may be used. The transaction-scope element must be one of the two following: Local Distributed The transaction-scope element is optional. If it is not specified, the container must assume that distributed transactions must be used.

<jms-message-selector>JMSType = 'car'</jms-message-selector>

The jms-message-selector element is used to specify the JMS message selector to be used in determining which messages a message-driven bean is to receive.

<jms-acknowledge-mode>AUTO_ACKNOWLEDGE|DUPS_OK_ACKNOWLEDGE</jms-acknowledge-mode>

The jms-acknowledge-mode element specifies whether JMS AUTO_ACKNOWLEDGE or DUPS_OK_ACKNOWLEDGE message acknowledgment seman- tics should be used for the onMessage message of a message-driven bean that uses bean managed transaction demarcation. The jms-acknowledge-mode element must be one of the two following: auto-acknowledge dups-ok-acknowledge

<message-driven-destination>

The message-driven-destination element provides advice to the Deployer as to whether a message-driven bean is intended for a Queue or a Topic. The declaration consists of: the type of the mes-sage- driven bean's intended destination and an optional declaration of whether a durable or non-durable subscription should be used if the message-driven bean is assigned to a Topic.

<jms-destination-type>javax.jms.Queue|javax.jms.Topic</jms-destination-type>

The jms-destination-type element specifies the type of the JMS desti-nation. The type is specified by the Java interface expected to be implemented by the destination. The jms-destination-type element must be one of the two following: javax.jms.Queue javax.jms.Topic

<jms-subscription-durability>durable|nondurable</jms-subscription-durability>

The jms-subscription-durability element specifies whether a JMS topic subscription is intended to be durable or nondurable. The jms-subscription-durability element must be one of the two following: durable nondurable

<env-entry>

The env-entry element contains the declaration of an enterprise bean's environment entries. The declaration consists of an optional description, the name of the environment entry, and an optional value.

<description>A short description</description>

A short description.

<env-entry-name>minAmount</env-entry-name>

The env-entry-name element contains the name of an enterprise bean's environment entry.

<env-entry-type>java.lang.String</env-entry-type>

The env-entry-type element contains the fully-qualified Java type of the environment entry value that is expected by the enterprise bean's code. The following are the legal values of env-entry-type: java.lang.Boolean, java.lang.String, java.lang.Integer, java.lang.Double, java.lang.Byte, java.lang.Short, java.lang.Long, and java.lang.Float.

<env-entry-value>100.00</env-entry-value>

The env-entry-value element contains the value of an enterprise bean's environment entry.

<ejb-ref>

The ejb-ref element is used for the declaration of a reference to another enterprise bean's home. The declaration consists of an optional description; the EJB reference name used in the code of the referencing enterprise bean; the expected type of the referenced enterprise bean; the expected home and remote interfaces of the referenced enterprise bean; and an optional ejb-link information. The optional ejb-link element is used to specify the referenced enterprise bean. It is used typically in ejb-jar files that contain an assembled application.

<description>A short description</description>

A short description.

<ejb-ref-name>ejb/Payroll</ejb-ref-name>

The ejb-ref-name element contains the name of an EJB reference. The EJB reference is an entry in the enterprise bean's environment. It is recommended that name is prefixed with "ejb/".

<ejb-ref-type>Entity|Session</ejb-ref-type>

The ejb-ref-type element contains the expected type of the referenced enterprise bean. The ejb-ref-type element must be one of the following: Entity Session

<home>com.aardvark.payroll.PayrollHome</home>

The home element contains the fully-qualified name of the enterprise bean's home interface.

<remote>com.wombat.empl.EmployeeService</remote>

The remote element contains the fully-qualified name of the enterprise bean's remote interface.

<ejb-link>EmployeeRecord</ejb-link>

The ejb-link element is used in the ejb-ref element to specify that an EJB reference is linked to another enterprise bean in the ejb-jar file. The value of the ejb-link element must be the ejb-name of an enterprise bean in the same ejb-jar file, or in another ejb-jar file in the same J2EE application unit.

<security-identity>

The security-identity element specifies whether the caller's security identity is to be used for the execution of the methods of the enter-prise bean or whether a specific run-as identity is to be used.

<description>A short description</description>

A short description.

<use-caller-identity>myRole</use-caller-identity>

The use-caller-identity element specifies that the caller's security identity be used as the security identity for the execution of the enterprise bean's methods.

<run-as-specified-identity>

The run-as-specified-identity element specifies the run-as identity to be used for the execution of the methods of an enterprise bean.

<description>A short description</description>

A short description.

<role-name>name</role-name>

The role-name element contains the name of a security role. The name must conform to the lexical rules for an NMTOKEN.

<resource-ref>

The resource-ref element contains a declaration of enterprise bean's reference to an external resource. It consists of an optional description, the resource factory reference name, the indication of the resource factory type expected by the enterprise bean code, and the type of authentication (bean or container).

<description>A short description</description>

A short description.

<res-ref-name>name</res-ref-name>

The res-ref-name element specifies the name of a resource factory reference.

<res-type>javax.sql.DataSource</res-type>

The res-type element specifies the type of the data source. The type is specified by the Java interface (or class) expected to be implemented by the data source.

<res-auth>Application/Container</res-auth>

The res-auth element specifies whether the enterprise bean code signs on programmatically to the resource manager, or whether the Container will sign on to the resource manager on behalf of the bean. In the latter case, the Container uses information that is supplied by the Deployer. The value of this element must be one of the two following: Application or Container

第一頁    上一頁    第2頁/共3頁    下一頁    最後頁
第01頁 第02頁 第03頁 
 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
2023年上半年GDP全球前十五强
 百态   2023-10-24
美众议院议长启动对拜登的弹劾调查
 百态   2023-09-13
上海、济南、武汉等多地出现不明坠落物
 探索   2023-09-06
印度或要将国名改为“巴拉特”
 百态   2023-09-06
男子为女友送行,买票不登机被捕
 百态   2023-08-20
手机地震预警功能怎么开?
 干货   2023-08-06
女子4年卖2套房花700多万做美容:不但没变美脸,面部还出现变形
 百态   2023-08-04
住户一楼被水淹 还冲来8头猪
 百态   2023-07-31
女子体内爬出大量瓜子状活虫
 百态   2023-07-25
地球连续35年收到神秘规律性信号,网友:不要回答!
 探索   2023-07-21
全球镓价格本周大涨27%
 探索   2023-07-09
钱都流向了那些不缺钱的人,苦都留给了能吃苦的人
 探索   2023-07-02
倩女手游刀客魅者强控制(强混乱强眩晕强睡眠)和对应控制抗性的关系
 百态   2020-08-20
美国5月9日最新疫情:美国确诊人数突破131万
 百态   2020-05-09
荷兰政府宣布将集体辞职
 干货   2020-04-30
倩女幽魂手游师徒任务情义春秋猜成语答案逍遥观:鹏程万里
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案神机营:射石饮羽
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案昆仑山:拔刀相助
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案天工阁:鬼斧神工
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案丝路古道:单枪匹马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:与虎谋皮
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:李代桃僵
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:指鹿为马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:小鸟依人
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:千金买邻
 干货   2019-11-12
 
推荐阅读
 
 
 
>>返回首頁<<
 
靜靜地坐在廢墟上,四周的荒凉一望無際,忽然覺得,淒涼也很美
© 2005- 王朝網路 版權所有