Sorry that I don't have an answer on your question.  I just wanted to say that I ran a 
test and am having a similar result.

--- Clipped from jboss.xml ---
<resource-managers>
  <resource-manager res-class="org.jboss.ejb.deployment.JDBCResource">
    <res-name>jdbc/SECM</res-name>
    <res-jndi-name>Oracle</res-jndi-name>
  </resource-manager>
</resource-managers>

<enterprise-beans>
  <entity>
    <ejb-name>datatype.AddressBook</ejb-name>
    <jndi-name>datatype.AddressBook</jndi-name>
    <configuration-name>BMP EntityBean</configuration-name>
  </entity>
---

--- Clipped from ejb-jar.xml ---
<enterprise-beans>
  <entity>
    <description>Address Book entity</description>
    <display-name>AddressBookEntity</display-name>
    <ejb-name>datatype.AddressBook</ejb-name>
    <home>org.opengroupware.datatype.AddressBookHome</home>
    <remote>org.opengroupware.datatype.AddressBook</remote>
    <ejb-class>org.opengroupware.datatype.AddressBookBean</ejb-class>
    <persistence-type>Bean</persistence-type>
    <prim-key-class>java.lang.Long</prim-key-class>
    <reentrant>False</reentrant>
    <resource-ref>
      <description>JDBC Connection for the bean</description>
      <res-ref-name>jdbc/SECM</res-ref-name>
      <res-type>javax.sql.DataSource</res-type>
      <res-auth>Container</res-auth>
    </resource-ref>
  </entity>
---

And the bean code:

--- Clipped from AddressBookBean.java ---
public void ejbStore() {
  System.out.println( "ejbStore called." );

  Connection connection = openConnection();

  // first, remove all of the address list rows
  try {
    PreparedStatement preparedStatement = connection.prepareStatement(
      "DELETE FROM ADDRESSLIST WHERE ADDRESSID=?"
    );
    preparedStatement.setLong( 1, addressBookId.longValue() );

    preparedStatement.executeUpdate();
  } catch( SQLException sqle ) {
    closeConnection( connection );

    throw new EJBException(
      "Failed removng addresses from AddressBook: " + sqle.getMessage()
    );
  }

  // re-add the address list
  try {
    System.out.println( "writing the address list" );

    Enumeration enumeration = addressList.keys();
    while( enumeration.hasMoreElements() ) {
      String email = (String) enumeration.nextElement();

      PreparedStatement preparedStatement = connection.prepareStatement(
        "INSERT INTO ADDRESSLIST VALUES( ?, ?, ? )"
      );
      preparedStatement.setLong( 1, addressBookId.longValue() );
      preparedStatement.setString( 2, email );
      preparedStatement.setString( 3, (String) addressList.get(email) );

      preparedStatement.executeUpdate();
    }
  } catch( SQLException sqle ) {
    closeConnection( connection );

    throw new EJBException(
      "Failed adding addresses to AddressBook: " + sqle.getMessage()
    );
  }

  // then, update the address book record
  try {
    PreparedStatement preparedStatement = connection.prepareStatement(
      "UPDATE ADDRESSBOOK SET USERID=?, NAME=? WHERE ADDRESSID=?"
    );
    preparedStatement.setLong( 1, userId );
    preparedStatement.setString( 2, name );
    preparedStatement.setLong( 3, addressBookId.longValue() );

    preparedStatement.executeUpdate();
  } catch( SQLException sqle ) {
    closeConnection( connection );

    throw new EJBException(
      "Failed update AddressBook: " + sqle.getMessage()
    );
  }

  closeConnection( connection );

}

---

I will let you know if I track down anything, but I would appreciate any help from 
people working on the container...

- jeremiah

------Original Message------
From: Richard Backhouse <[EMAIL PROTECTED]>
To: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
Sent: August 10, 2000 2:18:17 AM GMT
Subject: [jBoss-User] ejbStore not being called on BMP beans


I'm not seeing the ejbStore method being called on any of my BMP beans.
I have tried both the latest binary and also the latest source tree from
cvs. What is the trigger for the ejbStore to be called. FYI all my
methods in the beans are defined with the Required transaction
attribute.

Richard Backhouse
Oak Grove Software


--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

______________________________________________
FREE Personalized Email at Mail.com
Sign up at http://www.mail.com/?sr=signup



--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to