-
1. Re: Passivation problem in JBoss3.2.2RC4
nraghuram Oct 20, 2003 4:26 AM (in response to danielchai)Have you set strictMaximumSize to true in the container pool conf. Otherwise the container will create a new instance if the pool is empty. Check the AbstractInstancePool code
raghu -
2. Re: Passivation problem in JBoss3.2.2RC4
danielchai Oct 20, 2003 7:03 PM (in response to danielchai)Thanks nraghuram first!
Can you give me the detail steps of how to setup the options if we want to see the passivation?
Since I want to limit the pool size to 2, I think I can see the ejbPassivate() is called when I create the third bean, but I see the following message in the message window:
08:46:51,941 INFO [STDOUT] call ejbCreate();
08:46:52,121 INFO [STDOUT] call count();
08:46:52,652 INFO [STDOUT] call ejbCreate();
08:46:52,692 INFO [STDOUT] call count();
08:46:53,202 INFO [STDOUT] call ejbCreate();
08:46:53,233 INFO [STDOUT] call count();
You might see that no passivate functions are called.
Can you tell me what I should do if I want to test the passivation and activation ? -
3. Re: Passivation problem in JBoss3.2.2RC4
nraghuram Oct 20, 2003 11:44 PM (in response to danielchai)You can log the container activities.
look for log4j.xml in the conf folder of the server and trace org.jboss.ejb.plugins . then you should see the container passivating, activating etc
raghu -
4. Re: Passivation problem in JBoss3.2.2RC4
danielchai Oct 22, 2003 12:55 AM (in response to danielchai)I have done as you tell me, but I see the passivation and activation in the log file.
I add the "System.out.println("call ejbPassivate()");" in the function ejbPassivate, but no message is given in the console window.
Do you mind giving me an example which includes the configuration file and jar file?
My email is dpchai@omegachina.com!
Thanks! -
5. Re: Passivation problem in JBoss3.2.2RC4
danielchai Oct 22, 2003 12:59 AM (in response to danielchai)I am sorry, I want to see I can not see the passivation and activation message in the log file.
-
6. Re: Passivation problem in JBoss3.2.2RC4
nraghuram Oct 22, 2003 3:34 AM (in response to danielchai)You can try adding this to your log4j.xml. It should create a file called ejb.log in your server's log folder
<appender-ref ref="EJB"/> -
7. Re: Passivation problem in JBoss3.2.2RC4
nraghuram Oct 22, 2003 6:13 AM (in response to danielchai)Passivation happens in a separate thread. Its part of the cache policy. You could try to set the overager period in cache policy to a small value to make the container passivate quickly.
-
8. Re: Passivation problem in JBoss3.2.2RC4
danielchai Oct 22, 2003 8:52 PM (in response to danielchai)Sorry for bothering you again.
I failed once and again. Could you give me an example which you use to test the passivation and activation of stateful session bean?
Please help me and I am crazy because of that. -
9. Re: Passivation problem in JBoss3.2.2RC4
nraghuram Oct 23, 2003 12:45 AM (in response to danielchai)You can try this config.
<container-cache-conf>
<cache-policy>org.jboss.ejb.plugins.LRUStatefulContextCachePolicy</cache-policy>
<cache-policy-conf>
<min-capacity>50</min-capacity>
<max-capacity>1000000</max-capacity>
<remover-period>1800</remover-period>
<max-bean-life>1800</max-bean-life>
<overager-period>100</overager-period>
<max-bean-age>100</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>
2
</container-pool-conf>
As i said earlier, passivation happens in a separate thread and depends on when the bean was last accessed, which is controlled by the max-bean-age attribute. the overager attribute defines what is the time interval betwee two runs of the overager task. -
10. Re: Passivation problem in JBoss3.2.2RC4
danielchai Oct 23, 2003 1:28 AM (in response to danielchai)I still get the same result!
Have you tested the passivation and activation of stateful session bean in this version of JBoss? Could you help me test it and send your example to me ?
Thanks! -
11. Re: Passivation problem in JBoss3.2.2RC4
nraghuram Oct 23, 2003 1:34 AM (in response to danielchai)I havent tested on rc4. Its difficult for me to send the session bean because its part of a large deployment. If you post your example I can try and run it on my setup and see if it works
-
12. Re: Passivation problem in JBoss3.2.2RC4
danielchai Oct 23, 2003 1:47 AM (in response to danielchai)I am ready for the email.
Do you mind telling me your email? -
13. Re: Passivation problem in JBoss3.2.2RC4
nraghuram Oct 23, 2003 3:10 AM (in response to danielchai)You can email me at raghu@jalva.com
-
14. Re: Passivation problem in JBoss3.2.2RC4
danielchai Oct 23, 2003 7:13 PM (in response to danielchai)I have sent an email to you, please help me.
Thanks!