Below is a sample ejb-jar.xml that has several beans in it, both session and
entity.

Al




<?xml version="1.0" encoding="Cp1252"?>

<!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise
JavaBeans 1.1//EN' 'http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd'>

<ejb-jar>
  <description>PageScreamer Central Message Beans</description>
  <display-name>Messages</display-name>
  <enterprise-beans>
    <session>
      <ejb-name>messageController</ejb-name>
      <home>com.crunchy.ejb.session.messageControllerHome</home>
      <remote>com.crunchy.ejb.session.messageController</remote>
      <ejb-class>com.crunchy.ejb.session.messageControllerBean</ejb-class>
      <session-type>Stateless</session-type>
      <transaction-type>Container</transaction-type>
      <ejb-ref>
        <ejb-ref-name>ejb/messageThread</ejb-ref-name>
        <ejb-ref-type>Entity</ejb-ref-type>
        <home>com.crunchy.ejb.entity.MessagethreadTHome</home>
        <remote>com.crunchy.ejb.entity.MessagethreadT</remote>
        <ejb-link>messageThread</ejb-link>
      </ejb-ref>
      <ejb-ref>
        <ejb-ref-name>ejb/forum</ejb-ref-name>
        <ejb-ref-type>Entity</ejb-ref-type>
        <home>com.crunchy.ejb.entity.ForumTHome</home>
        <remote>com.crunchy.ejb.entity.ForumT</remote>
        <ejb-link>forum</ejb-link>
      </ejb-ref>
      <ejb-ref>
        <ejb-ref-name>ejb/message</ejb-ref-name>
        <ejb-ref-type>Entity</ejb-ref-type>
        <home>com.crunchy.ejb.entity.MessageTHome</home>
        <remote>com.crunchy.ejb.entity.MessageT</remote>
        <ejb-link>message</ejb-link>
      </ejb-ref>
    </session>
    <entity>
      <ejb-name>messageThread</ejb-name>
      <home>com.crunchy.ejb.entity.MessagethreadTHome</home>
      <remote>com.crunchy.ejb.entity.MessagethreadT</remote>
      <ejb-class>com.crunchy.ejb.entity.MessagethreadTBean</ejb-class>
      <persistence-type>Bean</persistence-type>

<prim-key-class>com.crunchy.ejb.entity.MessagethreadT_PK</prim-key-class>
      <reentrant>False</reentrant>
    </entity>
    <entity>
      <ejb-name>forum</ejb-name>
      <home>com.crunchy.ejb.entity.ForumTHome</home>
      <remote>com.crunchy.ejb.entity.ForumT</remote>
      <ejb-class>com.crunchy.ejb.entity.ForumTBean</ejb-class>
      <persistence-type>Bean</persistence-type>
      <prim-key-class>com.crunchy.ejb.entity.ForumT_PK</prim-key-class>
      <reentrant>False</reentrant>
    </entity>
    <entity>
      <ejb-name>message</ejb-name>
      <home>com.crunchy.ejb.entity.MessageTHome</home>
      <remote>com.crunchy.ejb.entity.MessageT</remote>
      <ejb-class>com.crunchy.ejb.entity.MessageTBeanBMP</ejb-class>
      <persistence-type>Bean</persistence-type>
      <prim-key-class>com.crunchy.ejb.entity.MessageT_PK</prim-key-class>
      <reentrant>False</reentrant>
    </entity>
  </enterprise-beans>
  <assembly-descriptor>
    <container-transaction>
      <method>
        <ejb-name>messageController</ejb-name>
        <method-name>*</method-name>
      </method>
      <trans-attribute>Supports</trans-attribute>
    </container-transaction>
    <container-transaction>
      <method>
        <ejb-name>forum</ejb-name>
        <method-name>*</method-name>
      </method>
      <trans-attribute>Required</trans-attribute>
    </container-transaction>
    <container-transaction>
      <method>
        <ejb-name>messageThread</ejb-name>
        <method-name>*</method-name>
      </method>
      <trans-attribute>Required</trans-attribute>
    </container-transaction>
    <container-transaction>
      <method>
        <ejb-name>message</ejb-name>
        <method-name>*</method-name>
      </method>
      <trans-attribute>Required</trans-attribute>
    </container-transaction>
  </assembly-descriptor>
</ejb-jar>

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Emerson
Sent: Thursday, June 07, 2001 7:52 AM
To: [EMAIL PROTECTED]
Subject: [JBoss-user] Packaging


How i execute the xml maker app that documentation refers???

How do I pack 2 beans in one ejb-jar.xml???
Emerson Cargnin
TRE-SC
Setor de Desenvolvimento
Tel: (48) 251-3700 - Ramal 3134

_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user


_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to