-
1. Re: Prevent Persistence of EJB Timers
jaikiran Feb 10, 2009 3:45 AM (in response to leobaz2)Which version of JBossAS and is it EJB3 or EJB2.x? Also please post the exact contents including the dtd/xsd declaration of your jboss.xml.
While posting logs or xml content or code, please remember to wrap it in a code block by using the Code button in the message editor window. Please use the Preview button to ensure that your post is correctly formatted. -
2. Re: Prevent Persistence of EJB Timers
leobaz2 Feb 10, 2009 9:04 AM (in response to leobaz2)I am using EJB3 and JBoss 4.2.3. When dealing with EJB3, what is the name of the EJB? Is it the class name, the interface name, jndi name, or should I specify the name via annotations?
<?xml version="1.0"?> <!DOCTYPE jboss PUBLIC "-//JBoss//DTD JBOSS 4.2//EN" "http://www.jboss.org/j2ee/dtd/jboss_4_2.dtd"> <jboss> <enterprise-beans> <session> <ejb-name>ProductCacheUpdaterBean</ejb-name> <timer-persistence>false</timer-persistence> </session> <session> <ejb-name>CategoryCacheUpdaterBean</ejb-name> <timer-persistence>false</timer-persistence> </session> </enterprise-beans> </jboss>
-
3. Re: Prevent Persistence of EJB Timers
leobaz2 Feb 10, 2009 9:12 AM (in response to leobaz2)This is the code that I have in the beans that are creating the timers.
getSessionContext().getTimerService().createTimer(intervalDuration, intervalDuration, divisionKeys);
The getSessionContext() is an inherited method from the base class that declares a private field:
@Resource(name = "ses_context_ref")
private SessionContext sessionContext; -
4. Re: Prevent Persistence of EJB Timers
leobaz2 Feb 13, 2009 4:25 PM (in response to leobaz2)I have tried every possible <ejb-name> but nothing seems to work. I have tried the bean impl class name, the interface name, and JNDI name. What else could it be?
-
5. Re: Prevent Persistence of EJB Timers
wolfc Feb 13, 2009 4:36 PM (in response to leobaz2)Non-persistent timers are not supported in the current EJB 3 implementation.
-
6. Re: Prevent Persistence of EJB Timers
leobaz2 Feb 13, 2009 5:55 PM (in response to leobaz2)I know they are not supported in the EJB 3.0 spec, however this is a JBoss extension since it's in the jboss.xml file. This is documented in the dtd for jboss.xml that comes with the installation and I have also seen it mentioned online.
One would think that since JBoss has it in the DTD, that it should work.