Exception with EJB Scheduler in JBoss7.1.1.Final
chanducompute Sep 5, 2012 3:43 AMI am getting the following error with my EJB scheduler deployed. I have the below EJB deployed as part of my ear file
package com.nielsen.emm.crediting.base.ejb;
import javax.ejb.Schedule;
import javax.ejb.Singleton;
import javax.ejb.Timeout;
import javax.ejb.Timer;
import org.apache.log4j.Logger;
import com.nielsen.emm.crediting.base.manager.CreditingBusinessManager;
@Singleton
public class DimentionDataManagementEJB {
private static final Logger logger = Logger
.getLogger(DimentionDataManagementEJB.class);
CreditingBusinessManager bm = new CreditingBusinessManager();
@Timeout
public void timeout() {
}
@Schedule(dayOfWeek = "*", hour = "*", minute = "*/2", second = "*", year = "*", persistent = false)
public void refreshDiAppDataCache(Timer timer) {
try {
bm.refreshDiAppDataCache();
} catch (Exception ex) {
ex.printStackTrace();
logger.error("Exception refreshing the Application Dimention data cache:"
+ ex.getMessage());
}
}
}
The application is executing the operation and showing output when printed on console, but still throwing the following exception. Also observed that it is not running in the specified interval of times. Can someone please help me to resolve this.
13:04:06,040 ERROR [org.jboss.as.ejb3] (EJB default - 2) JBAS014120: Error invoking timeout for timer: [id=8a913c04-fe64-4bc0-89b1-3c7ac8863be8 timedObjectId=CreditingApp-1.0.CreditingEjb-1.0.DimentionDataManagementEJB auto-timer?:true persistent?:false timerService=org.jboss.as.ejb3.timerservice.TimerServiceImpl@1acd8cf initialExpiration=Wed Sep 05 00:00:00 IST 2012 intervalDuration(in milli sec)=0 nextExpiration=Wed Sep 05 13:04:07 IST 2012 timerState=IN_TIMEOUT: javax.ejb.ConcurrentAccessTimeoutException: JBAS014373: EJB 3.1 PFD2 4.8.5.5.1 concurrent access timeout on org.jboss.invocation.InterceptorContext$Invocation@1f32ade - could not obtain lock within 5000MILLISECONDS
at org.jboss.as.ejb3.concurrency.ContainerManagedConcurrencyInterceptor.processInvocation(ContainerManagedConcurrencyInterceptor.java:100) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]