Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 /*     */ package org.jboss.ejb3.timerservice.quartz.jmx;
 /*     */ 
 /*     */ import java.util.Properties;
 /*     */ import javax.management.MBeanServer;
 /*     */ import javax.management.ObjectName;
 /*     */ import org.jboss.system.ServiceMBeanSupport;
 /*     */ 
 /*     */ public class EJB3TimerService extends ServiceMBeanSupport
/*     */   implements EJB3TimerServiceMBean
/*     */ {
/*     */   private QuartzTimerServiceFactory delegate;
/*     */   private ObjectName dataSource;
/*     */ 
/*     */   public EJB3TimerService()
/*     */   {
/*  45 */     this.delegate = new QuartzTimerServiceFactory();
/*     */   }
/*     */ 
/*     */   protected void createService()
/*     */     throws Exception
/*     */   {
/*  51 */     super.createService();
/*     */   }
/*     */ 
/*     */   protected void destroyService()
/*     */     throws Exception
/*     */   {
/*  58 */     super.destroyService();
/*     */   }
/*     */ 
/*     */   public ObjectName getDataSource()
/*     */   {
/*  68 */     return this.dataSource;
/*     */   }
/*     */ 
/*     */   public void setDataSource(ObjectName dataSource)
/*     */   {
/*  76 */     this.dataSource = dataSource;
/*     */   }
/*     */ 
/*     */   public void setProperties(Properties props)
/*     */   {
/*  86 */     this.delegate.setProperties(props);
/*     */   }
/*     */ 
/*     */   public void setSqlProperties(Properties props)
/*     */   {
/*  96 */     this.delegate.setSqlProperties(props);
/*     */   }
/*     */ 
/*     */   protected void startService()
/*     */     throws Exception
/*     */   {
/* 102 */     super.startService();
/* 103 */     String jndiName = (String)this.server.getAttribute(this.dataSource, "BindName");
/* 104 */     this.delegate.setDataSource(jndiName);
/* 105 */     this.delegate.start();
/*     */   }
/*     */ 
/*     */   protected void stopService()
/*     */     throws Exception
/*     */   {
/* 111 */     this.delegate.stop();
/* 112 */     super.stopService();
/*     */   }
/*     */ }
/* Location:           /home/mnovotny/projects/EMBEDDED_JBOSS_BETA3_COMMUNITY/embedded/output/lib/embedded-jboss/lib/jboss-embedded-all.jar
 * Qualified Name:     org.jboss.ejb3.timerservice.quartz.jmx.EJB3TimerService
 * JD-Core Version:    0.6.0
 */
New to GrepCode? Check out our FAQ X