<?xml version="1.0"?>
<!DOCTYPE ejb-jar SYSTEM "../../../xml/ejb-jar_1_1.dtd">

<!-- this descriptor file is created during the development process.
     It describe all propereties and information, which are needed for all
     beans contained in this component. Also the bean - bean communication 
     is described here.
     I.e.: The AddressController has to get an instance of Address.
           Address will be referenced hard coded by the JNDI name "ejb/Address" (see (1)) 
           which bean has to be connected by that name will be defined during the
           deployment process. This meens, that AddressController only requires an
           object referenced by this JNDI name. See also (1) in weblogic-ejb-jar.xml
           All finaly JNDI names will be defined during the deployment process in the
           deployment descriptor which is vendor specific (weblogic: weblogic-ejb-jar.xml)

     This files defines for each bean all resources, like jdbc pool and other bean which are 
     required.
     It also define the fundamental classes and attributes.
-->

<ejb-jar>
		<description>Here is the description of the test's beans</description>
    <enterprise-beans>
        <entity>
            <ejb-name>TheNewsCat</ejb-name>
            <home>in.popnet.newscenter.ejb.server.NewsCatHome</home>
            <remote>in.popnet.newscenter.ejb.server.NewsCat</remote>
            <ejb-class>in.popnet.newscenter.ejb.server.NewsCatBean</ejb-class>
            <persistence-type>Bean</persistence-type>
            <prim-key-class>in.popnet.newscenter.ejb.server.NewsCatPK</prim-key-class>
            <reentrant>False</reentrant>
            <resource-ref>
                <res-ref-name>jdbc/demoPool</res-ref-name>
                <res-type>javax.sql.DataSource</res-type>
                <res-auth>Container</res-auth>
            </resource-ref>
        </entity>

        <entity>
            <ejb-name>TheLocation</ejb-name>
            <home>in.popnet.newscenter.ejb.server.LocationHome</home>
            <remote>in.popnet.newscenter.ejb.server.Location</remote>
            <ejb-class>in.popnet.newscenter.ejb.server.LocationBean</ejb-class>
            <persistence-type>Bean</persistence-type>
            <prim-key-class>in.popnet.newscenter.ejb.server.LocationPK</prim-key-class>
            <reentrant>False</reentrant>
            <resource-ref>
                <res-ref-name>jdbc/demoPool</res-ref-name>
                <res-type>javax.sql.DataSource</res-type>
                <res-auth>Container</res-auth>
            </resource-ref>
        </entity>
        
        <entity>
            <ejb-name>TheCategory</ejb-name>
            <home>in.popnet.newscenter.ejb.server.CategoryHome</home>
            <remote>in.popnet.newscenter.ejb.server.Category</remote>
            <ejb-class>in.popnet.newscenter.ejb.server.CategoryBean</ejb-class>
            <persistence-type>Bean</persistence-type>
            <prim-key-class>in.popnet.newscenter.ejb.server.CategoryPK</prim-key-class>
            <reentrant>False</reentrant>
            <resource-ref>
                <res-ref-name>jdbc/demoPool</res-ref-name>
                <res-type>javax.sql.DataSource</res-type>
                <res-auth>Container</res-auth>
            </resource-ref>
        </entity>
        
        <entity>
            <ejb-name>TheNews</ejb-name>
            <home>in.popnet.newscenter.ejb.server.NewsHome</home>
            <remote>in.popnet.newscenter.ejb.server.News</remote>
            <ejb-class>in.popnet.newscenter.ejb.server.NewsBean</ejb-class>
            <persistence-type>Bean</persistence-type>
            <prim-key-class>in.popnet.newscenter.ejb.server.NewsPK</prim-key-class>
            <reentrant>False</reentrant>
            <resource-ref>
                <res-ref-name>jdbc/demoPool</res-ref-name>
                <res-type>javax.sql.DataSource</res-type>
                <res-auth>Container</res-auth>
            </resource-ref>
        </entity>
        
        <session>
            <ejb-name>TheNewsManager</ejb-name>
            <home>in.popnet.newscenter.ejb.server.NewsManagerHome</home>
            <remote>in.popnet.newscenter.ejb.server.NewsManager</remote>
            <ejb-class>in.popnet.newscenter.ejb.server.NewsManagerBean</ejb-class>
            <session-type>Stateless</session-type>
            <transaction-type>Container</transaction-type>
            
            <ejb-ref>
                <ejb-ref-name>ejb/NewsCat</ejb-ref-name>                                   <!-- (1) -->
                <ejb-ref-type>Entity</ejb-ref-type>
                <home>in.popnet.newscenter.ejb.server.NewsCatHome</home>
                <remote>in.popnet.newscenter.ejb.server.NewsCat</remote>
                <ejb-link>TheNewsCat</ejb-link>
            </ejb-ref>
            
            <ejb-ref>
                <ejb-ref-name>ejb/Location</ejb-ref-name>                                   <!-- (1) -->
                <ejb-ref-type>Entity</ejb-ref-type>
                <home>in.popnet.newscenter.ejb.server.LocationHome</home>
                <remote>in.popnet.newscenter.ejb.server.Location</remote>
                <ejb-link>TheLocation</ejb-link>
            </ejb-ref>
            
            <ejb-ref>
                <ejb-ref-name>ejb/Category</ejb-ref-name>                                   <!-- (1) -->
                <ejb-ref-type>Entity</ejb-ref-type>
                <home>in.popnet.newscenter.ejb.server.CategoryHome</home>
                <remote>in.popnet.newscenter.ejb.server.Category</remote>
                <ejb-link>TheCategory</ejb-link>
            </ejb-ref>
            
             <ejb-ref>
                <ejb-ref-name>ejb/News</ejb-ref-name>                                   <!-- (1) -->
                <ejb-ref-type>Entity</ejb-ref-type>
                <home>in.popnet.newscenter.ejb.server.NewsHome</home>
                <remote>in.popnet.newscenter.ejb.server.News</remote>
                <ejb-link>TheNews</ejb-link>
            </ejb-ref>
            
             <resource-ref>
                <res-ref-name>jdbc/demoPool</res-ref-name>
                <res-type>javax.sql.DataSource</res-type>
                <res-auth>Container</res-auth>
            </resource-ref>
        </session>

        <session>
            <ejb-name>TheNewsListLoader</ejb-name>
            <home>in.popnet.newscenter.ejb.server.NewsListLoaderHome</home>
            <remote>in.popnet.newscenter.ejb.server.NewsListLoader</remote>
            <ejb-class>in.popnet.newscenter.ejb.server.NewsListLoaderBean</ejb-class>
            <session-type>Stateless</session-type>
            <transaction-type>Container</transaction-type>
            
            <ejb-ref>
                <ejb-ref-name>ejb/NewsCat</ejb-ref-name>                                   <!-- (1) -->
                <ejb-ref-type>Entity</ejb-ref-type>
                <home>in.popnet.newscenter.ejb.server.NewsCatHome</home>
                <remote>in.popnet.newscenter.ejb.server.NewsCat</remote>
                <ejb-link>TheNewsCat</ejb-link>
            </ejb-ref>
            
            <ejb-ref>
                <ejb-ref-name>ejb/Location</ejb-ref-name>                                   <!-- (1) -->
                <ejb-ref-type>Entity</ejb-ref-type>
                <home>in.popnet.newscenter.ejb.server.LocationHome</home>
                <remote>in.popnet.newscenter.ejb.server.Location</remote>
                <ejb-link>TheLocation</ejb-link>
            </ejb-ref>
            
            <ejb-ref>
                <ejb-ref-name>ejb/Category</ejb-ref-name>                                   <!-- (1) -->
                <ejb-ref-type>Entity</ejb-ref-type>
                <home>in.popnet.newscenter.ejb.server.CategoryHome</home>
                <remote>in.popnet.newscenter.ejb.server.Category</remote>
                <ejb-link>TheCategory</ejb-link>
            </ejb-ref>
            
            <ejb-ref>
                <ejb-ref-name>ejb/News</ejb-ref-name>                                   <!-- (1) -->
                <ejb-ref-type>Entity</ejb-ref-type>
                <home>in.popnet.newscenter.ejb.server.NewsHome</home>
                <remote>in.popnet.newscenter.ejb.server.News</remote>
                <ejb-link>TheNews</ejb-link>
            </ejb-ref>
            <resource-ref>
                <res-ref-name>jdbc/demoPool</res-ref-name>
                <res-type>javax.sql.DataSource</res-type>
                <res-auth>Container</res-auth>
            </resource-ref>
        </session>
    </enterprise-beans>

    <assembly-descriptor>
       <container-transaction>
            <method>
                <ejb-name>TheNewsCat</ejb-name>
                <method-intf>Remote</method-intf>
                <method-name>*</method-name>
            </method>
            <trans-attribute>Required</trans-attribute>
        </container-transaction>
    
    
        <container-transaction>
            <method>
                <ejb-name>TheLocation</ejb-name>
                <method-intf>Remote</method-intf>
                <method-name>*</method-name>
            </method>
            <trans-attribute>Required</trans-attribute>
        </container-transaction>
    
    <container-transaction>
            <method>
                <ejb-name>TheCategory</ejb-name>
                <method-intf>Remote</method-intf>
                <method-name>*</method-name>
            </method>
            <trans-attribute>Required</trans-attribute>
        </container-transaction>

    
        <container-transaction>
            <method>
                <ejb-name>TheNewsManager</ejb-name>
                <method-intf>Remote</method-intf>
                <method-name>*</method-name>
            </method>
            <trans-attribute>Required</trans-attribute>
        </container-transaction>
        
        <container-transaction>
            <method>
                <ejb-name>TheNewsListLoader</ejb-name>
                <method-intf>Remote</method-intf>
                <method-name>*</method-name>
            </method>
            <trans-attribute>Required</trans-attribute>
        </container-transaction>
    </assembly-descriptor>
</ejb-jar>
