2 Replies Latest reply on Oct 29, 2001 12:01 PM by erik777

    Problem with updates

    bachen

      Hi

      I'm building an application using bmp entity beans. In all the documentation I have read, it says that the container calls ejbLoad before and ejbStore after the client calls each business method. When I use the get***- and set***-methods I have defined, this does not happened. This prevents me from getting the application to update the database correctly. I have tried setting the transactional properties for each method, but that didn't help. Does anyone have any idea what causes this problem?

      Thanks in advance,

      Rune Havnung Bakken

        • 1. Re: Problem with updates
          hrangamana

          Hi,

          Try commit option B or C.

          --Hermann
          > Hi
          >
          > I'm building an application using bmp entity beans.
          > In all the documentation I have read, it says that
          > the container calls ejbLoad before and ejbStore after
          > the client calls each business method. When I use the
          > get***- and set***-methods I have defined, this does
          > not happened. This prevents me from getting the
          > application to update the database correctly. I have
          > tried setting the transactional properties for each
          > method, but that didn't help. Does anyone have any
          > idea what causes this problem?
          >
          > Thanks in advance,
          >
          > Rune Havnung Bakken

          • 2. Re: Problem with updates
            erik777

            Commit option B solved this problem for me.

            To use it, simply define a container configuration in your jboss.xml. Then add this line in your reference, also in jboss.xml:

            <configuration-name>Custom BMP EntityBean</configuration-name>

            Here is the container configuration I used:

            <container-configurations>
            <container-configuration>
            <container-name>Custom BMP EntityBean</container-name>
            <call-logging>false</call-logging>
            <container-invoker>org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker</container-invoker>
            <container-interceptors>
            org.jboss.ejb.plugins.LogInterceptor
            org.jboss.ejb.plugins.SecurityInterceptor
            org.jboss.ejb.plugins.TxInterceptorCMT
            org.jboss.ejb.plugins.MetricsInterceptor
            org.jboss.ejb.plugins.EntityInstanceInterceptor
            org.jboss.ejb.plugins.EntitySynchronizationInterceptor
            </container-interceptors>
            <instance-pool>org.jboss.ejb.plugins.EntityInstancePool</instance-pool>
            <instance-cache>org.jboss.ejb.plugins.EntityInstanceCache</instance-cache>
            <persistence-manager>org.jboss.ejb.plugins.BMPPersistenceManager</persistence-manager>
            <transaction-manager>org.jboss.tm.TxManager</transaction-manager>
            <container-invoker-conf>
            4444
            True
            </container-invoker-conf>
            <container-cache-conf>
            <cache-policy>org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy</cache-policy>
            <cache-policy-conf>
            <min-capacity>50</min-capacity>
            <max-capacity>1000</max-capacity>
            <overager-period>300</overager-period>
            <max-bean-age>600</max-bean-age>
            <resizer-period>400</resizer-period>
            <max-cache-miss-period>60</max-cache-miss-period>
            <min-cache-miss-period>1</min-cache-miss-period>
            <cache-load-factor>0.75</cache-load-factor>
            </cache-policy-conf>
            </container-cache-conf>
            <container-pool-conf>
            100
            10
            </container-pool-conf>
            <commit-option>B</commit-option>
            </container-configuration>
            </container-configurations>