djencks 2005/01/31 19:58:10
Modified: modules/core/src/java/org/openejb/mdb MDBContainer.java
Log:
Make timer handles work, add some error detection and handling
Revision Changes Path
1.22 +9 -1
openejb/modules/core/src/java/org/openejb/mdb/MDBContainer.java
Index: MDBContainer.java
===================================================================
RCS file:
/home/projects/openejb/scm/openejb/modules/core/src/java/org/openejb/mdb/MDBContainer.java,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- MDBContainer.java 26 Jan 2005 23:28:00 -0000 1.21
+++ MDBContainer.java 1 Feb 2005 00:58:10 -0000 1.22
@@ -58,6 +58,7 @@
import javax.resource.spi.endpoint.MessageEndpoint;
import javax.resource.spi.endpoint.MessageEndpointFactory;
import javax.transaction.xa.XAResource;
+import javax.ejb.Timer;
import org.apache.geronimo.connector.ActivationSpecWrapper;
import org.apache.geronimo.core.service.Interceptor;
@@ -206,6 +207,11 @@
return deliveryTransacted[methodIndex];
}
+ public Timer getTimerById(Long id) {
+ assert timerService != null;
+ return timerService.getTimerById(id);
+ }
+
public void doStart() throws Exception {
if (timerService != null) {
timerService.doStart();
@@ -290,6 +296,8 @@
infoFactory.addAttribute("objectName", String.class, false);
infoFactory.addAttribute("kernel", Kernel.class, false);
+ infoFactory.addOperation("getTimerById", new Class[]{Long.class});
+
infoFactory.setConstructor(new String[]{
"containerId",
"ejbName",