ejb-jar.xml
是否可以在(在 EJB 1.1 中)部署描述符中声明多个具有不同名称但后面具有相同类的 bean?
例如:
<session>
<ejb-name>AccountFacade</ejb-name>
<home>com.something.ejb.AccountFacadeHome</home>
<remote>com.something.ejb.AccountFacadeRemote</remote>
<ejb-class>com.something.ejb.AccountFacadeBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Bean</transaction-type>
</session>
<session>
<ejb-name>RestrictiveAccountFacade</ejb-name>
<home>com.something.ejb.AccountFacadeHome</home>
<remote>com.something.ejb.AccountFacadeRemote</remote>
<ejb-class>com.something.ejb.AccountFacadeBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Bean</transaction-type>
</session>
因为RestrictiveAccountFacade
我想在orion-ejb-jar.xml
文件中设置更高的隔离级别,例如:
<entity-deployment name="AccountFacade" location="AccountFacade">
<resource-ref-mapping location="..." name="jdbc/..."/>
</entity-deployment>
<entity-deployment name="RestrictiveAccountFacade" location="RestrictiveAccountFacade" isolation="serializable">
<resource-ref-mapping location="..." name="jdbc/..."/>
</entity-deployment>
这样做是否存在风险、任何副作用或未指明的行为?