Here is an excerpt from orion-ejb-jar.xml, can someone tell me if I have
something configured incorrectly.  Again, the data is properly written to
the database, it is just NOT READ when orion is restarted and
getPhoneDependents() api is executed.

<entity-deployment name="ejb.person.PersonEntity"
location="ejb.person.PersonEntity"
wrapper="PersonEntityHome_EntityHomeWrapper33"
table="ejb_person_PersonEntity" data-source="jdbc/siteDS">
  <primkey-mapping>
    <cmp-field-mapping>
      <fields>
          <cmp-field-mapping name="id" persistence-name="id" />
      </fields>
    </cmp-field-mapping>
  </primkey-mapping>
  <cmp-field-mapping name="salutation" persistence-name="salutation" />
  <cmp-field-mapping name="name" persistence-name="name" />
  <cmp-field-mapping name="email" persistence-name="email" />
  <cmp-field-mapping name="phoneDependents">
    <collection-mapping table="ejb_phones">
      <primkey-mapping>
        <cmp-field-mapping>
          <fields>
            <cmp-field-mapping name="id" persistence-name="id" />
          </fields>
        </cmp-field-mapping>
      </primkey-mapping>
      <value-mapping type="ejb.person.PersonPhone">
        <cmp-field-mapping name="value">
          <properties>
            <cmp-field-mapping name="id" persistence-name="id" />
            <cmp-field-mapping name="number" persistence-name="number" />
            <cmp-field-mapping name="person">
              <entity-ref home="ejb.person.PersonEntity">
                <cmp-field-mapping name="person">
                  <fields>
                    <cmp-field-mapping name="id" persistence-name="ownerId"
/>
                  </fields>
                </cmp-field-mapping>
              </entity-ref>
            </cmp-field-mapping>
          </properties>
        </cmp-field-mapping>
      </value-mapping>
    </collection-mapping>
  </cmp-field-mapping>
  <ejb-ref-mapping name="ejb/id" />
</entity-deployment>

Again, the ejb.person.PersonEntity has a 1 to N relation with dependend
ejb.pers.PersonPhone.

Thanks.
-AP_

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Alex Paransky
Sent: Monday, March 05, 2001 1:18 PM
To: Orion-Interest
Subject: Problem retrieving dependents after Orion restart


I have an entity bean with 1-N relationships to dependents.  I have two
clients, the first client executes a method on a session that populates and
works with the data.  The second client tries to access the data.  When I
run the first client followed by the second client, second client works
correctly.  When I run the first client, then RESTART ORION, then run second
client, second client fails to find dependents (but they are there, in the
table).

Here is the output:

Orion/1.4.7 initialized
Create person entity
Add phone1
Add phone2
Add phone3
Phone: 8551 (818) 541-0029 1
Phone: 8552 None 2
Phone: 8553 (310) 880-5962 3
Deleting last phone
Phones: [Lejb.util.Value;@44006e

[apara@junior orion]$ ./go
Orion/1.4.7 initialized
Phones: null

First we create a new person entity, set the phones (dependents), then list
the phones, finally delete the last phone.  Then restarting orion, we try to
lookup the phone dependents.  Phones returns as null.  The table contains
correct values.  Phones ARE there.

What could be wrong?

-AP_



Reply via email to