Author: jim.ma
Date: 2009-07-17 04:55:20 -0400 (Fri, 17 Jul 2009)
New Revision: 5317
Modified:
projects/jopr-integration/branch/3.x/jopr/src/main/java/org/jbosson/plugins/jbpm/JbpmInstanceComponent.java
projects/jopr-integration/branch/3.x/jopr/src/main/java/org/jbosson/plugins/jbpm/JbpmProcessDefComponent.java
projects/jopr-integration/branch/3.x/jopr/src/main/java/org/jbosson/plugins/jbpm/JbpmServiceComponent.java
Log:
Modified the getAvailability() to stop throwing exception when the resources is not
avialble
Modified:
projects/jopr-integration/branch/3.x/jopr/src/main/java/org/jbosson/plugins/jbpm/JbpmInstanceComponent.java
===================================================================
---
projects/jopr-integration/branch/3.x/jopr/src/main/java/org/jbosson/plugins/jbpm/JbpmInstanceComponent.java 2009-07-17
08:53:15 UTC (rev 5316)
+++
projects/jopr-integration/branch/3.x/jopr/src/main/java/org/jbosson/plugins/jbpm/JbpmInstanceComponent.java 2009-07-17
08:55:20 UTC (rev 5317)
@@ -46,7 +46,12 @@
}
public AvailabilityType getAvailability() {
- return AvailabilityType.UP;
+ AvailabilityType av = AvailabilityType.UP;
+ EmsBean bean = getServiceBean();
+ if (bean == null) {
+ av = AvailabilityType.DOWN;
+ }
+ return av;
}
public void getValues(MeasurementReport report, Set<MeasurementScheduleRequest>
metrics) {
Modified:
projects/jopr-integration/branch/3.x/jopr/src/main/java/org/jbosson/plugins/jbpm/JbpmProcessDefComponent.java
===================================================================
---
projects/jopr-integration/branch/3.x/jopr/src/main/java/org/jbosson/plugins/jbpm/JbpmProcessDefComponent.java 2009-07-17
08:53:15 UTC (rev 5316)
+++
projects/jopr-integration/branch/3.x/jopr/src/main/java/org/jbosson/plugins/jbpm/JbpmProcessDefComponent.java 2009-07-17
08:55:20 UTC (rev 5317)
@@ -67,7 +67,12 @@
}
public AvailabilityType getAvailability() {
- return AvailabilityType.UP;
+ AvailabilityType av = AvailabilityType.UP;
+ EmsBean bean = newConnection.getBean(JbpmServiceComponent.JBPM_SERVICE);
+ if (bean == null) {
+ av = AvailabilityType.DOWN;
+ }
+ return av;
}
public void getValues(MeasurementReport report, Set<MeasurementScheduleRequest>
metrics) {
Modified:
projects/jopr-integration/branch/3.x/jopr/src/main/java/org/jbosson/plugins/jbpm/JbpmServiceComponent.java
===================================================================
---
projects/jopr-integration/branch/3.x/jopr/src/main/java/org/jbosson/plugins/jbpm/JbpmServiceComponent.java 2009-07-17
08:53:15 UTC (rev 5316)
+++
projects/jopr-integration/branch/3.x/jopr/src/main/java/org/jbosson/plugins/jbpm/JbpmServiceComponent.java 2009-07-17
08:55:20 UTC (rev 5317)
@@ -134,7 +134,12 @@
@Override
public AvailabilityType getAvailability() {
- AvailabilityType av = super.getAvailability();
+ AvailabilityType av = AvailabilityType.UP;
+ newConnection = this.getRebuildConnection();
+ EmsBean bean = newConnection.getBean(JBPM_SERVICE);
+ if (bean == null) {
+ av = AvailabilityType.DOWN;
+ }
return av;
}
Show replies by date