All Downloads are FREE. Search and download functionalities are using the official Maven repository.

META-INF.ejb-jar.xml Maven / Gradle / Ivy

The newest version!
<?xml version="1.0" encoding="UTF-8"?>
<!--
    Licensed to the Apache Software Foundation (ASF) under one or more
    contributor license agreements.  See the NOTICE file distributed with
    this work for additional information regarding copyright ownership.
    The ASF licenses this file to You under the Apache License, Version 2.0
    (the "License"); you may not use this file except in compliance with
    the License.  You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
-->
<ejb-jar version="3.0"
    xmlns="http://java.sun.com/xml/ns/javaee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd"> 
    <display-name>DataCDInfo Enterprise Bean Definitions</display-name>
    
    <enterprise-beans>
		<session>
			<ejb-name>ejb/DataCDInfoJTAImpl</ejb-name>
			<business-local>org.apache.geronimo.samples.datacdinfo.core.DataCDInfoLocal</business-local>
			<business-remote>org.apache.geronimo.samples.datacdinfo.core.DataCDInfoRemote</business-remote>
			<ejb-class>org.apache.geronimo.samples.datacdinfo.core.DataCDInfoJTAImpl</ejb-class>
<!--			 Stateful|Stateless -->
			<session-type>Stateless</session-type>
<!--			 Who manages transanction? Bean|Container -->
			<transaction-type>Container</transaction-type>
		</session>

		<!-- In code, the stateful session bean "DataCDinfoAdmin" is annotated without name, 
		so the geronimo server will assign a default name to it, it's the bean simple name. 
		However, the interesting is following definition will add an additional entry to JNDI
		and register a stateful session bean with name "ejb/DataCDInfoAdmin". Seems it does
		not override the annotated one. Why?  -->
		<session>
			<ejb-name>ejb/DataCDInfoAdmin</ejb-name>
			<business-local>org.apache.geronimo.samples.datacdinfo.core.DataCDInfoAdminLocal</business-local>
			<ejb-class>org.apache.geronimo.samples.datacdinfo.core.DataCDInfoAdmin</ejb-class>
<!--			 Stateful|Stateless -->
			<session-type>Stateful</session-type>
<!--			 Who manages transanction? Bean|Container -->
			<transaction-type>Container</transaction-type>
		</session>		
	</enterprise-beans>
	
	<assembly-descriptor>
			<method-permission>
				<role-name>superadmin</role-name>
				<method>
					<ejb-name>ejb/DataCDInfoAdmin</ejb-name>
					<method-name>*</method-name>
				</method>
			</method-permission>
			<!-- In code, role "admin" only has right to access listOwners method
				but via this xml definition, the role could also access listAllDataCDs method -->
			<method-permission>
				<role-name>admin</role-name>
				<method>
					<ejb-name>ejb/DataCDInfoAdmin</ejb-name>
					<method-name>listAllDataCDs</method-name>					
				</method>
			</method-permission>
	</assembly-descriptor>     
</ejb-jar>





© 2015 - 2025 Weber Informatics LLC | Privacy Policy