1 22 package org.jboss.resource.adapter.quartz.inflow; 23 24 import javax.resource.spi.ActivationSpec ; 25 import javax.resource.spi.ResourceAdapter ; 26 import javax.resource.spi.InvalidPropertyException ; 27 import javax.resource.ResourceException ; 28 import java.io.Serializable ; 29 30 35 public class QuartzActivationSpec 36 implements ActivationSpec , Serializable 37 { 38 39 private transient ResourceAdapter ra; 40 41 private static long counter; 42 43 private static synchronized long getCounter() 44 { 45 return counter++; 46 } 47 48 public QuartzActivationSpec() 49 { 50 51 } 52 53 private String jobName = "job." + getCounter() + "." + System.currentTimeMillis(); 54 private String jobGroup = "default"; 55 private String triggerName = "trigger." + getCounter() + "." + System.currentTimeMillis(); 56 private String triggerGroup = "default"; 57 private String cronTrigger; 58 private boolean stateful; 59 60 62 public void validate() throws InvalidPropertyException 63 { 64 } 65 66 public ResourceAdapter getResourceAdapter() 67 { 68 return ra; 69 } 70 71 public void setResourceAdapter(ResourceAdapter ra) throws ResourceException 72 { 73 this.ra = ra; 74 } 75 76 78 public boolean isStateful() 79 { 80 return stateful; 81 } 82 83 public void setStateful(boolean stateful) 84 { 85 this.stateful = stateful; 86 } 87 88 public String getJobName() 89 { 90 return jobName; 91 } 92 93 public void setJobName(String jobName) 94 { 95 this.jobName = jobName; 96 } 97 98 public String getJobGroup() 99 { 100 return jobGroup; 101 } 102 103 public void setJobGroup(String jobGroup) 104 { 105 this.jobGroup = jobGroup; 106 } 107 108 public String getTriggerName() 109 { 110 return triggerName; 111 } 112 113 public void setTriggerName(String triggerName) 114 { 115 this.triggerName = triggerName; 116 } 117 118 public String getTriggerGroup() 119 { 120 return triggerGroup; 121 } 122 123 public void setTriggerGroup(String triggerGroup) 124 { 125 this.triggerGroup = triggerGroup; 126 } 127 128 public String getCronTrigger() 129 { 130 return cronTrigger; 131 } 132 133 public void setCronTrigger(String cronTrigger) 134 { 135 this.cronTrigger = cronTrigger; 136 } 137 138 public String toString() 139 { 140 return "jobName=" + jobName + ",jobGroup="+jobGroup+",triggerName="+triggerName+",triggerGroup="+triggerGroup+",cronTrigger="+cronTrigger; 141 } 142 143 144 } 145 | Popular Tags |