1 Reply Latest reply on Oct 10, 2001 5:36 PM by marc fleury

    Problems with commit option C

    Robert MacAndrew Newbie

      I originally put this on the new to JBoss forum, but then realised it should probably go here....

      I have been trying to switch on commit option C for one of my entity beans. It all deploys fine but doesn't seem to call ejbLoad as often as it should.

      Inside my ejbLoad I print out the following line when I enter - "inside ejbLoad", I also print out "calling ejbStore" inside ejbStore. My understanding of option C is that whenever you call a business method I should get:

      inside ejbLoad
      business processing
      calling ejbStore

      however I have the following in the logs:

      09 Oct 2001 16:55:27,722 DEBUG UserProfile:Activated bean UserProfile with id = user1
      09 Oct 2001 16:55:27,723 DEBUG com.gs.factory.ejb.userProfile.UserProfileEJB:ejbLoad inside ejbLoad
      09 Oct 2001 16:55:27,769 DEBUG com.gs.factory.ejb.userProfile.UserProfileEJB:ejbStore calling ejbStore
      09 Oct 2001 16:55:27,774 DEBUG UserProfile:Scheduled passivation of bean UserProfile with id = user1
      09 Oct 2001 16:55:27,775 DEBUG Container factory:Postponed passivation of bean UserProfile with id = user1
      09 Oct 2001 16:55:28,290 DEBUG com.gs.factory.ejb.userProfile.UserProfileEJB:ejbStore calling ejbStore
      09 Oct 2001 16:55:28,291 DEBUG UserProfile:Scheduled passivation of bean UserProfile with id = user1
      09 Oct 2001 16:55:28,292 DEBUG Container factory:Postponed passivation of bean UserProfile with id = user1
      09 Oct 2001 16:55:28,470 DEBUG com.gs.factory.ejb.userProfile.UserProfileEJB:ejbStore calling ejbStore
      09 Oct 2001 16:55:28,471 DEBUG UserProfile:Scheduled passivation of bean UserProfile with id = user1
      09 Oct 2001 16:55:28,472 DEBUG Container factory:Postponed passivation of bean UserProfile with id = user1
      09 Oct 2001 16:56:25,133 DEBUG com.gs.factory.ejb.userProfile.UserProfileEJB:getMyUsers inside UserProfileEJB calling getMyUsers
      09 Oct 2001 16:56:25,140 DEBUG com.gs.factory.ejb.userProfile.UserProfileEJB:getMyUsers found 1 users
      09 Oct 2001 16:56:25,141 DEBUG com.gs.factory.ejb.userProfile.UserProfileEJB:ejbStore calling ejbStore
      09 Oct 2001 16:56:25,147 DEBUG UserProfile:Scheduled passivation of bean UserProfile with id = user1
      09 Oct 2001 16:56:25,147 DEBUG Container factory:Postponed passivation of bean UserProfile with id = user1
      09 Oct 2001 16:56:25,221 DEBUG com.gs.factory.ejb.userProfile.UserProfileEJB:getAllUsers inside UserProfileEJB calling getAllUsers
      09 Oct 2001 16:56:25,322 DEBUG com.gs.factory.ejb.userProfile.UserProfileEJB:getAllUsers found 36 users
      09 Oct 2001 16:56:25,323 DEBUG com.gs.factory.ejb.userProfile.UserProfileEJB:ejbStore calling ejbStore
      09 Oct 2001 16:56:25,328 DEBUG UserProfile:Scheduled passivation of bean UserProfile with id = user1
      09 Oct 2001 16:56:25,329 DEBUG Container factory:Postponed passivation of bean UserProfile with id = user1
      09 Oct 2001 16:56:25,410 DEBUG com.gs.factory.ejb.userProfile.UserProfileEJB:getMyUsers inside UserProfileEJB calling getMyUsers
      09 Oct 2001 16:56:25,416 DEBUG com.gs.factory.ejb.userProfile.UserProfileEJB:getMyUsers found 1 users
      09 Oct 2001 16:56:25,416 DEBUG com.gs.factory.ejb.userProfile.UserProfileEJB:ejbStore calling ejbStore
      09 Oct 2001 16:56:25,422 DEBUG UserProfile:Scheduled passivation of bean UserProfile with id = user1
      09 Oct 2001 16:56:25,422 DEBUG Container factory:Postponed passivation of bean UserProfile with id = user1

      As you can see ejbLoad only seems to get called once, despite the large number of times I request the bean (and the number of times ejbStore is called).

      I have the following jboss.xml file which I am packaging up with my EJB:


      false
      <resource-managers />
      <enterprise-beans>

      <ejb-name>UserProfile</ejb-name>
      <jndi-name>ejb/UserProfile</jndi-name>
      <configuration-name>Standard BMP EntityBean</configuration-name>

      </enterprise-beans>
      <container-configurations>
      <container-configuration>
      <container-name>Standard BMP EntityBean</container-name>
      <commit-option>C</commit-option>
      </container-configuration>
      </container-configurations>


      Any ideas?

      Thanks,
      Rob