User: mnf999
Date: 01/12/18 22:49:30
Modified: src/main/org/jboss/test/testbean2/bean AllTypesBean.java
Log:
Revision Changes Path
1.2 +180 -179
jbosstest/src/main/org/jboss/test/testbean2/bean/AllTypesBean.java
Index: AllTypesBean.java
===================================================================
RCS file:
/cvsroot/jboss/jbosstest/src/main/org/jboss/test/testbean2/bean/AllTypesBean.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- AllTypesBean.java 2000/09/27 00:46:36 1.1
+++ AllTypesBean.java 2001/12/19 06:49:30 1.2
@@ -19,185 +19,186 @@
public class AllTypesBean implements EntityBean {
- public boolean aBoolean;
- public byte aByte;
- public short aShort;
- public int anInt;
- public long aLong;
- public float aFloat;
- public double aDouble;
-// public char aChar;
- public String aString;
- public Date aDate;
- public Timestamp aTimestamp;
-
- public MyObject anObject;
-
- public StatefulSession statefulSession;
- public StatelessSession statelessSession;
- public EnterpriseEntity enterpriseEntity;
-
- public Collection aList;
-
- private EntityContext entityContext;
+ public boolean aBoolean;
+ public byte aByte;
+ public short aShort;
+ public int anInt;
+ public long aLong;
+ public float aFloat;
+ public double aDouble;
+ // public char aChar;
+ public String aString;
+ public Date aDate;
+ public Timestamp aTimestamp;
+
+ public MyObject anObject;
+
+ public StatefulSession statefulSession;
+ public StatelessSession statelessSession;
+ public EnterpriseEntity enterpriseEntity;
+
+ public Collection aList;
+
+ private EntityContext entityContext;
+
+
+ public String ejbCreate(String pk) throws RemoteException, CreateException {
+ return ejbCreate(true, (byte)1, (short)2, (int)3, (long)4, (float)5.6,
+ (double)7.8, /*'9',*/ pk, new Date(System.currentTimeMillis()),
+ new Timestamp(System.currentTimeMillis()), new MyObject());
+ }
+
+ public void ejbPostCreate(String pk)
+ throws RemoteException, CreateException {}
+
+
+ public String ejbCreate(boolean aBoolean, byte aByte, short aShort, int anInt,
+ long aLong, float aFloat, double aDouble, /*char aChar,*/ String aString,
+ Date aDate, Timestamp aTimestamp, MyObject anObject )
+
+ throws RemoteException, CreateException {
+
+ this.aBoolean = aBoolean;
+ this.aByte = aByte;
+ this.aShort = aShort;
+ this.anInt = anInt;
+ this.aLong = aLong;
+ this.aFloat = aFloat;
+ this.aDouble = aDouble;
+ //this.aChar = aChar;
+ this.aString = aString;
+ this.aDate = aDate;
+ this.aTimestamp = aTimestamp;
+ this.anObject = anObject;
+
+ try {
+ Context ctx = new InitialContext();
+
+ StatefulSessionHome sfHome =
(StatefulSessionHome)ctx.lookup("java:comp/env/ejb/stateful");
+ statefulSession = sfHome.create();
+
+ StatelessSessionHome slHome =
(StatelessSessionHome)ctx.lookup("java:comp/env/ejb/stateless");
+ statelessSession = slHome.create();
+
+ EnterpriseEntityHome eeHome =
(EnterpriseEntityHome)ctx.lookup("java:comp/env/ejb/entity");
+ try {
+ enterpriseEntity = eeHome.findByPrimaryKey(aString);
+ } catch (FinderException e) {
+ enterpriseEntity = eeHome.create(aString);
+ }
+
+ } catch (Exception e) {
+ e.printStackTrace();
+ throw new CreateException(e.getMessage());
+ }
+
+ aList = new ArrayList();
+
+ return null;
+ }
+
+
+ public void ejbPostCreate(boolean aBoolean, byte aByte, short aShort, int anInt,
+ long aLong, float aFloat, double aDouble, /*char aChar,*/ String aString,
+ Date aDate, Timestamp aTimestamp, MyObject anObject )
+
+ throws RemoteException, CreateException {}
+
+ public void ejbActivate() throws RemoteException {}
+
+ public void ejbLoad() throws RemoteException {}
+
+ public void ejbPassivate() throws RemoteException {}
+
+ public void ejbRemove() throws RemoteException, RemoveException {}
+
+ public void ejbStore() throws RemoteException {}
+
+
+ public void setEntityContext(EntityContext context) throws RemoteException {
+ entityContext = context;
+ }
+
+ public void unsetEntityContext() throws RemoteException {
+ entityContext = null;
+ }
+
+
+ public String callBusinessMethodA() throws RemoteException {
+ // test external ejb-ref in testbeans.jar
+ return statefulSession.callBusinessMethodA();
+ }
+
+
+
+ public void updateAllValues(boolean aBoolean, byte aByte, short aShort, int
anInt,
+ long aLong, float aFloat, double aDouble, /*char aChar,*/ String aString,
+ Date aDate, Timestamp aTimestamp, MyObject anObject ) {
+
+ this.aBoolean = aBoolean;
+ this.aByte = aByte;
+ this.aShort = aShort;
+ this.anInt = anInt;
+ this.aLong = aLong;
+ this.aFloat = aFloat;
+ this.aDouble = aDouble;
+ //this.aChar = aChar;
+ this.aString = aString;
+ this.aDate = aDate;
+ this.aTimestamp = aTimestamp;
+ this.anObject = anObject;
+
+ try {
+ Context ctx = new InitialContext();
+
+ EnterpriseEntityHome eeHome =
(EnterpriseEntityHome)ctx.lookup("java:comp/env/ejb/entity");
+ try {
+ enterpriseEntity = eeHome.findByPrimaryKey(aString);
+ } catch (FinderException e) {
+ enterpriseEntity = eeHome.create(aString);
+ }
+
+ } catch (Exception e) {
+ // ignore
+ }
+
+ }
+
+ public void addObjectToList(Object anObject) throws RemoteException {
+ aList.add(anObject);
+ }
+
+ public void removeObjectFromList(Object anObject) throws RemoteException {
+ aList.remove(anObject);
+ }
+
+ public Collection getObjectList() throws RemoteException { return aList; }
+
+ public boolean getBoolean() throws RemoteException { return aBoolean; }
+ public byte getByte() throws RemoteException { return aByte; }
+ public short getShort() throws RemoteException { return aShort; }
+ public int getInt() throws RemoteException { return anInt; }
+ public long getLong() throws RemoteException { return aLong; }
+ public float getFloat() throws RemoteException { return aFloat; }
+ public double getDouble() throws RemoteException { return aDouble; }
+ //public char getChar() throws RemoteException { return aChar; }
+ public String getString() throws RemoteException { return aString; }
+ public Date getDate() throws RemoteException { return aDate; }
+ public Timestamp getTimestamp() throws RemoteException { return aTimestamp; }
+
+ public MyObject getObject() throws RemoteException { return anObject; }
+
+ public Handle getStateful() throws RemoteException {
+ return statefulSession.getHandle();
+ }
+
+ public Handle getStateless() throws RemoteException {
+ return statelessSession.getHandle();
+ }
+
+ public Handle getEntity() throws RemoteException {
+ return enterpriseEntity.getHandle();
+ }
-
- public String ejbCreate(String pk) throws RemoteException, CreateException {
- return ejbCreate(true, (byte)1, (short)2, (int)3, (long)4, (float)5.6,
- (double)7.8, /*'9',*/ pk, new Date(System.currentTimeMillis()),
- new Timestamp(System.currentTimeMillis()), new MyObject());
- }
- public void ejbPostCreate(String pk)
- throws RemoteException, CreateException {}
-
-
- public String ejbCreate(boolean aBoolean, byte aByte, short aShort, int anInt,
- long aLong, float aFloat, double aDouble, /*char aChar,*/ String
aString,
- Date aDate, Timestamp aTimestamp, MyObject anObject )
-
- throws RemoteException, CreateException {
-
- this.aBoolean = aBoolean;
- this.aByte = aByte;
- this.aShort = aShort;
- this.anInt = anInt;
- this.aLong = aLong;
- this.aFloat = aFloat;
- this.aDouble = aDouble;
- //this.aChar = aChar;
- this.aString = aString;
- this.aDate = aDate;
- this.aTimestamp = aTimestamp;
- this.anObject = anObject;
-
- try {
- Context ctx = new InitialContext();
-
- StatefulSessionHome sfHome =
(StatefulSessionHome)ctx.lookup("java:comp/env/ejb/stateful");
- statefulSession = sfHome.create();
-
- StatelessSessionHome slHome =
(StatelessSessionHome)ctx.lookup("java:comp/env/ejb/stateless");
- statelessSession = slHome.create();
-
- EnterpriseEntityHome eeHome =
(EnterpriseEntityHome)ctx.lookup("java:comp/env/ejb/entity");
- try {
- enterpriseEntity = eeHome.findByPrimaryKey(aString);
- } catch (FinderException e) {
- enterpriseEntity = eeHome.create(aString);
- }
-
- } catch (Exception e) {
- throw new CreateException(e.getMessage());
- }
-
- aList = new ArrayList();
-
- return null;
- }
-
-
- public void ejbPostCreate(boolean aBoolean, byte aByte, short aShort, int
anInt,
- long aLong, float aFloat, double aDouble, /*char aChar,*/ String
aString,
- Date aDate, Timestamp aTimestamp, MyObject anObject )
-
- throws RemoteException, CreateException {}
-
- public void ejbActivate() throws RemoteException {}
-
- public void ejbLoad() throws RemoteException {}
-
- public void ejbPassivate() throws RemoteException {}
-
- public void ejbRemove() throws RemoteException, RemoveException {}
-
- public void ejbStore() throws RemoteException {}
-
-
- public void setEntityContext(EntityContext context) throws RemoteException {
- entityContext = context;
- }
-
- public void unsetEntityContext() throws RemoteException {
- entityContext = null;
- }
-
-
- public String callBusinessMethodA() throws RemoteException {
- // test external ejb-ref in testbeans.jar
- return statefulSession.callBusinessMethodA();
- }
-
-
-
- public void updateAllValues(boolean aBoolean, byte aByte, short aShort, int
anInt,
- long aLong, float aFloat, double aDouble, /*char aChar,*/ String
aString,
- Date aDate, Timestamp aTimestamp, MyObject anObject ) {
-
- this.aBoolean = aBoolean;
- this.aByte = aByte;
- this.aShort = aShort;
- this.anInt = anInt;
- this.aLong = aLong;
- this.aFloat = aFloat;
- this.aDouble = aDouble;
- //this.aChar = aChar;
- this.aString = aString;
- this.aDate = aDate;
- this.aTimestamp = aTimestamp;
- this.anObject = anObject;
-
- try {
- Context ctx = new InitialContext();
-
- EnterpriseEntityHome eeHome =
(EnterpriseEntityHome)ctx.lookup("java:comp/env/ejb/entity");
- try {
- enterpriseEntity = eeHome.findByPrimaryKey(aString);
- } catch (FinderException e) {
- enterpriseEntity = eeHome.create(aString);
- }
-
- } catch (Exception e) {
- // ignore
- }
-
- }
-
- public void addObjectToList(Object anObject) throws RemoteException {
- aList.add(anObject);
- }
-
- public void removeObjectFromList(Object anObject) throws RemoteException {
- aList.remove(anObject);
- }
-
- public Collection getObjectList() throws RemoteException { return aList; }
-
- public boolean getBoolean() throws RemoteException { return aBoolean; }
- public byte getByte() throws RemoteException { return aByte; }
- public short getShort() throws RemoteException { return aShort; }
- public int getInt() throws RemoteException { return anInt; }
- public long getLong() throws RemoteException { return aLong; }
- public float getFloat() throws RemoteException { return aFloat; }
- public double getDouble() throws RemoteException { return aDouble; }
- //public char getChar() throws RemoteException { return aChar; }
- public String getString() throws RemoteException { return aString; }
- public Date getDate() throws RemoteException { return aDate; }
- public Timestamp getTimestamp() throws RemoteException { return aTimestamp; }
-
- public MyObject getObject() throws RemoteException { return anObject; }
-
- public Handle getStateful() throws RemoteException {
- return statefulSession.getHandle();
- }
-
- public Handle getStateless() throws RemoteException {
- return statelessSession.getHandle();
- }
-
- public Handle getEntity() throws RemoteException {
- return enterpriseEntity.getHandle();
- }
-
-
}
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development