User: fleury
Date: 00/09/29 13:17:26
Modified: src/main/org/jboss/test/testbean/bean
EnterpriseEntityBean.java EntityBMPBean.java
Log:
Fixed some bugs
Revision Changes Path
1.2 +4 -4
jbosstest/src/main/org/jboss/test/testbean/bean/EnterpriseEntityBean.java
Index: EnterpriseEntityBean.java
===================================================================
RCS file:
/products/cvs/ejboss/jbosstest/src/main/org/jboss/test/testbean/bean/EnterpriseEntityBean.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- EnterpriseEntityBean.java 2000/09/27 00:46:29 1.1
+++ EnterpriseEntityBean.java 2000/09/29 20:17:25 1.2
@@ -20,17 +20,17 @@
public int otherField = 0;
- public void ejbCreate(String name) throws RemoteException, CreateException {
+ public String ejbCreate(String name) throws RemoteException, CreateException {
System.out.println("EntityBean.ejbCreate("+name+") called");
this.name = name;
+ return null;
}
- // For usage in CMP only (void return)
-
- public void ejbFindByPrimaryKey(String name) throws RemoteException,
FinderException {
+ public String ejbFindByPrimaryKey(String name) throws RemoteException,
FinderException {
System.out.println("EntityBean.ejbFindByPrimaryKey() called");
+ return name;
}
public void ejbPostCreate(String name) throws RemoteException, CreateException {
1.2 +6 -0
jbosstest/src/main/org/jboss/test/testbean/bean/EntityBMPBean.java
Index: EntityBMPBean.java
===================================================================
RCS file:
/products/cvs/ejboss/jbosstest/src/main/org/jboss/test/testbean/bean/EntityBMPBean.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- EntityBMPBean.java 2000/09/27 00:46:29 1.1
+++ EntityBMPBean.java 2000/09/29 20:17:26 1.2
@@ -70,6 +70,11 @@
return Collections.enumeration(pks);
}
+ public void ejbPostCreate() throws RemoteException, CreateException {
+
+ System.out.println("EntityBMP.ejbPostCreate() called");
+ }
+
public void ejbPostCreate(String name) throws RemoteException, CreateException {
System.out.println("EntityBMP.ejbPostCreate("+name+") called");
@@ -133,6 +138,7 @@
Context namingContext = new InitialContext();
Connection connection = ((DataSource)
namingContext.lookup("java:comp/env/jdbc/myDatabase")).getConnection();
+ connection.close();
System.out.println("EntityBMP I did get the connection to the database
for BMP");
}