User: peter
Date: 01/03/01 05:23:19
Modified: src/main/org/jboss/test/cts/ejb CtsBmpBean.java
Log:
Added container monitor code to verify when EJB callbacks
are made by the container to the bean instance. The
callbacks are transmitted to the client via JMS.
Revision Changes Path
1.4 +20 -3 jbosstest/src/main/org/jboss/test/cts/ejb/CtsBmpBean.java
Index: CtsBmpBean.java
===================================================================
RCS file:
/products/cvs/ejboss/jbosstest/src/main/org/jboss/test/cts/ejb/CtsBmpBean.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- CtsBmpBean.java 2001/02/18 16:04:43 1.3
+++ CtsBmpBean.java 2001/03/01 13:23:19 1.4
@@ -1,7 +1,7 @@
package org.jboss.test.cts.ejb;
-
+import org.jboss.test.cts.jms.*;
import org.jboss.test.cts.keys.*;
import java.rmi.RemoteException;
import java.util.Vector;
@@ -26,6 +26,7 @@
private static final String TABLE_NAME = "BMP_BEAN_TBL";
EntityContext ctx = null;
DataSource ds = null;
+ private MsgSender ms = null;
// bmp fields
String accountNumber;
@@ -52,6 +53,8 @@
RemoteException
{
System.out.println("entry ejbCreate");
+ ms = new MsgSender( );
+ ms.sendMsg(ContainerMBox.EJB_CREATE_MSG);
tearDown();
setUp();
@@ -297,6 +300,8 @@
RemoteException
{
System.out.println("ejbPostCreate (AccountPK, String) called");
+ ms = new MsgSender( );
+ ms.sendMsg(ContainerMBox.EJB_POST_CREATE_MSG);
}
/**
@@ -312,6 +317,8 @@
throws EJBException, RemoteException
{
System.out.println("ejbLoad () called");
+ ms = new MsgSender( );
+ ms.sendMsg(ContainerMBox.EJB_LOAD_MSG);
Connection con = null;
@@ -363,6 +370,8 @@
throws EJBException, RemoteException
{
System.out.println("ejbStore () called");
+ ms = new MsgSender( );
+ ms.sendMsg(ContainerMBox.EJB_STORE_MSG);
Connection con = null;
@@ -406,6 +415,8 @@
throws EJBException, RemoteException
{
System.out.println("ejbRemove () called");
+ ms = new MsgSender( );
+ ms.sendMsg(ContainerMBox.EJB_REMOVE_MSG);
Connection con = null;
@@ -450,6 +461,8 @@
throws EJBException, RemoteException
{
System.out.println("ejbActivate () called");
+ ms = new MsgSender( );
+ ms.sendMsg(ContainerMBox.EJB_ACTIVATE_MSG);
}
/**
@@ -465,6 +478,8 @@
throws EJBException, RemoteException
{
System.out.println("ejbPassivate () called");
+ ms = new MsgSender( );
+ ms.sendMsg(ContainerMBox.EJB_PASSIVATE_MSG);
}
/**
@@ -483,7 +498,8 @@
{
System.out.println("setEntityContext (\"" + ctx.getPrimaryKey()
+ "\") called");
-
+ ms = new MsgSender( );
+ ms.sendMsg(ContainerMBox.SET_ENTITY_CONTEXT_MSG);
this.ctx = ctx;
// lookup the datasource
@@ -511,7 +527,8 @@
throws EJBException, RemoteException
{
System.out.println("unsetEntityContext () called");
-
+ ms = new MsgSender( );
+ ms.sendMsg(ContainerMBox.UNSET_ENTITY_CONTEXT_MSG);
ctx = null;
}