>asadmin get server.ejb-container.*
server.ejb-container.cache-idle-timeout-in-seconds = 30
server.ejb-container.cache-resize-quantity = 1
server.ejb-container.commit-option = B
server.ejb-container.max-cache-size = 1
server.ejb-container.max-pool-size = 32
server.ejb-container.pool-idle-timeout-in-seconds = 600
server.ejb-container.pool-resize-quantity = 8
server.ejb-container.removal-timeout-in-seconds = 600
server.ejb-container.session-store = ${com.sun.aas.instanceRoot}/session-store
server.ejb-container.steady-pool-size = 0
server.ejb-container.victim-selection-policy = nru
My simple code of SFSB:
@Stateful
public class MySessionBean implements MySessionRemote {
public String sayHello() {
return "Hello World!!!";
}
@Remove
public void remove(){
Logger.getLogger("MYAPP").log(Level.INFO,"remove");
}
@PrePassivate
public void passivate(){
Logger.getLogger("MYAPP").log(Level.INFO,"passivate");
}
@PostActivate
public void activate(){
Logger.getLogger("MYAPP").log(Level.INFO,"activate");
}
}
I do not see any files in session-store or any records in server.log event after about 20 min from invocation of two instances.
Monitoring statistics shows this:
>asadmin get --monitor=true server.applications.MyApp.MyApp-ejb_jar.MySessionBean.bean-cache.*
server.applications.MyApp.MyApp-ejb_jar.MySessionBean.bean-cache.cachehits-current = 2
server.applications.MyApp.MyApp-ejb_jar.MySessionBean.bean-cache.cachehits-description = Provides the number of times a user request hits an EJB in associated EJB cache instance. In addition, provides information on High and Low watermarks, and Upper and Lower bounds.
server.applications.MyApp.MyApp-ejb_jar.MySessionBean.bean-cache.cachehits-highwatermark = 2
server.applications.MyApp.MyApp-ejb_jar.MySessionBean.bean-cache.cachehits-lastsampletime = 1222418400187
server.applications.MyApp.MyApp-ejb_jar.MySessionBean.bean-cache.cachehits-lowerbound = 0
server.applications.MyApp.MyApp-ejb_jar.MySessionBean.bean-cache.cachehits-lowwatermark = 0
server.applications.MyApp.MyApp-ejb_jar.MySessionBean.bean-cache.cachehits-name = CacheHits
server.applications.MyApp.MyApp-ejb_jar.MySessionBean.bean-cache.cachehits-starttime = 1222416812546
server.applications.MyApp.MyApp-ejb_jar.MySessionBean.bean-cache.cachehits-unit = count
server.applications.MyApp.MyApp-ejb_jar.MySessionBean.bean-cache.cachehits-upperbound = 9223372036854775807
server.applications.MyApp.MyApp-ejb_jar.MySessionBean.bean-cache.cachemisses-current = 0
server.applications.MyApp.MyApp-ejb_jar.MySessionBean.bean-cache.cachemisses-description = Provides the number of times a user request fails to find an EJB in associated EJB cache instance. In addition, provides information on High and Low watermarks, and Upper and Lower bounds.
server.applications.MyApp.MyApp-ejb_jar.MySessionBean.bean-cache.cachemisses-highwatermark = 0
server.applications.MyApp.MyApp-ejb_jar.MySessionBean.bean-cache.cachemisses-lastsampletime = 1222418400187
server.applications.MyApp.MyApp-ejb_jar.MySessionBean.bean-cache.cachemisses-lowerbound = 0
server.applications.MyApp.MyApp-ejb_jar.MySessionBean.bean-cache.cachemisses-lowwatermark = 0
server.applications.MyApp.MyApp-ejb_jar.MySessionBean.bean-cache.cachemisses-name = CacheMisses
server.applications.MyApp.MyApp-ejb_jar.MySessionBean.bean-cache.cachemisses-starttime = 1222416812546
server.applications.MyApp.MyApp-ejb_jar.MySessionBean.bean-cache.cachemisses-unit = count
server.applications.MyApp.MyApp-ejb_jar.MySessionBean.bean-cache.cachemisses-upperbound = 9223372036854775807
server.applications.MyApp.MyApp-ejb_jar.MySessionBean.bean-cache.dotted-name = server.applications.MyApp.MyApp-ejb_jar.MySessionBean.bean-cache
server.applications.MyApp.MyApp-ejb_jar.MySessionBean.bean-cache.numbeansincache-current = 2
server.applications.MyApp.MyApp-ejb_jar.MySessionBean.bean-cache.numbeansincache-description = Provides total number of EJBs in the associated EJB Cache. Returns various statistical values like High and Low Watermarks as well as Upper and Lower Bounds.
server.applications.MyApp.MyApp-ejb_jar.MySessionBean.bean-cache.numbeansincache-highwatermark = 2
server.applications.MyApp.MyApp-ejb_jar.MySessionBean.bean-cache.numbeansincache-lastsampletime = 1222418400187
server.applications.MyApp.MyApp-ejb_jar.MySessionBean.bean-cache.numbeansincache-lowerbound = 0
server.applications.MyApp.MyApp-ejb_jar.MySessionBean.bean-cache.numbeansincache-lowwatermark = 0
server.applications.MyApp.MyApp-ejb_jar.MySessionBean.bean-cache.numbeansincache-name = NumBeansInCache
server.applications.MyApp.MyApp-ejb_jar.MySessionBean.bean-cache.numbeansincache-starttime = 1222416812546
server.applications.MyApp.MyApp-ejb_jar.MySessionBean.bean-cache.numbeansincache-unit = Count
server.applications.MyApp.MyApp-ejb_jar.MySessionBean.bean-cache.numbeansincache-upperbound = 2147483647
server.applications.MyApp.MyApp-ejb_jar.MySessionBean.bean-cache.numexpiredsessionsremoved-count = 0
server.applications.MyApp.MyApp-ejb_jar.MySessionBean.bean-cache.numexpiredsessionsremoved-description = Provides a count value reflecting the number of expired sessions that were removed from the bean cache.
server.applications.MyApp.MyApp-ejb_jar.MySessionBean.bean-cache.numexpiredsessionsremoved-lastsampletime = 1222418400187
server.applications.MyApp.MyApp-ejb_jar.MySessionBean.bean-cache.numexpiredsessionsremoved-name = NumExpiredSessionsRemoved
server.applications.MyApp.MyApp-ejb_jar.MySessionBean.bean-cache.numexpiredsessionsremoved-starttime = 1222416812546
server.applications.MyApp.MyApp-ejb_jar.MySessionBean.bean-cache.numexpiredsessionsremoved-unit = count
server.applications.MyApp.MyApp-ejb_jar.MySessionBean.bean-cache.numpassivationerrors-count = 0
server.applications.MyApp.MyApp-ejb_jar.MySessionBean.bean-cache.numpassivationerrors-description = Provides a count value reflecting the number of errors that occured while passivating a StatefulSessionBean from the bean cache.
server.applications.MyApp.MyApp-ejb_jar.MySessionBean.bean-cache.numpassivationerrors-lastsampletime = 1222418400187
server.applications.MyApp.MyApp-ejb_jar.MySessionBean.bean-cache.numpassivationerrors-name = NumPassivationErrors
server.applications.MyApp.MyApp-ejb_jar.MySessionBean.bean-cache.numpassivationerrors-starttime = 1222416812546
server.applications.MyApp.MyApp-ejb_jar.MySessionBean.bean-cache.numpassivationerrors-unit = count
server.applications.MyApp.MyApp-ejb_jar.MySessionBean.bean-cache.numpassivations-count = 0
server.applications.MyApp.MyApp-ejb_jar.MySessionBean.bean-cache.numpassivations-description = Provides a count value reflecting the number of passivations for a StatefulSessionBean from the bean cache.
server.applications.MyApp.MyApp-ejb_jar.MySessionBean.bean-cache.numpassivations-lastsampletime = 1222418400187
server.applications.MyApp.MyApp-ejb_jar.MySessionBean.bean-cache.numpassivations-name = NumPassivations
server.applications.MyApp.MyApp-ejb_jar.MySessionBean.bean-cache.numpassivations-starttime = 1222416812546
server.applications.MyApp.MyApp-ejb_jar.MySessionBean.bean-cache.numpassivations-unit = count
server.applications.MyApp.MyApp-ejb_jar.MySessionBean.bean-cache.numpassivationsuccess-count = 0
server.applications.MyApp.MyApp-ejb_jar.MySessionBean.bean-cache.numpassivationsuccess-description = Provides a count value reflecting the number of passivations for a StatefulSessionBean from the bean cache that succeeded
server.applications.MyApp.MyApp-ejb_jar.MySessionBean.bean-cache.numpassivationsuccess-lastsampletime = 1222418400187
server.applications.MyApp.MyApp-ejb_jar.MySessionBean.bean-cache.numpassivationsuccess-name = NumPassivationSuccess
server.applications.MyApp.MyApp-ejb_jar.MySessionBean.bean-cache.numpassivationsuccess-starttime = 1222416812546
server.applications.MyApp.MyApp-ejb_jar.MySessionBean.bean-cache.numpassivationsuccess-unit = count
[Message sent by forum member 'sergzubovich' (sergzubovich)]
http://forums.java.net/jive/thread.jspa?messageID=301772