6 Replies Latest reply on Jun 8, 2011 10:50 AM by jaikiran pai

    SFSB passivation disabling

    Axel Brinkop Newbie

      Hi,

       

      I'm using AS 6.0. I'm trying to disable SFSB passivation for a specific bean. General passivation would be OK too. I tried to disble the passivation using

      1)  @CacheConfig(maxSize = 0, idleTimeoutSeconds=0)

       

       

      2) @Cache(value=org.jboss.ejb3.cache.NoPassivationCache.class)

      3) setting in jboss-web.xml

      <

       

      passivation-config>

       

       

       

       

       

       

      <use-session-passivation>false</use-session-passivation>

       

       

      <passivation-min-idle-time>0</passivation-min-idle-time>

       

       

      <passivation-max-idle-time>0</passivation-max-idle-time>

       

       

      </passivation-config>

       

      But nothing seems to influence the behavior at all.

      Can somebody give me a hint where to influence the behavior in AS 6.0 ?

       

      Thanks a lot,

      Axel

       

        • 1. Re: SFSB passivation disabling
          Jan Groth Novice

          Same situation & same question here...

          • 2. Re: SFSB passivation disabling
            jaikiran pai Master

            Can you please post the relevant code/configs?

            • 3. Re: SFSB passivation disabling
              Jan Groth Novice

              Sure :-)

               

              I'm need to disable EJB-Passivation on a JBoss AS 6 GA (default configuration) because of https://issues.jboss.org/browse/WELD-917.

               

              After a lot of try and error, I still haven't found the right place to configure this, whatever I do doesn't seem to affect the passivation, it simply kicks in after 10 minutes

               

              That's what I've tried so far:

               

              (1) Changed standardjboss.xml to:

                 <container-configuration>

                    <container-name>Standard Stateful SessionBean</container-name>

                    ...

                    <container-cache-conf>

                      <cache-policy>org.jboss.ejb.plugins.NoPassivationCachePolicy</cache-policy>

                    </container-cache-conf>

                      ...

                  </container-configuration>

                 

              -> no effect on passivation, also tried to set passivation to some value >30min, again: no effect

                 

              (2) Played with jboss-web.xml:

              <passivation-config>

                  <use-session-passivation>false</use-session-passivation>

                  <passivation-min-idle-time>0</passivation-min-idle-time>

                  <passivation-max-idle-time>0</passivation-max-idle-time>

              </passivation-config>

              -> no effect on ejb-passivation, but that's rather the place where I configure _session_ passivation!?

               

              (3) Looked for @CacheConfig:

               

              -> This annotation is not present in my classpath, I assume that's because I'm on the default profile!?

               

              So, if anyone could either tell me here or point me to a relevant resource I'll be more than glad :-)

               

              Cheers,

              Jan

              • 4. Re: SFSB passivation disabling
                jaikiran pai Master

                Jan Groth wrote:

                 

                 

                That's what I've tried so far:

                 

                (1) Changed standardjboss.xml to:

                That won't work because that file is meant for legacy EJB2.x beans.

                 

                 

                 

                Jan Groth wrote:

                 

                   

                (2) Played with jboss-web.xml:

                <passivation-config>

                    <use-session-passivation>false</use-session-passivation>

                    <passivation-min-idle-time>0</passivation-min-idle-time>

                    <passivation-max-idle-time>0</passivation-max-idle-time>

                </passivation-config>

                -> no effect on ejb-passivation, but that's rather the place where I configure _session_ passivation!?

                 

                It's not meant for EJB passivation, like you already noticed.

                 

                 

                Jan Groth wrote:

                 

                 

                (3) Looked for @CacheConfig:

                 

                -> This annotation is not present in my classpath, I assume that's because I'm on the default profile!?

                 

                So, if anyone could either tell me here or point me to a relevant resource I'll be more than glad :-)

                 

                Cheers,

                Jan

                @org.jboss.ejb3.annotation.CacheConfig is the one you are looking for. And it's present in JBOSS_HOME/common/lib/jboss-ejb3-ext-api.jar

                • 5. Re: SFSB passivation disabling
                  Jan Groth Novice

                  Thanks for that helpful answer!

                   

                  I had to modify my classpath to use @ConfigConfig, but after that everything run nice and smoothly.

                   

                  One extra question: If I needed that configuration at deployment time - where would I be able to put that ?

                  • 6. Re: SFSB passivation disabling
                    jaikiran pai Master

                    Jan Groth wrote:

                     

                    One extra question: If I needed that configuration at deployment time - where would I be able to put that ?

                    Check this doc http://docs.jboss.org/ejb3/docs/reference/1.0.7/html/SessionBean_and_MDB_configuration.html (the "Note" section specifically).