<?xml version="1.0"?>

<!DOCTYPE weblogic-ejb-jar PUBLIC '-//BEA Systems, Inc.//DTD WebLogic 5.1.0 EJB//EN' 'http://www.bea.com/servers/wls510/dtd/weblogic-ejb-jar.dtd'>

<!-- this is a weblogic-specific file that maps ejb-jar.xml resources
     references to weblogic managed resources and also provides for bean 
     tuning.
     -->
<weblogic-ejb-jar>
   <weblogic-enterprise-bean>
      <ejb-name>Person</ejb-name>

      <!-- caching-descriptor - Allows for tuning of bean instance handling -->
      <!--
      <caching-descriptor>
         *max-beans-in-free-pool - sets the maximum number of bean instances
	    allowed in the free pool.
         *initial-beans-in-free-pool - sets the number of beans of this 
	    type initial placed in the bean pool.
         *max-beans-in-cache - maximum number of objects of this type
            to keep in memory.
         *idle-timeout-seconds - inactivity time before bean instance
	    passivated and returned to free pool.
         *cache-strategy - Read-Only or Read-Write (default)
         *passivation-strategy - default or transaction. Determines whether
	    the bean is passivated and returned to the bean pool after each
	    transaction or is allowed to be cached between transactions.
         *read-timeout-seconds - number of seconds between ejbLoad calls
	    for read-only beans. A value of 0 will result in the bean's
	    ejbLoad being called only when leaving the free pool for the
	    cache.
      </caching-descriptor>
      -->

      <persistence-descriptor>
         <!-- is-modified-method-name - name of method to call at the
              completion of a business method invocation to determine if 
	      the database needs to be synchronized with the bean's cache.
	      -->
         <is-modified-method-name>isDirty</is-modified-method-name>

	 <!-- delay-updates-until-end-of-tx - set to True is state of bean
	      is written to the database at the end of the transaction or
	      False after each completed method invocation.
	      -->
         <delay-updates-until-end-of-tx>True</delay-updates-until-end-of-tx>

	 <!-- finders-call-ejbLoad - set to True if a bean located by an
	      ejbFind method immediately loads the bean into the cache or
	      False (default) for it to wait until the first method
	      invocation.
	      -->
         <finders-call-ejbload>False</finders-call-ejbload>

         <!-- persistence-type
	      Names the specific persistence implementation type used 
	      -->
         <persistence-type>
	    <type-identifier>WebLogic_CMP_RDBMS</type-identifier>
	    <type-version>5.1.0</type-version>
	    <type-storage>META-INF/weblogic-cmp-rdbms-jar.xml</type-storage>
         </persistence-type>

         <!-- db-is-shared - set to False if the deployed to server is the 
	      only direct accessor of the database. This allows additional
	      caching.
              -->
         <db-is-shared>False</db-is-shared>

         <!-- stateful-session-persistent-store-dir - directory on the
	      server to store the passivated state of stateful session
	      beans. This is not used here.
	      -->
         <!--
         <stateful-session-persistent-store-dir>
         </stateful-session-persistent-store-dir>
	 -->

         <!-- persistence-use - names the specific persistence used for 
              the bean.
              -->
         <persistence-use>
            <type-identifier>WebLogic_CMP_RDBMS</type-identifier>
            <type-version>5.1.0</type-version>
         </persistence-use>
      </persistence-descriptor>

      <!-- clustering-descriptor - defines properties applicable when the
           bean is deployed to multiple servers acting a single logical
	   unit.
	   -->
      <!--
      <clustering-descriptor>
         *home-is-clusterable - true/false; set when bean is deployed
	    to multiple servers and client load is to be load-balanced
	    between them as well as handling failover.
         *home-load-algorithm - RoundRobin, Random, or
	    WeightBased; algorithm used to determine which server to 
	    use for home interface functions.
         *home-call-router-class-name - class specification of
	    a class that will implement a custom load-balancing algorithm.
         *stateless-bean-is-clusterable - true/false; set when the bean is
	    deployed to multiple servers and the client load is to be load-
	    balanced between them as well as handling failover.
         *stateless-bean-load-algorithm - RoundRobin, Random, or
	    WeightBased; algorithm used to determine which server to 
	    use with clustered bean deployments.
         *stateless-bean-call-router-class-name - class specification of
	    a class that will implement a custom load-balancing algorithm.
         *stateless-bean-methods-are-idempotent
      </clustering-descriptor>
      -->

      <!-- transaction-descriptor - define properties specific to
           transactions.
	   -->
      <transaction-descriptor>
          <!--
          *trans-timeout-seconds - transaction will be rolled back if 
	     transaction exceeds this amount of time.
	  -->
      </transaction-descriptor>

      <!-- reference-descriptor - maps resources referenced in the
           bean/ejb-jar.xml file to specific JNDI contexts.
	   -->
      <reference-descriptor>
         <!--
         <resource-description>
            <res-ref-name>jdbc/personnelDB</res-ref-name> 
            <jndi-name>
	       weblogic/jdbc/dataSource/MyJDBC Data Source
	    </jndi-name>
         </resource-description>
         -->
      </reference-descriptor>

      <!-- enable-call-by-reference - EJB 1.1 spec requires that parameters
           be passed by value between all bean calls. Setting this to True
	   will allow calls within the same server to pass objects by 
	   reference when possible.
	   -->
      <enable-call-by-reference>True</enable-call-by-reference>

      <!-- jndi-name - specifies the jndi context/name for the home
           interface 
           -->
      <jndi-name>PersonHome</jndi-name>

      <!-- transaction-isolation - permits the assembler to do some
           fine-tuning for transaction/lock handling. The levels can
	   be set to:
	      TRANSACTION_SERIALIZABLE  
	      TRANSACTION_READ_COMMITTED
	      TRANSACTION_READ_UNCOMMITTED
	      TRANSACTION_REPEATABLE_READ
	   -->
      <!--
      <transaction-isolation>
         <isolation-level></isolation-level>
	 <method></method>
      </transaction-isolation>
      -->
   </weblogic-enterprise-bean>

<!--
   <weblogic-enterprise-bean>
      <ejb-name>Registrar</ejb-name>

      <reference-descriptor>
         <ejb-reference-description>
            <ejb-ref-name>ejb/PersonHome</ejb-ref-name> 
            <jndi-name>PersonHome</jndi-name>
         </ejb-reference-description>
         <ejb-reference-description>
            <ejb-ref-name>ejb/UIDGeneratorHome</ejb-ref-name> 
            <jndi-name>UIDGeneratorHome</jndi-name>
         </ejb-reference-description>
      </reference-descriptor>

      <jndi-name>RegistrarHome</jndi-name>
   </weblogic-enterprise-bean>
-->

   <security-role-assignment>
      <role-name>Admin</role-name>
      <principal-name>ejava-instructor</principal-name>
   </security-role-assignment>
   
   <security-role-assignment>
      <role-name>User</role-name>
      <principal-name>ejava-instructor</principal-name>
   </security-role-assignment>
</weblogic-ejb-jar>
